Exemplo n.º 1
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            var result = MessageBox.Show("Bạn có muốn lưu sự thay đổi xuống cơ sở dữ liệu hay không?", "Lưu thông tin", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                DataUpdate <HeThong_View> listUpdate = gridThaoTac.update();

                if (HeThong_DAL.saves(listUpdate))
                {
                    MessageBox.Show("Lưu thông tin thành công!");
                    InitVal();
                }
                else
                {
                    MessageBox.Show("Lưu thông tin thất bại!");
                }
            }
        }
Exemplo n.º 2
0
 private void setDataLoad()
 {
     phanTramChietKhau_DB = decimal.Parse(HeThong_DAL.getHeThongByMa("HT001").GiaTri);
     phanTramChietKhau    = 0;
     txtMaPhieu.Text      = hoadon.MaHoaDon;
     txtNhanVien.Text     = hoadon.NhanVien;
     dateNgayBan.Value    = hoadon.NgayLap;
     txtGhiChu.Text       = hoadon.GhiChu;
     setGroupBox_KhachHang();
     setGridCtrl_LinhKien();
     if (isNew)
     {
         ls_cthd = new List <CT_HoaDon_View>();
     }
     else
     {
         ls_cthd = CT_HoaDon_DAL.get_CTHoaDon_By_MaHD_TT01(hoadon.MaHoaDon);
     }
     gridControl1.DataSource = ls_cthd;
     count_TongTien();
 }
Exemplo n.º 3
0
 private void InitVal()
 {
     gridControl1.DataSource = HeThong_DAL.getAll();
     gridThaoTac             = new GridHelper <HeThong_View>(gridControl1);
     count_row = 0;
 }