Example #1
0
        private void btUpdate_Click(object sender, EventArgs e)
        {
            DataGridViewRow selectedRow = this.dataGridView1.CurrentRow;

            load_bindingData();
            try
            {
                DAOImplement_UpdateVatTu.update_thongtin_thau(Current_VatTu.DVTT, Current_VatTu.TenVatTu, Current_VatTu.MaHoatChat, Current_VatTu.MaDuongDung, Current_VatTu.SoDK, Current_VatTu.DonGia, Current_VatTu.SoQuyetDinh, Current_VatTu.GoiThau, Current_VatTu.NhomThau, Current_VatTu.SoCVBHXH);

                lbState.Text            = "Đã Cập nhật thành công";
                Current_VatTu.DaCapNhap = 1;
                updateMainForm();
            } catch
            {
                lbState.Text = "Kiểm tra lại kết nối đến db, chưa cập nhập được";
            }
        }
Example #2
0
        async private void btUpdateVatTu_Click(object sender, EventArgs e)
        {
            //  VatTu new_vattu = new VatTu();

            // formUpdateAuto updateForm = new formUpdateAuto(new_vattu);
            //  updateForm.updateMainForm = this.handle_updateMainForm;
            // updateForm.Current_VatTu = this.current_vattu;
            //    updateForm.ShowDialog();
            btUpdateVatTu.Enabled = false;
            lbStateAuto.Text      = "Đang update vật tư tương ứng 1-1 giữa dữ liệu của đơn vị và của BHXH theo 5 trường: 1.tên vật tư, 2.mã hoạt chất, 3.mã đường dùng, 4.số đăng ký, 5.đơn giá";
            //progressBar1.Enabled = true;
            progressBar1.Value = 30;
            await Task.Run(() => DAOImplement_UpdateVatTu.auto_update_thongtin_thau_one_one(this.dvtt));

            lbStateAuto.Text      = "đã cập nhâp thành công vật tư tương ứng 1-1 giữa dữ liệu của đơn vị và của BHXH theo 5 trường: 1.tên vật tư, 2.mã hoạt chất, 3.mã đường dùng, 4.số đăng ký, 5.đơn giá";
            progressBar1.Value    = 100;
            btUpdateVatTu.Enabled = true;
        }