Example #1
0
 private void SyncVTToolStripMenuItem_Click(object sender, EventArgs e)
 {
     LoadWaitFrm.Loading(this, () =>
     {
         List <VatTu> vatTus = new List <VatTu>();
         _VatTuHelper.XoaDuLieu();
         vatTus = _VatTuBUS.GetAllVT();
         foreach (VatTu item in vatTus)
         {
             _VatTuHelper.ThemDuLieu(item);
         }
     }, "Đồng bộ vật tư");
 }
Example #2
0
 private void SyncDSToolStripMenuItem_Click(object sender, EventArgs e)
 {
     LoadWaitFrm.Loading(this, () =>
     {
         List <DungSaiNCC> dungSaiNCCs = new List <DungSaiNCC>();
         _dungSaiNCCHelper.XoaDuLieu();
         dungSaiNCCs = _dungSaiNCCBUS.GetAllDungSai();
         foreach (DungSaiNCC item in dungSaiNCCs)
         {
             _dungSaiNCCHelper.ThemDuLieu(item);
         }
     }, "Đồng bộ dung sai");
 }
Example #3
0
 private void btnXuLy_Click(object sender, EventArgs e)
 {
     LoadWaitFrm.Loading(this, () =>
     {
         if (zVendors.Count > 0)
         {
             TinhDungSai(ref zVendors);
             ExportExcel(_convertData.ConvertZVendorsToDataTable(zVendors));
         }
         else
         {
             MessageBox.Show("Không tìm thấy dữ liệu, vui lòng kiểm tra lại!", "Thông báo");
         }
     }, "Export");
 }
Example #4
0
 private void btnImportFilePath_Click(object sender, EventArgs e)
 {
     LoadWaitFrm.Loading(this, () =>
     {
         OpenFileDialog openFileDialog = new OpenFileDialog();
         DialogResult dialogResult     = openFileDialog.ShowDialog();
         txtImportFilePath.Text        = openFileDialog.FileName;
         if (string.IsNullOrEmpty(txtImportFilePath.Text))
         {
             MessageBox.Show("Thiếu đường dẫn mở file!", "Thông báo");
         }
         else
         {
             zVendors = _zVendorHelper.GetAll(txtImportFilePath.Text);
         }
     }, "Import");
 }