public bool LocalLoadANDApprLineData(string strApprLineData, string strUserSeq) { LinkedList <ApproverInfo> apprInfo = new LinkedList <ApproverInfo>(); if (strApprLineData.Equals("")) { return(false); } if (!strApprLineData.Contains(strUserSeq)) { return(false); } char sep = (char)':'; string[] strApprList; string[] strApprLineDataList = strApprLineData.Split('\u0002'); if (strApprLineDataList.Length == 1) { string[] strSplit = strApprLineData.Split(sep); if (strSplit.Length == 1) { return(false); } if (!strSplit[0].Equals(strUserSeq)) { return(false); } strApprList = strSplit[1].Split('\u0003'); if (strApprList.Length <= 0) { return(false); } for (int i = 0; i < strApprList.Length; i++) { string[] strApprData = strApprList[i].Split('\u0001'); if (strApprData.Length <= 0) { continue; } ApproverInfo apprdata = new ApproverInfo(); apprdata.Name = strApprData[0]; apprdata.Grade = strApprData[1]; apprdata.DeptName = strApprData[2]; apprdata.UserSeq = strApprData[3]; apprdata.Index = strApprData[4]; if (!strApprData[5].Equals("")) { apprdata.nApprPos = Convert.ToInt32(strApprData[5]); } if (!strApprData[6].Equals("")) { apprdata.nDlpApprove = Convert.ToInt32(strApprData[6]); } apprInfo.AddLast(apprdata); } CopyApprLine(apprInfo); return(true); } bool bFind = false; string strApprLine = ""; for (int i = 0; i < strApprLineDataList.Length; i++) { string[] strSplit = strApprLineDataList[i].Split(sep); if (strSplit.Length <= 1) { continue; } if (strSplit[0].Equals(strUserSeq)) { strApprLine = strSplit[1]; bFind = true; break; } } if (!bFind) { apprInfo = null; return(false); } strApprList = strApprLine.Split('\u0003'); if (strApprList.Length <= 0) { return(false); } for (int i = 0; i < strApprList.Length; i++) { string [] strApprData = strApprList[i].Split('\u0001'); if (strApprData.Length <= 0) { continue; } ApproverInfo apprdata = new ApproverInfo(); apprdata.Name = strApprData[0]; apprdata.Grade = strApprData[1]; apprdata.DeptName = strApprData[2]; apprdata.UserSeq = strApprData[3]; apprdata.Index = strApprData[4]; if (!strApprData[5].Equals("")) { apprdata.nApprPos = Convert.ToInt32(strApprData[5]); } if (!strApprData[6].Equals("")) { apprdata.nDlpApprove = Convert.ToInt32(strApprData[6]); } apprInfo.AddLast(apprdata); } CopyApprLine(apprInfo); return(true); }
public LinkedList <ApproverInfo> GetDeptApproverInfoData() { List <Dictionary <int, string> > listDicdata = null; //listDicdata = GetSvrRecordData("VALUE"); listDicdata = GetSvrRecordData("RECORD"); if ((listDicdata == null) || (listDicdata.Count <= 0)) { return(null); } ApproverSearch = new LinkedList <ApproverInfo>(); string strDeptName = ""; string strGrade = ""; string strUserName = ""; string strUserSeq = ""; string strApprPos = ""; string strDlpAppr = ""; string stUserId = ""; string stDeptCode = ""; Dictionary <int, string> dic = null; ApproverInfo apprInfo = null; for (int i = 0; i < listDicdata.Count; i++) { dic = listDicdata[i]; if (dic == null) { continue; } apprInfo = new ApproverInfo(); apprInfo.Index = String.Format("{0,3}", i + 1); // Index if (!dic.TryGetValue(0, out stUserId)) //유저ID { apprInfo.APPR_USERID = "-"; } else { apprInfo.APPR_USERID = dic[0]; } if (!dic.TryGetValue(1, out strUserName)) // 이름 { apprInfo.Name = "-"; } else { apprInfo.Name = dic[1]; } if (!dic.TryGetValue(2, out stDeptCode)) // 부서코드 { apprInfo.APPR_TEAMCODE = "-"; } else { apprInfo.APPR_TEAMCODE = dic[2]; } if (!dic.TryGetValue(3, out strDeptName)) // 부서이름 { apprInfo.DeptName = "-"; } else { apprInfo.DeptName = dic[3]; } if (!dic.TryGetValue(5, out strGrade)) // 직위 { apprInfo.Grade = "-"; } else { apprInfo.Grade = dic[5]; } if (!dic.TryGetValue(7, out strApprPos)) // ApprovePos { apprInfo.nApprPos = 0; } else { string temp = dic[7]; if (!temp.Equals("")) { apprInfo.nApprPos = Convert.ToInt32(temp); } } if (!dic.TryGetValue(8, out strUserSeq)) // User Sequence { apprInfo.UserSeq = "-"; } else { apprInfo.UserSeq = dic[8]; } if (!dic.TryGetValue(9, out strDlpAppr)) // 보안결재자 여부 { apprInfo.nDlpApprove = 0; } else { string temp = dic[9]; if (!temp.Equals("")) { apprInfo.nDlpApprove = Convert.ToInt32(temp); } } ApproverSearch.AddLast(apprInfo); } return(ApproverSearch); }
public LinkedList <ApproverInfo> GetConvertBaseApprAndLineData() { List <string> strListUserName = GetBaseApprAndLineName(); // 결재자 이름 List List <string> strListUserSeq = GetBaseApprAndLineSeq(); // 결재자 Seq List List <string> strListDeptName = GetBaseApprAndLineDeptName(); // 결재자 부서이름 List List <string> strListUserRank = GetBaseApprAndLineRank(); // 결재자 이름 직위 List if ((strListUserName == null) && (strListUserName.Count <= 0)) { return(null); } ApproverInfo apprInfo = null; for (int i = 0; i < strListUserName.Count; i++) { apprInfo = new ApproverInfo(); apprInfo.Index = String.Format("{0,3}", i + 1); // Index if (!(strListUserName[i].Equals(""))) // 결재자 이름 { apprInfo.Name = strListUserName[i]; } else { apprInfo.Name = "-"; } if (!(strListUserSeq[i].Equals(""))) // 결재자 Seq { apprInfo.UserSeq = strListUserSeq[i]; } else { apprInfo.UserSeq = "-"; } if (!(strListDeptName[i].Equals(""))) // 부서이름 { apprInfo.DeptName = strListDeptName[i]; } else { apprInfo.DeptName = "-"; } if (!(strListUserRank[i].Equals(""))) // 직위 { apprInfo.Grade = strListUserRank[i]; } else { apprInfo.Grade = "-"; } apprInfo.nApprPos = 1; apprInfo.nDlpApprove = 0; ApproverSelect.AddLast(apprInfo); } return(ApproverSelect); }