public void CheckInsertOrNot() { InventoryStockReportDAO aInventoryStockReportDao = new InventoryStockReportDAO(); bool check = aInventoryStockReportDao.CheckInsertOrNot(); if (check) { InsertInventoryStock(); } }
public void InsertInventoryStock() { List <InventoryStockReport> aInventoryStockReports = new List <InventoryStockReport>(); DateTime todate = DateTime.Today; DateTime fromdate = todate.AddDays(-1); todate = todate.AddSeconds(-1); aInventoryStockReports = GetTodayReport(fromdate, todate); InventoryStockReportDAO aInventoryStockReportDao = new InventoryStockReportDAO(); aInventoryStockReportDao.InsertInventoryStock(aInventoryStockReports); }
public List <InventoryStockReport> GetInventoryStockReportBetweenDate(DateTime fromdate, DateTime todate) { List <InventoryStockReport> aInventoryStockReports = new List <InventoryStockReport>(); List <InventoryStockReport> aInventoryStockReports1 = new List <InventoryStockReport>(); InventoryStockReportDAO aInventoryStockReportDao = new InventoryStockReportDAO(); aInventoryStockReports = aInventoryStockReportDao.GetInventoryStockReportBetweenDate(fromdate, todate); if (todate >= DateTime.Today) { DateTime todate1 = DateTime.Today.AddDays(1); DateTime fromdate1 = DateTime.Today; todate1 = todate.AddSeconds(-1); aInventoryStockReports1 = GetTodayReport(fromdate1, todate1); foreach (InventoryStockReport report in aInventoryStockReports1) { aInventoryStockReports.Add(report); } } return(aInventoryStockReports); }