protected override void EditChungTuInstance(ChungTuBanHangInfor ct) { if (ct.LoaiChungTu == (int)TransactionType.DON_HANG_BU_KHUYEN_MAI) { //if (!Common.IsOpenForm("frmBH_LapDonHangBanKhuyenMai")) //{ // frmBH_LapDonHangBanKhuyenMai frm = new frmBH_LapDonHangBanKhuyenMai(ct); // frm.Show(); //} Common.SetFormStatus("frmBH_LapDonHangBanKhuyenMai", false); frmBH_LapDonHangBanKhuyenMai frm = new frmBH_LapDonHangBanKhuyenMai(ct); frm.ShowDialog(); } else { //if (!Common.IsOpenForm("frmBH_LapDonHangBan")) //{ // frmBH_LapDonHangBan frm = new frmBH_LapDonHangBan(ct); // frm.Show(); //} Common.SetFormStatus("frmBH_LapDonHangBanTheTVien", false); frmBH_LapDonHangBanTheTVien frm = new frmBH_LapDonHangBanTheTVien(ct); frm.ShowDialog(); } }
private void btnLapDonHangBan_Click(object sender, EventArgs e) { if (gvListChungTu.FocusedRowHandle < 0) { return; } ChungTuBanHangInfor ct = (ChungTuBanHangInfor)gvListChungTu.GetRow(gvListChungTu.FocusedRowHandle); if (ct != null) { frmBH_LapDonHangBanTheTVien frm = new frmBH_LapDonHangBanTheTVien(ct); frm.HideMenu(true); frm.ShowDialog(); } }
protected override void AddChungTuInstance() { //if (!Common.IsOpenForm("frmBH_LapDonHangBan")) //{ // frmBH_LapDonHangBan frm = new frmBH_LapDonHangBan(); // frm.Show(); //} if (XuatBuKhuyenMai) { Common.SetFormStatus("frmBH_LapDonHangBanKhuyenMai", false); frmBH_LapDonHangBanKhuyenMai frm = new frmBH_LapDonHangBanKhuyenMai(); frm.ShowDialog(); } else { Common.SetFormStatus("frmBH_LapDonHangBanTheTVien", false); frmBH_LapDonHangBanTheTVien frm = new frmBH_LapDonHangBanTheTVien(); frm.ShowDialog(); } }
private void EditOrder(int rowHandle) { return; if (rowHandle < 0) { return; } ChungTuBanHangInfor ct = (ChungTuBanHangInfor)gvListChungTu.GetRow(rowHandle); if ((int)LoaiGiaoDich > 0 && ct != null) { this.DialogResult = DialogResult.OK; } else if (ct != null) { if (ct.TrangThai == (int)OrderStatus.TAO_DON_HANG_ONLINE || ct.TrangThai == (int)OrderStatus.REJECT_DON_HANG_ONLINE) { frmBH_LapDonHangBanOnline frm = new frmBH_LapDonHangBanOnline(ct); frm.HideMenu(true); frm.ShowDialog(); } else if (ct.TrangThai == (int)OrderStatus.XAC_NHAN_DON_HANG_ONLINE) { frmBH_DuyetDonHangBanOnline frm = new frmBH_DuyetDonHangBanOnline(ct); frm.HideMenu(true); frm.ShowDialog(); } else if (ct.TrangThai == (int)OrderStatus.TAO_DON_HANG_DAT_TRUOC) { frmBH_LapDonHangBanDatTruoc frm = new frmBH_LapDonHangBanDatTruoc(ct); frm.HideMenu(true); frm.ShowDialog(); } else if (ct.TrangThai == (int)OrderStatus.DON_HANG_BAN_DAT_TRUOC || ct.TrangThai == (int)OrderStatus.DON_HANG_BAN_ONLINE || ct.TrangThai == (int)OrderStatus.DON_HANG_BAN_TAI_SHOP || ct.TrangThai == (int)OrderStatus.HUY_DON_HANG || ct.TrangThai == (int)OrderStatus.XAC_NHAN_DON_HANG_GIAO_NHAN) { if (ct.LoaiChungTu == (int)TransactionType.DON_HANG_BU_KHUYEN_MAI) { frmBH_LapDonHangBanKhuyenMai frm = new frmBH_LapDonHangBanKhuyenMai(ct); frm.HideMenu(true); frm.ShowDialog(); } else { frmBH_LapDonHangBanTheTVien frm = new frmBH_LapDonHangBanTheTVien(ct); frm.HideMenu(true); frm.ShowDialog(); } } else if (ct.TrangThai == (int)OrderStatus.PHAN_CONG_GIAO_NHAN || ct.TrangThai == (int)OrderStatus.REJECT_DON_HANG_GIAO_NHAN) { List <ChungTuBanHangInfor> lstPhieuPCGN = new List <ChungTuBanHangInfor>(); lstPhieuPCGN.Add(ct); frmBH_LapDonHangGiaoNhan frm = new frmBH_LapDonHangGiaoNhan(true, lstPhieuPCGN); frm.HideMenu(true); frm.ShowDialog(); } else if (ct.TrangThai == (int)OrderStatus.XUAT_KHO) { frmBH_XuatKhoHangBan frm = new frmBH_XuatKhoHangBan(ct); frm.HideMenu(); frm.ShowDialog(); } else { frmBH_LapDonHangBanTheTVien frm = new frmBH_LapDonHangBanTheTVien(ct); frm.HideMenu(true); frm.ShowDialog(); } } }