Пример #1
0
        private void btnReport_Click(object sender, EventArgs e)
        {
            if (txtEcodeSearch.Text != "")
            {
                oHRInfo = new HRInfo();
                Reports.Employee.DSEmployee oDSEmployee = new SSCRM.Reports.Employee.DSEmployee();
                DataSet ds = oHRInfo.GetEoraCode(Convert.ToInt32(txtEcodeSearch.Text));

                CommonData.ViewReport = "SSHR_HRINFORMATION";
                oDSEmployee.MainHead1.Merge(ds.Tables[0]);
                oDSEmployee.Education.Merge(ds.Tables[1]);
                oDSEmployee.ShortCourse.Merge(ds.Tables[2]);
                oDSEmployee.Curricular.Merge(ds.Tables[3]);
                oDSEmployee.Family.Merge(ds.Tables[4]);
                oDSEmployee.Reference.Merge(ds.Tables[5]);
                oDSEmployee.Experience.Merge(ds.Tables[6]);
                oDSEmployee.Documents.Merge(ds.Tables[8]);
                oDSEmployee.Induction.Merge(ds.Tables[9]);
                oDSEmployee.EORA.Merge(ds.Tables[10]);
                DataTable dtD = new DataTable();
                dtD.Columns.Add("CM_COMPANY_NAME");
                dtD.Columns.Add("BRANCH_NAME");
                if (ds.Tables[11].Rows.Count > 0)
                {
                    dtD.Rows.Add(new Object[] { ds.Tables[11].Rows[0]["CM_COMPANY_NAME"], ds.Tables[11].Rows[0]["BRANCH_NAME"] });
                }
                oDSEmployee.MainHead11.Merge(dtD);
                ReportViewer chldRV = new ReportViewer(oDSEmployee);
                chldRV.Show();
            }
        }