示例#1
0
        protected override void EditChungTuInstance(ChungTuBanHangInfor ct)
        {
            //if (!Common.IsOpenForm("frmBH_LapPhieuThu"))
            //{
            //    frmBH_LapPhieuThu frm = new frmBH_LapPhieuThu(ct);
            //    frm.Show();
            //}
            frmBH_LapPhieuThu frm = new frmBH_LapPhieuThu(ct);

            frm.ShowDialog();
        }
示例#2
0
        private void smiComfim_Click(object sender, EventArgs e)
        {
            try
            {
                ConnectionUtil.Instance.BeginTransaction();
                Draft = 0;

                //cap nhat trang thai don hang goc
                HuyDonHangGoc();

                //cap nhat don hang tra lai
                UpdateChungTu();

                //cap nhat lai diem tich luy the
                ChinhSachTheTVienDataProvider.Instance.UpdateDiemTichLuyTraHang(Business.ChungTu.IdChungTu);

                //tinh tien khach phai tra lai do tru diem thuong cac don hang truoc, sau do update lai diem ve 0
                int soDiemAm = 0;
                int idThe    = 0;

                double tienTraLaiThe =
                    ChinhSachTheTVienDataProvider.Instance.CheckSoTienTraLai(Business.ChungTu.IdChungTu, ref soDiemAm, ref idThe);
                if (tienTraLaiThe > 0)
                {
                    BanHangBusiness tlaiBus = new BanHangBusiness(Business.ChungTu, tienTraLaiThe, soDiemAm, idThe);
                    tlaiBus.SaveChungTuHoanTien();
                    MessageBox.Show("Đề nghị khách hàng trả lại tiền quy đổi điểm thưởng");

                    frmBH_LapPhieuThu frm = new frmBH_LapPhieuThu(tlaiBus.ChungTu);
                    frm.ShowDialog();
                }

                ConnectionUtil.Instance.CommitTransaction();
                Updating = false;
                setEDFunctions();
                clsUtils.MsgThongBao(Declare.msgUpdateSucc);
            }
            catch (Exception ex)
            {
                ConnectionUtil.Instance.RollbackTransaction();

                EventLogProvider.Instance.WriteOfflineLog(ex.ToString()
                                                          + "\nUser: "******"\nMay: " + Declare.TenMay,
                                                          this.Name);
                this.Close();
#if DEBUG
                clsUtils.MsgCanhBao(ex.ToString());
#else
                clsUtils.MsgCanhBao(ex.Message);
#endif
            }
        }
示例#3
0
        private void EditOrder(int rowHandle)
        {
            if (rowHandle < 0)
            {
                return;
            }
            ChungTuBanHangInfor ct = (ChungTuBanHangInfor)gvListChungTu.GetRow(rowHandle);

            if (ct != null)
            {
                frmBH_LapPhieuThu frm = new frmBH_LapPhieuThu(ct);
                frm.HideMenu();
                frm.ShowDialog();
            }
        }