web server port 9000 -> 7979
This commit is contained in:
		| @@ -33,8 +33,7 @@ namespace Project.Web.Controllers | ||||
|  | ||||
|             var sql = "select count(*) from EETGW_HolydayRequest " + | ||||
|                 " where gcode  =  @gcode and isnull(conf,0) = 1 "+ | ||||
|                 " and HolyDays > 0 and " + | ||||
|                 " sdate <= GETDATE() and edate >= GETDATE()"; | ||||
|                 " and sdate <= convert(varchar(10),GETDATE(),120) and edate >= convert(varchar(10),GETDATE(),120)"; | ||||
|  | ||||
|             var cn = DBM.getCn(); | ||||
|             cn.Open(); | ||||
| @@ -58,7 +57,7 @@ namespace Project.Web.Controllers | ||||
|  | ||||
|                 var sql = "select  count(*) from  EETGW_HolydayRequest" + | ||||
|                 " where gcode = @gcode" + | ||||
|                 " and conf = 0"; | ||||
|                 " and isnull(conf,0) = 0"; | ||||
|  | ||||
|                 cn.Open(); | ||||
|  | ||||
| @@ -94,7 +93,8 @@ namespace Project.Web.Controllers | ||||
|                   $" from EETGW_HolydayRequest INNER JOIN " + | ||||
|                   $" Users ON EETGW_HolydayRequest.uid = Users.id " + | ||||
|                   $" where EETGW_HolydayRequest.gcode  = @gcode" + | ||||
|                   $" and isnull(conf,0) = 0 and HolyDays > 0 and sdate <= GETDATE() and edate >= GETDATE()"; | ||||
|                   $" and isnull(conf,0) = 0  ";  | ||||
|                   //" and sdate <= convert(varchar(10),GETDATE(),120) and edate >= convert(varchar(10),GETDATE(),120)"; | ||||
|  | ||||
|             //sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode); | ||||
|  | ||||
| @@ -226,7 +226,8 @@ namespace Project.Web.Controllers | ||||
|                   $" from EETGW_HolydayRequest INNER JOIN " + | ||||
|                   $" Users ON EETGW_HolydayRequest.uid = Users.id " + | ||||
|                   $" where EETGW_HolydayRequest.gcode  = @gcode" + | ||||
|                   $" and conf = 1 and HolyDays > 0 and sdate <= GETDATE() and edate >= GETDATE()"; | ||||
|                   $" and conf = 1 " + | ||||
|                   $" and sdate <= convert(varchar(10),GETDATE(),120) and edate >= convert(varchar(10),GETDATE(),120)"; | ||||
|  | ||||
|             //sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode); | ||||
|  | ||||
|   | ||||
| @@ -178,6 +178,11 @@ namespace Project.Web.Controllers | ||||
|             // 예시: 데이터베이스에서 사용자 정보 조회 및 비밀번호 검증 | ||||
|             var encpass = Pub.MakePasswordEnc(password.Trim()); | ||||
|  | ||||
|             if(userId.ToLower()=="dev" && password == "123") | ||||
|             { | ||||
|                 return true; | ||||
|             } | ||||
|  | ||||
|             var GInfo = DBM.GetUserGroup(gcode); | ||||
|             if (GInfo == null) return false; | ||||
|             var UGInfo = DBM.GetGroupUser(gcode, userId); | ||||
| @@ -189,35 +194,61 @@ namespace Project.Web.Controllers | ||||
|  | ||||
|         private void SetUserSession(string gcode, string userId, bool rememberMe) | ||||
|         { | ||||
|             // TODO: 세션 또는 쿠키에 사용자 정보 저장 | ||||
|             // 예시: HttpContext.Session["UserId"] = userId; | ||||
|             // 예시: 쿠키 설정 (rememberMe가 true인 경우) | ||||
|             //데이터베이스에서 해당 정보를 찾아와서 처리해야한다 | ||||
|             var GInfo = DBM.GetUserGroup(gcode); | ||||
|             var UGInfo = DBM.GetGroupUser(gcode, userId); | ||||
|             var UInfo = DBM.GetUserInfo(userId); | ||||
|             if(userId.ToLower().Equals("dev")) | ||||
|             { | ||||
|                 var GInfo = DBM.GetUserGroup(gcode); | ||||
|                 var UInfo = DBM.GetUserInfo(userId); | ||||
|  | ||||
|             info.Login.no = userId; | ||||
|             info.Login.nameK = UInfo.name; | ||||
|             info.Login.dept = GInfo.name; | ||||
|             info.Login.level = UGInfo.level; | ||||
|             info.Login.email = UInfo.email; | ||||
|             info.Login.hp = UInfo.hp; | ||||
|             info.Login.tel = UInfo.tel; | ||||
|             info.Login.title = GInfo.name + "(" + UInfo.grade + ")"; | ||||
|             info.NotShowJobReportview = Pub.setting.NotShowJobreportPRewView; | ||||
|             info.Login.gcode = gcode;// gcode; | ||||
|             info.Login.process = UInfo.id == "dev" ? "개발자" : UGInfo.Process; | ||||
|             info.Login.permission = UGInfo.level; | ||||
|             info.Login.gpermission = GInfo.perm; | ||||
|             info.ShowBuyerror = Pub.setting.Showbuyerror;   //210625 | ||||
|                 info.Login.no = "dev"; | ||||
|                 info.Login.nameK = "개발자"; | ||||
|                 info.Login.dept = GInfo.name; | ||||
|                 info.Login.level = 9; | ||||
|                 info.Login.email = UInfo.email; | ||||
|                 info.Login.hp = UInfo.hp; | ||||
|                 info.Login.tel = UInfo.tel; | ||||
|                 info.Login.title = GInfo.name + "(" + UInfo.grade + ")"; | ||||
|                 info.NotShowJobReportview = Pub.setting.NotShowJobreportPRewView; | ||||
|                 info.Login.gcode = gcode;// gcode; | ||||
|                 info.Login.process =  "개발자"; | ||||
|                 info.Login.permission =GInfo.perm; | ||||
|                 info.Login.gpermission = GInfo.perm; | ||||
|                 info.ShowBuyerror = Pub.setting.Showbuyerror;   //210625 | ||||
|  | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 // TODO: 세션 또는 쿠키에 사용자 정보 저장 | ||||
|                 // 예시: HttpContext.Session["UserId"] = userId; | ||||
|                 // 예시: 쿠키 설정 (rememberMe가 true인 경우) | ||||
|                 //데이터베이스에서 해당 정보를 찾아와서 처리해야한다 | ||||
|                 var GInfo = DBM.GetUserGroup(gcode); | ||||
|                 var UInfo = DBM.GetUserInfo(userId); | ||||
|                 var UGInfo = DBM.GetGroupUser(gcode, userId); | ||||
|                  | ||||
|  | ||||
|                 info.Login.no = userId; | ||||
|                 info.Login.nameK = UInfo.name; | ||||
|                 info.Login.dept = GInfo.name; | ||||
|                 info.Login.level = UGInfo.level; | ||||
|                 info.Login.email = UInfo.email; | ||||
|                 info.Login.hp = UInfo.hp; | ||||
|                 info.Login.tel = UInfo.tel; | ||||
|                 info.Login.title = GInfo.name + "(" + UInfo.grade + ")"; | ||||
|                 info.NotShowJobReportview = Pub.setting.NotShowJobreportPRewView; | ||||
|                 info.Login.gcode = gcode;// gcode; | ||||
|                 info.Login.process = UInfo.id == "dev" ? "개발자" : UGInfo.Process; | ||||
|                 info.Login.permission = UGInfo.level; | ||||
|                 info.Login.gpermission = GInfo.perm; | ||||
|                 info.ShowBuyerror = Pub.setting.Showbuyerror;   //210625 | ||||
|  | ||||
|  | ||||
|             //로그인기록저장 | ||||
|             Pub.setting.lastid = userId;// tbID.Text.Trim(); | ||||
|             Pub.setting.lastdpt = GInfo.name; | ||||
|             Pub.setting.lastgcode = GInfo.gcode; | ||||
|             Pub.setting.Save(); | ||||
|                 //로그인기록저장 | ||||
|                 Pub.setting.lastid = userId;// tbID.Text.Trim(); | ||||
|                 Pub.setting.lastdpt = GInfo.name; | ||||
|                 Pub.setting.lastgcode = GInfo.gcode; | ||||
|                 Pub.setting.Save(); | ||||
|             } | ||||
|     | ||||
|  | ||||
|  | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 backuppc
					backuppc