Exemple #1
0
        private void frmByDept_Load(object sender, EventArgs e)
        {
            this.LstDeptID   = new List <string>();
            this.LstDeptName = new List <string>();
            //clsDcl_Charge clsDcl_Charge = new clsDcl_Charge();
            clsHISReportZy_Supported_Svc svc = (clsHISReportZy_Supported_Svc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsHISReportZy_Supported_Svc));
            long      num       = 0;
            DataTable dataTable = null;

            if (this.area == 1)
            {
                num = svc.GetArea(out dataTable);
            }
            else
            {
                num = svc.GetDeptArea(out dataTable);
            }

            if (num > 0L)
            {
                int i = 0;
                while (i < dataTable.Rows.Count)
                {
                    DataRow dataRow = dataTable.Rows[i];
                    if (this.LimitDeptIDArr.Count <= 0 || this.LimitDeptIDArr.IndexOf(dataRow["deptid_chr"].ToString()) >= 0)
                    {
                        string[] values = { "F", Convert.ToString(i + 1), dataRow["code_vchr"].ToString().Trim(), dataRow["deptname_vchr"].ToString().Trim() };
                        int      index  = this.dtDept.Rows.Add(values);
                        this.dtDept.Rows[index].Tag = dataRow;
                    }
                    i++;
                }
            }
            this.txtVal.Focus();
        }