Beispiel #1
0
        public IList <MonthEasyAccessReport> ListMonthEasyAccessReports()
        {
            var eareports     = dareport.ListMonthEasyAccessReports(DateTime.Now.Year, DateTime.Now.Month);
            var amountreports = dareport.ListMonthDailyAmountReport(DateTime.Now.Year, DateTime.Now.Month);

            IList <MonthEasyAccessReport> reports = new List <MonthEasyAccessReport>();

            BLStation blstation = new BLStation();
            var       stations  = blstation.GetStations();

            foreach (var item in stations)
            {
                var eareport     = eareports.FirstOrDefault(t => t.StationID == item.StationID);
                var amountreport = amountreports.FirstOrDefault(t => t.StationID == item.StationID);

                reports.Add(new MonthEasyAccessReport()
                {
                    StationID        = item.StationID,
                    StationName      = item.StationName,
                    Amount           = amountreport == null ? 0 : amountreport.Amount,
                    EasyAccessAmount = amountreport == null ? 0 : amountreport.EasyAccessAmount,
                    DownAmount       = eareport == null ? 0 : eareport.DownAmount,
                    EasyAccess       = eareport == null ? 0 : eareport.EasyAccess
                });
            }

            return(reports);
        }
Beispiel #2
0
        public IList <Truck6ReportModel> ListMonthTruck6Reports()
        {
            IList <Truck6ReportModel> reports = new List <Truck6ReportModel>();

            BLStation blstation = new BLStation();
            var       stations  = blstation.GetStations();

            var cardreport = dareport.ListMonthTruck6Reports(DateTime.Now.Year, DateTime.Now.Month);

            foreach (var item in stations)
            {
                var report = cardreport.FirstOrDefault(t => t.StationID == item.StationID);
                if (report == null)
                {
                    reports.Add(new Truck6ReportModel()
                    {
                        StationID   = item.StationID,
                        StationName = item.StationName,
                        DownAmount  = 0,
                        MoreThan0   = 0,
                        MoreThan100 = 0,
                        MoreThan30  = 0,
                        TruckAmount = 0
                    });
                }
                else
                {
                    reports.Add(report);
                }
            }

            return(reports);
        }
Beispiel #3
0
        public IList <MonthCardReport> ListMonthCardReports()
        {
            IList <MonthCardReport> reports = new List <MonthCardReport>();

            BLStation blstation = new BLStation();
            var       stations  = blstation.GetStations();

            var cardreport = dareport.ListMonthCardReports(DateTime.Now.Year, DateTime.Now.Month);

            foreach (var item in stations)
            {
                var report = cardreport.FirstOrDefault(t => t.StationID == item.StationID);
                if (report == null)
                {
                    reports.Add(new MonthCardReport()
                    {
                        StationID     = item.StationID,
                        StationName   = item.StationName,
                        BrokenCards   = 0,
                        ReceivedCards = 0,
                        SentCards     = 0,
                        WrongCards    = 0
                    });
                }
                else
                {
                    report.StationName = item.StationName;
                    reports.Add(report);
                }
            }

            return(reports);
        }
Beispiel #4
0
        public IList <MonthAmountReport> ListMonthAmountReport()
        {
            var now = DateTime.Now;

            var amountreports = dareport.ListMonthDailyAmountReport(now.Year, now.Month);
            var splitamount   = dareport.ListMonthSplitBillReports(now.Year, now.Month);

            IList <MonthAmountReport> reports = new List <MonthAmountReport>();

            BLStation blstation = new BLStation();
            var       stations  = blstation.GetStations();


            foreach (var item in stations)
            {
                var splitreport  = splitamount.FirstOrDefault(t => t.StationID == item.StationID);
                var amountreport = amountreports.FirstOrDefault(t => t.StationID == item.StationID);

                reports.Add(new MonthAmountReport()
                {
                    StationID   = item.StationID,
                    StationName = item.StationName,
                    Amount      = amountreport == null ? 0 : amountreport.Amount,
                    SplitAmount = splitreport == null ? 0 : splitreport.Amount
                });
            }

            return(reports);
        }
