Ejemplo n.º 1
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;
                    }
                }
                ChungTuBanHangInfor ctu = BanHangDataProvider.Instance.LoadChungTu(-1, txtSoOrderKH.Text.Trim(), 1, 0);
                if (ctu != null)
                {
                    Business = new LapPhieuThuBusiness(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
            }
        }
Ejemplo n.º 2
0
 public frmBH_LapPhieuThu(ChungTuBanHangInfor chungTuBanHangInfor)
 {
     InitializeComponent();
     Common.LoadStyle(this);
     Business = new LapPhieuThuBusiness(chungTuBanHangInfor);
 }
Ejemplo n.º 3
0
        private bool Updating = false;//false: chua sua, tao moi; 1:dang sua, tao moi

        #endregion

        #region "Các phương thức khởi tạo"
        public frmBH_LapPhieuThu()
        {
            InitializeComponent();
            Common.LoadStyle(this);
            Business = new LapPhieuThuBusiness();
        }