public void GetAllList_BRANCH()
        {
            Class.PhongBan dm = new Class.PhongBan();
            DataTable      dt = dm.LoadDanhSachChiNhanh();

            if (dt.Rows.Count > 0)
            {
                txtBranchName.Properties.DataSource    = dt;
                txtBranchName.Properties.DisplayMember = "BranchName";
                txtBranchName.Properties.ValueMember   = "BranchCode";
            }
        }
        public void GetListDEPARTMENTByBranch(string strCode)
        {
            Class.PhongBan dm = new Class.PhongBan();
            dm.BranchCode = strCode;
            DataTable dt = dm.LoadDanhSachPhongBanThuocChiNhanh();

            if (dt.Rows.Count > 0)
            {
                txtDepartment.Properties.DataSource    = dt;
                txtDepartment.Properties.DisplayMember = "DepartmentName";
                txtDepartment.Properties.ValueMember   = "DepartmentCode";
            }
        }
Exemplo n.º 3
0
        private void btnExportExcelTemplate_Click(object sender, EventArgs e)
        {
            //
            SaveFileDialog saveFile = new SaveFileDialog();

            saveFile.Filter = "Excel File|*.xlsx";
            saveFile.Title  = "Exprot to Excel File";
            saveFile.ShowDialog();
            if (saveFile.FileName != "")
            {
                Waiting.ShowWaitForm();
                string         Link_Template = Application.StartupPath + "\\Templates\\Templates_ChiTietChamCong.xlsx";
                Class.PhongBan pb            = new Class.PhongBan();
                DataTable      dtpb          = pb.GetAllList_DEPARTMENT();

                if (System.IO.File.Exists(Link_Template))
                {
                    // Class.ExportDataToExcel.ExportExcel_CTCC(dtxp, dtpb, 4, "A", true, Link_Template, saveFile.FileName, false);

                    Waiting.CloseWaitForm();
                }
            }
        }