Beispiel #1
0
        public void UpdatePhieuThu(PhieuThuRow phieuThuRow, DateTime ngay, long soTien, string maPhieu, string ghiChu, int?hocSinhId, int?phanLoaiThuId)
        {
            PhieuThuTableAdapter phieuThuTableAdapter = (PhieuThuTableAdapter)StaticDataFacade.Get(StaticDataKeys.AdapterPhieuThu);
            int?origHocSinhId     = phieuThuRow.IsHocSinhIdNull() ? (int?)null : phieuThuRow.HocSinhId;
            int?origPhanLoaiThuId = phieuThuRow.IsPhanLoaiThuIdNull() ? (int?)null : phieuThuRow.PhanLoaiThuId;

            phieuThuTableAdapter.Update(soTien, maPhieu, ghiChu, hocSinhId, phanLoaiThuId, ngay, DateTime.Now,
                                        phieuThuRow.PhieuThuId, phieuThuRow.SoTien, phieuThuRow.MaPhieu, origHocSinhId, origPhanLoaiThuId, phieuThuRow.Ngay, phieuThuRow.CreatedDate);
        }
Beispiel #2
0
        public QLMamNon.Dao.QLMamNonDs.PhieuThuDataTable LoadPhieuThuByDateRangeWithGroupPhanLoaiThu(DateTime?fromDate, DateTime?toDate, List <int> phanLoaiThuIds)
        {
            PhieuThuTableAdapter phieuThuTableAdapter = (PhieuThuTableAdapter)StaticDataFacade.Get(StaticDataKeys.AdapterPhieuThu);

            QLMamNon.Dao.QLMamNonDs.PhieuThuDataTable table = phieuThuTableAdapter.GetDataByDateRangeWithGroupPhanLoaiThu(fromDate, toDate, StringUtil.JoinWithCommas(phanLoaiThuIds));

            foreach (PhieuThuRow phieuThuRow in table)
            {
                phieuThuRow.PhanLoaiThu = StaticDataUtil.GetPhanLoaiThuById(phieuThuRow.PhanLoaiThuId);
            }

            return(table);
        }
Beispiel #3
0
        public QLMamNon.Dao.QLMamNonDs.PhieuThuDataTable LoadPhieuThu(HocSinhDataTable hocSinhTable)
        {
            PhieuThuTableAdapter phieuThuTableAdapter = (PhieuThuTableAdapter)StaticDataFacade.Get(StaticDataKeys.AdapterPhieuThu);
            PhieuThuDataTable    table = phieuThuTableAdapter.GetData();

            foreach (PhieuThuRow row in table)
            {
                if (!row.IsHocSinhIdNull())
                {
                    row.HocSinh = StaticDataUtil.GetHocSinhFullNameByHocSinhId(hocSinhTable, row.HocSinhId);
                }

                if (!row.IsPhanLoaiThuIdNull())
                {
                    row.PhanLoaiThu = StaticDataUtil.GetPhanLoaiThuById(row.PhanLoaiThuId);
                }
            }

            return(table);
        }
Beispiel #4
0
        public void InsertPhieuThu(DateTime ngay, long soTien, string maPhieu, string ghiChu, int?hocSinhId, int?phanLoaiThuId)
        {
            PhieuThuTableAdapter phieuThuTableAdapter = (PhieuThuTableAdapter)StaticDataFacade.Get(StaticDataKeys.AdapterPhieuThu);

            phieuThuTableAdapter.Insert(ngay, soTien, maPhieu, ghiChu, hocSinhId, DateTime.Now, phanLoaiThuId);
        }