Example #1
0
        private void SetMaSoIfInvalid()
        {
            PhieuThuHP_DAL phieuThuHP_DAL = new PhieuThuHP_DAL(dbConnection);

            while (phieuThuHP_DAL.IsMaSoExisted(phieuThuHP.SoPhieuThuHP))
            {
                phieuThuHP.SoPhieuThuHP++;
            }
            OnPropertyChanged("PhieuThuHP");
        }
Example #2
0
        private void XacNhanLuuPhieuThuHP()
        {
            phieuThuHP.PhieuDKHP = phieuDKHP.SoPhieuDKHP;
            string errorString = CheckThongTinPhieuThuHP();

            if (errorString == "")
            {
                PhieuThuHP_DAL phieuThuHP_DAL = new PhieuThuHP_DAL(dbConnection);
                PhieuDKHP_DAL  phieuDKHP_DAL  = new PhieuDKHP_DAL(dbConnection);
                phieuThuHP_DAL.CreateItem(phieuThuHP);
                phieuDKHP_DAL.UpdateSoTienConLai(phieuDKHP);
                MessageBox.Show("Lưu Phiếu Thu Học Phí thành công");
                NhapLaiThongTinPhieuThuHP();
                SetMaSoIfInvalid();
            }
            else
            {
                MessageBox.Show(errorString, "ERROR");
            }
        }