예제 #1
0
 private void grvDatCho_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == Convert.ToChar(Keys.Enter))
     {
         new frmTongHopThem((GVDC.GetRow(GVDC.GetSelectedRows()[0]) as O_GIAODICH)).ShowDialog(ParentForm);
     }
 }
예제 #2
0
        private void grvDatCho_DoubleClick(object sender, EventArgs e)
        {
            O_GIAODICH giaoDichO = (GVDC.GetRow(GVDC.GetSelectedRows()[0]) as O_GIAODICH);

            if (giaoDichO.LoaiGiaoDich != 10)
            {
                new frmTongHopThem(giaoDichO).ShowDialog(ParentForm);
            }
        }
예제 #3
0
        private void btnXDC_ItemClick(object sender, ItemClickEventArgs e)
        {
            O_GIAODICH GD = (GVDC.GetRow(GVDC.GetSelectedRows()[0]) as O_GIAODICH);

            switch (GD.LoaiGiaoDich)
            {
            case 1:
            case 0:
                if (!DuLieuTaoSan.Q.KhacXoa)
                {
                    return;
                }
                break;

            default:
                if (!DuLieuTaoSan.Q.KhacAdminXoa)
                {
                    return;
                }
                break;
            }

            if (XuLyGiaoDien.ThongBao("giao dịch", new D_GIAODICH().Xoa(GD.ID) > 0, true))
            {
                string NoiDung = string.Format("Xóa GD ", GD.GhiChu);
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("FormName", Text);
                dic.Add("MaCho", GD.MaCho);
                dic.Add("NoiDung", NoiDung);
                dic.Add("NVGiaoDich", DuLieuTaoSan.NV.ID);
                dic.Add("LoaiKhachHang", GD.LoaiKhachHang);
                dic.Add("Ma", GD.IDKhachHang);
                new D_LS_GIAODICH().ThemMoi(dic);
                NapDatCho();
            }
            else
            {
                XuLyGiaoDien.Alert("Xóa không thành công", Form_Alert.enmType.Error);
            }
        }