Esempio n. 1
0
        public DataTable GetApplicantInfo(string code)
        {
            DataTable dt = new DataTable();

            dt.TableName = "ApplicantInfo";

            dt.Columns.Add(new DataColumn("hrid", Type.GetType("System.String")));
            dt.Columns.Add(new DataColumn("userid", Type.GetType("System.String")));
            dt.Columns.Add(new DataColumn("hrname", Type.GetType("System.String")));
            dt.Columns.Add(new DataColumn("dept", Type.GetType("System.String")));
            dt.Columns.Add(new DataColumn("station", Type.GetType("System.String")));
            dt.Columns.Add(new DataColumn("remark", Type.GetType("System.String")));

            string[] hrids = code.Split(',');
            for (int i = 0; i < hrids.Length; i++)
            {
                DataRow   dr   = dt.NewRow();
                DataTable hrDt = dac.GetHrNameDeptDt(hrids[i]);
                dr["hrid"]    = hrids[i];
                dr["userid"]  = dac.GetUserIdByHrid(hrids[i]);
                dr["hrname"]  = hrDt.Rows[0]["cname"];
                dr["dept"]    = hrDt.Rows[0]["oname"];
                dr["station"] = dac.GetHrStation(hrids[i]);
                dt.Rows.Add(dr);
            }

            return(dt);
        }