public List <ready> ReadyDtToList(string strWorkShopGUID, string strTmJiaoLuGUIDs) { DataTable dt = this.GetReadyList(strWorkShopGUID, strTmJiaoLuGUIDs); List <ready> lready = new List <ready>(); List <trainMan> Ltm = new List <trainMan>(); string strAllZhiWei = ""; for (int i = 0; i < dt.Rows.Count; i++) { string strTrainmanJiaoluGUID = dt.Rows[i]["strTrainmanJiaoluGUID"].ToString(); string strTrainmanJiaoluName = dt.Rows[i]["strTrainmanJiaoluName"].ToString(); string strGn = getTG(dt.Rows[i]["strTrainmanNumber"].ToString()); string strTrainmanID = dt.Rows[i]["strTrainmanGUID"].ToString(); string strTrainmanNumber = ChangeStrTn(dt.Rows[i]["strTrainmanNumber"].ToString()); string strTrainmanName = dt.Rows[i]["strTrainmanName"].ToString(); string nPostID = dt.Rows[i]["nPostID"].ToString(); ready ready = new ready(); ready.strTrainmanJiaoluGUID = strTrainmanJiaoluGUID; ready.strTrainmanJiaoluName = strTrainmanJiaoluName; trainMan tm = new trainMan(); tm.tmGUID = strTrainmanID; tm.tmName = strTrainmanName; tm.tmNumber = strTrainmanNumber; tm.tmGuideGroupName = strGn; tm.nPostID = nPostID; if (!strAllZhiWei.Contains("'" + strTrainmanJiaoluGUID + "'")) { Ltm = new List <trainMan>(); Ltm.Add(tm); } else { Ltm.Add(tm); } ready.trainMan = Ltm; strAllZhiWei += "'" + strTrainmanJiaoluGUID + "',"; if (i + 1 < dt.Rows.Count) { if (!strAllZhiWei.Contains("'" + dt.Rows[i + 1]["strTrainmanJiaoluGUID"].ToString() + "'")) { lready.Add(ready); } } else { lready.Add(ready); } } return(lready); }
public List <ganBu> GanBuDtToList(string strWorkShopGUID) { DataTable dt = this.GetGanBuList(strWorkShopGUID); List <ganBu> lgb = new List <ganBu>(); List <trainMan> Ltm = new List <trainMan>(); string strAllZhiWei = ""; for (int i = 0; i < dt.Rows.Count; i++) { string strTypeID = dt.Rows[i]["nTypeID"].ToString(); string strTypeName = dt.Rows[i]["strTypeName"].ToString(); string strTrainmanID = dt.Rows[i]["strTrainmanID"].ToString(); string strGn = getTG(dt.Rows[i]["strTrainmanNumber"].ToString()); string strTrainmanNumber = ChangeStrTn(dt.Rows[i]["strTrainmanNumber"].ToString()); string strTrainmanName = dt.Rows[i]["strTrainmanName"].ToString(); string nPostID = dt.Rows[i]["nPostID"].ToString(); ganBu gb = new ganBu(); gb.strTypeID = strTypeID; gb.strTypeName = strTypeName; trainMan tm = new trainMan(); tm.tmGUID = strTrainmanID; tm.tmName = strTrainmanName; tm.tmNumber = strTrainmanNumber; tm.tmGuideGroupName = strGn; tm.nPostID = nPostID; if (!strAllZhiWei.Contains("'" + strTypeID + "'")) { Ltm = new List <trainMan>(); Ltm.Add(tm); } else { Ltm.Add(tm); } gb.trainMan = Ltm; strAllZhiWei += "'" + strTypeID + "',"; if (i + 1 < dt.Rows.Count) { if (!strAllZhiWei.Contains("'" + dt.Rows[i + 1]["nTypeID"].ToString() + "'")) { lgb.Add(gb); } } else { lgb.Add(gb); } } return(lgb); }
public List <neiWaiQin> DutyUserDtToList(string strWorkShopGUID) { DataTable dt = this.GetDutyUserList(strWorkShopGUID); List <neiWaiQin> lnwq = new List <neiWaiQin>(); List <trainMan> Ltm = new List <trainMan>(); string strAllZhiWei = ""; for (int i = 0; i < dt.Rows.Count; i++) { string strTypeId = dt.Rows[i]["strTypeId"].ToString(); string strTrainmanNumber = dt.Rows[i]["strNumber"].ToString(); string strTrainmanName = dt.Rows[i]["strName"].ToString(); string strTypeName = ""; if (strTypeId == "1") { strTypeName = "甲"; } else if (strTypeId == "2") { strTypeName = "乙"; } else if (strTypeId == "3") { strTypeName = "丙"; } else if (strTypeId == "4") { strTypeName = "丁"; } else if (strTypeId == "5") { strTypeName = "备"; } else { strTypeName = ""; } neiWaiQin nwq = new neiWaiQin(); nwq.strTypeID = strTypeId; nwq.strTypeName = strTypeName; trainMan tm = new trainMan(); tm.tmName = strTrainmanName; tm.tmNumber = strTrainmanNumber; if (!strAllZhiWei.Contains("'" + strTypeId + "'")) { Ltm = new List <trainMan>(); Ltm.Add(tm); } else { Ltm.Add(tm); } nwq.trainMan = Ltm; strAllZhiWei += "'" + strTypeId + "',"; if (i + 1 < dt.Rows.Count) { if (!strAllZhiWei.Contains("'" + dt.Rows[i + 1]["strTypeId"].ToString() + "'")) { lnwq.Add(nwq); } } else { lnwq.Add(nwq); } } return(lnwq); }
public List <unRun> unRunDtToList(string strWorkShopGUID, string strTmJiaoLuGUIDs) { DataTable dt = this.GetAskLeaveList(strWorkShopGUID, strTmJiaoLuGUIDs); List <unRun> lunRun = new List <unRun>(); List <trainMan> Ltm = new List <trainMan>(); string strAllZhiWei = ""; for (int i = 0; i < dt.Rows.Count; i++) { //请假类别的GUID和名称 string strLeaveTypeGUID = dt.Rows[i]["strLeaveTypeGUID"].ToString(); string strLeaveTypeName = dt.Rows[i]["strLeaveTypeName"].ToString(); //人员的相关信息 string strTrainmanID = dt.Rows[i]["strTrainmanGUID"].ToString(); string strTrainmanNumber = ChangeStrTn(dt.Rows[i]["strTrainmanNumber"].ToString()); string strTrainmanName = dt.Rows[i]["strTrainmanName"].ToString(); string nPostID = dt.Rows[i]["nPostID"].ToString(); string strGn = getTG(dt.Rows[i]["strTrainmanNumber"].ToString()); unRun unRun = new unRun(); unRun.strLeaveTypeGUID = strLeaveTypeGUID; unRun.strLeaveTypeName = strLeaveTypeName; //实力化人员,并赋值 trainMan tm = new trainMan(); tm.tmGUID = strTrainmanID; tm.tmName = strTrainmanName; tm.tmNumber = strTrainmanNumber; tm.nPostID = nPostID; tm.tmGuideGroupName = strGn; if (!strAllZhiWei.Contains("'" + strLeaveTypeGUID + "'")) { Ltm = new List <trainMan>(); Ltm.Add(tm); } else { Ltm.Add(tm); } unRun.trainMan = Ltm; strAllZhiWei += "'" + strLeaveTypeGUID + "',"; if (i + 1 < dt.Rows.Count) { if (!strAllZhiWei.Contains("'" + dt.Rows[i + 1]["strLeaveTypeGUID"].ToString() + "'")) { lunRun.Add(unRun); } } else { lunRun.Add(unRun); } } return(lunRun); }