private void gvNhomNguoiDung_DoubleClick(object sender, EventArgs e)
        {
            Point       pt      = gNhomNguoiDung.PointToClient(MousePosition);
            GridHitInfo hitInfo = gvNhomNguoiDung.CalcHitInfo(pt);

            if (hitInfo.InRow)
            {
                PheDuyetGiaBanInfor     bg  = (PheDuyetGiaBanInfor)gvNhomNguoiDung.GetRow(hitInfo.RowHandle);
                frmHT_AddPheDuyetGiaBan frm = new frmHT_AddPheDuyetGiaBan(bg);
                frm.ShowDialog();
            }
        }
        private void btnAddNND_Click(object sender, EventArgs e)
        {
            if (gvNhomSanPham.FocusedRowHandle < 0)
            {
                return;
            }
            PheDuyetNganhHangInfor pqNganhHang         = (PheDuyetNganhHangInfor)gvNhomSanPham.GetRow(gvNhomSanPham.FocusedRowHandle);
            PheDuyetGiaBanInfor    pheDuyetGiaBanInfor = new PheDuyetGiaBanInfor()
            {
                MaLinhVuc    = pqNganhHang.MaLinhVuc,
                TenLinhVuc   = pqNganhHang.TenLinhVuc,
                MaNganhHang  = pqNganhHang.MaNganhHang,
                TenNganhHang = pqNganhHang.TenNganhHang
            };
            frmHT_AddPheDuyetGiaBan frm = new frmHT_AddPheDuyetGiaBan(pheDuyetGiaBanInfor);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                ((BindingList <PheDuyetGiaBanInfor>)gNhomNguoiDung.DataSource).Add(frm.PheDuyetGiaBan);
                ((BindingList <PheDuyetGiaBanInfor>)gNhomNguoiDung.DataSource).ResetBindings();
            }
        }
 public void UpdatePheDuyetGiaBan(PheDuyetGiaBanInfor pdGiaBanInfor)
 {
     ExecuteCommand(Declare.StoreProcedureNamespace.spPheDuyetGiaNganhPQUpdate, pdGiaBanInfor.IdNhomNguoiDung, pdGiaBanInfor.MaLinhVuc,
                    pdGiaBanInfor.MaNganhHang, pdGiaBanInfor.DungSaiMIN, pdGiaBanInfor.DungSaiMAX, pdGiaBanInfor.DoUuTien);
 }
Exemplo n.º 4
0
 public static void UpdatePheDuyetGiaBan(PheDuyetGiaBanInfor pheDuyetGiaBanInfor)
 {
     PhanQuyenNganhHangDAO.Instance.UpdatePheDuyetGiaBan(pheDuyetGiaBanInfor);
 }
Exemplo n.º 5
0
 public frmHT_AddPheDuyetGiaBan(PheDuyetGiaBanInfor qpPheDuyet)
 {
     InitializeComponent();
     Common.LoadStyle(this);
     PheDuyetGiaBan = qpPheDuyet;
 }