public frmThanhToanNhapLai(NhapTraHangMuaBussiness business)
 {
     InitializeComponent();
     Common.LoadStyle(this);
     this.ChungTu = business.ChungTu;
     this.ListChungTuThanhToan = business.ListChungTuThanhToan;
 }
예제 #2
0
 private void ResetAllText()
 {
     clsUtils.ResetAllText(this);
     Business = new NhapTraHangMuaBussiness();
     //lst.Clear();
     LoadKho();
 }
예제 #3
0
        private void btnSearchPhieuNhap_Click(object sender, EventArgs e)
        {
            try
            {
                if (Updating)
                {
                    if (MessageBox.Show("Dữ liệu đang cập nhật, bạn có muốn hủy bỏ không?", "Thông báo", MessageBoxButtons.YesNo) == DialogResult.No)
                    {
                        return;
                    }
                }
                NhapHangTraMuaInfor ct =
                    NhapTraHangMuaDataProvider.Instance.SearchChungTuBanHangByPN(txtSoPhieuNhap.Text.Trim().ToUpper(),
                                                                                 (int)TransactionType.NHAPTRAHANGMUA);
                if (ct != null)
                {
                    Business = new NhapTraHangMuaBussiness(ct);
                    LoadChungTuInstance();
                }
                else
                {
                    MessageBox.Show("Không tìm thấy chứng từ thích hợp!");
                    txtSoPhieuNhap.Text = Business.ChungTu.SoChungTu;
                }
            }
            catch (Exception ex)
            {
                EventLogProvider.Instance.WriteLog(ex.ToString()
                                                   + "\nUser: "******"\nMay: " + Declare.TenMay,
                                                   this.Name);
#if DEBUG
                MessageBox.Show("Lỗi thao tác\n" + ex.ToString(), Declare.titleError, MessageBoxButtons.OK, MessageBoxIcon.Error);
#else
                MessageBox.Show("Lỗi thao tác", Declare.titleError, MessageBoxButtons.OK, MessageBoxIcon.Error);
#endif
            }
        }
예제 #4
0
        private void btnTimOrderKH_Click(object sender, EventArgs e)
        {
            try
            {
                if (Updating)
                {
                    if (MessageBox.Show("Dữ liệu đang cập nhật, bạn có muốn hủy bỏ không?", "Thông báo", MessageBoxButtons.YesNo) == DialogResult.No)
                    {
                        return;
                    }
                }
                NhapHangTraMuaInfor ctu = NhapTraHangMuaDataProvider.Instance.SearchChungTuBanHangByPN(txtSoOrderKH.Text.Trim(), (int)TransactionType.NHAPTRAHANGMUA);
                if (ctu != null)
                {
                    Business = new NhapTraHangMuaBussiness(ctu);
                    LoadChungTuInstance();

                    Updating = false;
                    setEDItems();
                    setEDFunctions();
                }
                else
                {
                    MessageBox.Show("Không tìm thấy chứng từ thích hợp!");
                    txtSoOrderKH.Text = Business.ChungTu.SoChungTu;
                }
            }
            catch (Exception ex)
            {
#if DEBUG
                MessageBox.Show("Lỗi thao tác\n" + ex.ToString(), Declare.titleError, MessageBoxButtons.OK, MessageBoxIcon.Error);
#else
                MessageBox.Show("Lỗi thao tác", Declare.titleError, MessageBoxButtons.OK, MessageBoxIcon.Error);
#endif
            }
        }
예제 #5
0
 public frmBH_LapPhieuChi(NhapHangTraMuaInfor ctu)
 {
     InitializeComponent();
     Common.LoadStyle(this);
     this.Business = new NhapTraHangMuaBussiness(ctu);
 }
예제 #6
0
 public frmChiTietXacNhapHangTraLai(ChungTuBanHangInfor ctu)
 {
     InitializeComponent();
     Common.LoadStyle(this);
     this.Business = new NhapTraHangMuaBussiness(ctu);
 }
예제 #7
0
 public frmChiTietXacNhapHangTraLai()
 {
     InitializeComponent();
     Common.LoadStyle(this);
     this.Business = new NhapTraHangMuaBussiness(LoaiChungTu, nguoiDung.IdNhanVien, _IdKho);
 }