Пример #1
0
        public DataTable GetHrRightApplyPrintInfo(string billno)
        {
            DataTable dt = new DataTable();

            dt.TableName = "PrintInfo";

            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("orgname", Type.GetType("System.String")));
            dt.Columns.Add(new DataColumn("rolename", Type.GetType("System.String")));

            DataTable applicantDt = dac.GetApplicantDt(billno);
            DataTable orgDt       = dac.GetSelectOrgDt(billno);
            DataTable roledt      = dac.GetRoleDtByBillNo(billno);

            for (int i = 0; i < roledt.Rows.Count; i++)
            {
                DataRow   dr   = dt.NewRow();
                DataRow[] rows = applicantDt.Select("userid = " + roledt.Rows[i]["userid"]);
                dr["hrname"]  = rows[0]["hrname"];
                dr["dept"]    = rows[0]["dept"];
                dr["station"] = rows[0]["station"];
                rows          = orgDt.Select("userid = " + roledt.Rows[i]["userid"] + " and orgid = " + roledt.Rows[i]["orgid"]);
                if (rows.Length == 0)
                {
                    continue;
                }
                string applicantorg = string.Empty;
                if (rows[0]["applicantorg"].ToString() == "1")
                {
                    applicantorg = "登录组织/信息组织";
                }
                if (rows[0]["applicantorg"].ToString() == "2")
                {
                    applicantorg = "信息组织";
                }
                dr["orgname"]  = rows[0]["orgname"] + "[" + applicantorg + "]";
                dr["rolename"] = roledt.Rows[i]["rolename"];
                dt.Rows.Add(dr);
            }

            return(dt);
        }
Пример #2
0
 public DataTable GetEditApplicantInfo(string billno)
 {
     return(dac.GetApplicantDt(billno));
 }