public string GetEmnoFormater() { StSystemConfig config = Parameter.CURRENT_SYSTEM_CONFIG as StSystemConfig; if (config.PsEMNOF.Equals(string.Empty)) { return("N(6)"); } return(config.PsEMNOF); }
private string GetOpenMode() { var q1 = (from p in ((AuthorizationMdl)HttpContext.Session[Constant.SESSION_AUTHORIZATION]).Applications select p.Roles).ToList(); string openMode = string.Empty; StSystemConfig sysCfg = (StSystemConfig)Parameter.CURRENT_SYSTEM_CONFIG; if (sysCfg.PsASTESPI == "N") { openMode = "A"; } else { for (int i = 0; i < q1.Count; i++) { for (int j = 0; j < q1[i].Count; j++) { RoleMdl roleMdl = (RoleMdl)q1[i][j]; if (roleMdl.alep == "Y") { openMode = "B"; } switch (roleMdl.roty) { case "HR Admin": openMode = "A"; break; case "HR Staff": openMode = "A"; break; case "General Staff": if (openMode != "A") { openMode = "B"; } break; } } } } return(openMode); }
public StSystemConfig GetSystemSetting() { try { List <tstsyscfg> lstcfg = GetSelectedRecords <tstsyscfg>(new List <ColumnInfo>() { }).ToList(); StSystemConfig config = new StSystemConfig(); for (int i = 0; i < lstcfg.Count; i++) { string val = lstcfg[i].cfva == null?"":lstcfg[i].cfva.ToUpper(); switch (lstcfg[i].cfnm) { case "AtWDPW": config.AtWDPW = val; break; case "IsOtEntTime": config.IsOtEntTime = val; break; case "LvAOLL": config.LvAOLL = val; break; case "LvCCF": config.LvCCF = val; break; case "LvCLB": config.LvCLB = val; break; case "PsASID": config.PsASID = val; break; case "LvINCV": config.LvINCV = val; break; case "OtCOTB": config.OtCOTB = val; break; case "OtAOOTL": config.OtAOOTL = val; break; case "PsROEIFR": config.PsROEIFR = val; break; case "ScSBAD": config.ScSBAD = val; break; case "PrSWHPD": config.PrSWHPD = val; break; case "PrFLLIPC": config.PrSWHPD = val; break; case "PrFOLIPC": config.PrFOLIPC = val; break; case "PsSFIDF": config.PsSFIDF = val; break; case "PsEMNOF": config.PsEMNOF = val; break; case "PsASTESPI": config.PsASTESPI = val; break; case "PsClubAutoConfirm": config.PsClubAutoConfirm = val; break; case "AtDS": config.AtDS = val; break; case "PrDFPD": config.PrDFPD = val; break; case "PsCKID": config.PsCKID = val; break; case "PrDFCUR": config.PrDFCUR = val; break; case "PsOJST": config.PsOJST = val; break; } } return(config); } catch (UtilException ex) { throw ex; } catch (Exception ex) { throw new UtilException(ex.Message, ex); } }
public string GetRecipicientsEmail(string _emno) { List <string> lstRole = new List <string>(); vw_employment emp = GetSelectedObject <vw_employment>(new List <ColumnInfo>() { new ColumnInfo() { ColumnName = "emno", ColumnValue = _emno } }); if (emp != null) { for (int i = 0; i < lstAlarmSubs.Count; i++) { PropertyInfo prop = emp.GetType().GetProperty(lstAlarmSubs[i].attr); if (prop != null) { if (prop.GetValue(emp, null).ToString() == lstAlarmSubs[i].atva.Trim()) { lstRole.Add("[" + lstAlarmSubs[i].alpf + "]"); } } } } string strRole = lstRole.ToArray().ToString(); StSystemConfig sysCfg = (StSystemConfig)Parameter.CURRENT_SYSTEM_CONFIG; string strReci = string.Empty; if (sysCfg.ScSBAD == "Y") { var q = (from p in lstUserRoleAD where strRole.Contains("[" + p.alpf + "]") == true select p).ToList(); for (int i = 0; i < q.Count; i++) { string email = q[i].cota1.Trim() == string.Empty ? q[i].cota2.Trim() : q[i].cota1.Trim(); if (email != string.Empty) { strReci += (strReci.Trim() == string.Empty) ? "" : "," + email; } } } else { var q = (from p in lstUserRoleNonAD where strRole.Contains("[" + p.alpf + "]") == true select p).ToList(); for (int i = 0; i < q.Count; i++) { string email = q[i].cota1.Trim() == string.Empty ? q[i].cota2.Trim() : q[i].cota1.Trim(); if (email != string.Empty) { strReci += (strReci.Trim() == string.Empty) ? "" : "," + email; } } } return(strReci); }
public string GetRecipicientsBoard(string _emno) { //List<string> lstRole = new List<string>(); vw_employment emp = GetSelectedObject <vw_employment>(new List <ColumnInfo>() { new ColumnInfo() { ColumnName = "emno", ColumnValue = _emno } }); string strRole = string.Empty; if (emp != null) { for (int i = 0; i < lstAlarmSubs.Count; i++) { if (lstAlarmSubs[i].attr == "*") { //订阅全部员工的消息 strRole += (strRole == string.Empty ? "" : ",") + "[" + lstAlarmSubs[i].alpf + "]"; } else { PropertyInfo prop = emp.GetType().GetProperty(lstAlarmSubs[i].attr); if (prop != null) { object v = prop.GetValue(emp, null); if (v != null) { if (v.ToString() == lstAlarmSubs[i].atva.Trim()) { strRole += (strRole == string.Empty ? "" : ",") + "[" + lstAlarmSubs[i].alpf + "]"; } } } } } } StSystemConfig sysCfg = (StSystemConfig)Parameter.CURRENT_SYSTEM_CONFIG; string strReci = string.Empty; if (sysCfg.ScSBAD == "Y") { var q = (from p in lstUserRole where strRole.Contains("[" + p.alpf + "]") == true select p).ToList(); for (int i = 0; i < q.Count; i++) { if (q[i].sfid != null && q[i].sfid.Trim() != string.Empty) { strReci += (strReci.Trim() == string.Empty ? "" : ",") + q[i].sfid; } } } else { var q = (from p in lstUser where strRole.Contains("[" + p.alpf + "]") == true select p).ToList(); for (int i = 0; i < q.Count; i++) { if (q[i].sfid != null && q[i].sfid.Trim() != string.Empty) { strReci += (strReci.Trim() == string.Empty ? "" : ",") + q[i].sfid; } } } return(strReci); }