Beispiel #5
0
        public IList<MonthAmountReport> ListMonthAmountReport()
        {
            var now = DateTime.Now;

            var amountreports = dareport.ListMonthDailyAmountReport(now.Year, now.Month);
            var splitamount = dareport.ListMonthSplitBillReports(now.Year, now.Month);

            IList<MonthAmountReport> reports = new List<MonthAmountReport>();

            BLStation blstation = new BLStation();
            var stations = blstation.GetStations();

            foreach (var item in stations)
            {
                var splitreport = splitamount.FirstOrDefault(t => t.StationID == item.StationID);
                var amountreport = amountreports.FirstOrDefault(t => t.StationID == item.StationID);

                reports.Add(new MonthAmountReport()
                {
                    StationID = item.StationID,
                    StationName = item.StationName,
                    Amount = amountreport == null ? 0 : amountreport.Amount,
                    SplitAmount = splitreport == null ? 0 : splitreport.Amount
                });

            }

            return reports;
        }
Beispiel #6
0
 public ActionResult Update(int userid, string username, string password, int stationid)
 {
     BLStation blstation = new BLStation();
     var usermodel = new UserModel()
     {
         StationID = stationid,
         UserName = username,
         Password = password,
         UserID = userid
     };
     new BLUser().UpdateUser(usermodel);
     return RedirectToAction("Details", new { id = userid });
 }
Beispiel #7
0
        public IList<Truck6ReportModel> ListMonthTruck6Reports()
        {
            IList<Truck6ReportModel> reports = new List<Truck6ReportModel>();

            BLStation blstation = new BLStation();
            var stations = blstation.GetStations();

            var cardreport = dareport.ListMonthTruck6Reports(DateTime.Now.Year, DateTime.Now.Month);

            foreach (var item in stations)
            {
                var report = cardreport.FirstOrDefault(t => t.StationID == item.StationID);
                if (report == null)
                {
                    reports.Add(new Truck6ReportModel()
                    {
                        StationID = item.StationID,
                        StationName = item.StationName,
                        DownAmount = 0,
                        MoreThan0 = 0,
                        MoreThan100 = 0,
                        MoreThan30 = 0,
                        TruckAmount = 0
                    });
                }
                else
                {
                    reports.Add(report);
                }
            }

            return reports;
        }
Beispiel #8
0
        public IList<MonthEasyAccessReport> ListMonthEasyAccessReports()
        {
            var eareports = dareport.ListMonthEasyAccessReports(DateTime.Now.Year, DateTime.Now.Month);
            var amountreports = dareport.ListMonthDailyAmountReport(DateTime.Now.Year, DateTime.Now.Month);

            IList<MonthEasyAccessReport> reports = new List<MonthEasyAccessReport>();

            BLStation blstation = new BLStation();
            var stations = blstation.GetStations();

            foreach (var item in stations)
            {
                var eareport = eareports.FirstOrDefault(t => t.StationID == item.StationID);
                var amountreport = amountreports.FirstOrDefault(t => t.StationID == item.StationID);

                reports.Add(new MonthEasyAccessReport()
                {
                    StationID = item.StationID,
                    StationName = item.StationName,
                    Amount = amountreport == null ? 0 : amountreport.Amount,
                    EasyAccessAmount = amountreport == null ? 0 : amountreport.EasyAccessAmount,
                    DownAmount = eareport == null ? 0 : eareport.DownAmount,
                    EasyAccess = eareport == null ? 0 : eareport.EasyAccess
                });

            }

            return reports;
        }
Beispiel #9
0
        public IList<MonthCardReport> ListMonthCardReports()
        {
            IList<MonthCardReport> reports = new List<MonthCardReport>();

            BLStation blstation = new BLStation();
            var stations = blstation.GetStations();

            var cardreport = dareport.ListMonthCardReports(DateTime.Now.Year, DateTime.Now.Month);

            foreach (var item in stations)
            {
                var report = cardreport.FirstOrDefault(t => t.StationID == item.StationID);
                if (report == null)
                {
                    reports.Add(new MonthCardReport()
                    {
                        StationID = item.StationID,
                        StationName = item.StationName,
                        BrokenCards = 0,
                        ReceivedCards = 0,
                        SentCards = 0,
                        WrongCards = 0
                    });
                }
                else
                {
                    report.StationName = item.StationName;
                    reports.Add(report);
                }
            }

            return reports;
        }