public void LogError(List <string> errorList) { List <string> e = new List <string>(); // 136 Students TODO: write to database table. for (int i = 0; i < errorList.Count; i++) { DALReport.CreateError(errorList[i], DateTime.Now, ref e); } }
public void BindSaleReport() { DALReport obj = new DALReport(); DataSet ds = obj.Sale_Get(); Session.Add("dtSaleReport", ds.Tables[0]); rptSaleReport.DataSource = ds.Tables[0]; rptSaleReport.DataBind(); }
public void GetLotOccupancy(User objloginUserLot) { try { ShowLoading(true); lvLotOccupancyReport.ItemsSource = null; labelTwoWheelerLotCapcity.Text = string.Empty; labelThreeWheelerLotCapcity.Text = string.Empty; labelFourWheelerLotCapacity.Text = string.Empty; labelHVWheelerLotCapcity.Text = string.Empty; labelTwoWheelerLotOccupancyPer.Text = string.Empty; labelThreeWheelerLotOccupancyPer.Text = string.Empty; labelFourWheelerLotOccupancyPer.Text = string.Empty; labelHeavyWheelerLotOccupancyPer.Text = string.Empty; List <VMLocationLotOccupancyReport> lstOccupancy = new List <VMLocationLotOccupancyReport>(); if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { DALReport dal_Report = new DALReport(); objloginUserLot.LoginTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 06, 00, 00); objloginUserLot.LogoutTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59); VMLocationLotOccupancyReport objOccupancy = dal_Report.VMGetLocationLotOccupancyReport(Convert.ToString(App.Current.Properties["apitoken"]), objloginUserLot); if (objOccupancy != null && objOccupancy.LocationLotOccupancyReportID.Count > 0) { lvLotOccupancyReport.ItemsSource = objOccupancy.LocationLotOccupancyReportID; labelTwoWheelerLotCapcity.Text = objOccupancy.TotalTwoWheelerLotCapacity; labelThreeWheelerLotCapcity.Text = objOccupancy.TotalThreeWheelerLotCapacity; labelFourWheelerLotCapacity.Text = objOccupancy.TotalFourWheelerLotCapacity; labelHVWheelerLotCapcity.Text = objOccupancy.TotalHeavyWheelerLotCapacity; labelTwoWheelerLotOccupancyPer.Text = objOccupancy.TotalTwoWheelerPercentage; labelThreeWheelerLotOccupancyPer.Text = objOccupancy.TotalThreeWheelerPercentage; labelFourWheelerLotOccupancyPer.Text = objOccupancy.TotalFourWheelerPercentage; labelHeavyWheelerLotOccupancyPer.Text = objOccupancy.TotalHeavyWheelerPercentage; } } ShowLoading(false); } catch (Exception ex) { ShowLoading(false); dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "LotOccupancy.xaml.cs", "", "GetLotOccupancy"); } }
public LocationLotParkingReport(string apitoken, User objLoginUser) { SelectedRowItem = null; LotParkingReportList = null; try { DALReport dal_Report = new DALReport(); VMReportSummary result = dal_Report.GetLocationLotReport(apitoken, objLoginUser); var VMLocationLotParkingReportID = result.VMLocationLotParkingReportID; #region Parking Report if (VMLocationLotParkingReportID != null) { LotTotalCheckIn = VMLocationLotParkingReportID.LotTotalCheckIn; LotTotalCheckOut = VMLocationLotParkingReportID.LotTotalCheckOut; LotTotalFOC = VMLocationLotParkingReportID.LotTotalFOC; LotRevenueCash = VMLocationLotParkingReportID.LotRevenueCash; LotRevenueEpay = VMLocationLotParkingReportID.LotRevenueEpay; LotParkingReportList = VMLocationLotParkingReportID.LotParkingReportList; } #endregion #region Pass Report try { objVMVehiclePassReport = result.VMLocationLotPassReportID; } catch (Exception ex) { throw ex; } #endregion #region Violation Report try { objVMClampedVehiclesSummary = result.VMLocationLotViolationsID; } catch (Exception ex) { throw ex; } #endregion try { #region Total Cash and Epay objStationVehicleReport = new StationVehicles(); objStationVehicleReport.StationVehicleCash = result.Cash; objStationVehicleReport.StationVehicleEPay = result.EPay; } catch (Exception ex) { throw ex; } #endregion } catch (Exception ex) { throw ex; } }
public async void GetRecentCheckOuts() { try { ShowLoading(true); RecentCheckOutReport objreport = null; lvCheckInChkOutReport.ItemsSource = null; if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { User objLoginUser = (User)App.Current.Properties["LoginUser"]; if (objLoginUser != null && objLoginUser.UserID != 0) { if (pickerLocationLot.SelectedItem != null && pickerDay.SelectedItem != null && pickerOperator.SelectedItem != null) { var objSelectedLocation = (VMLocationLots)pickerLocationLot.SelectedItem; var objselectedOperator = (User)pickerOperator.SelectedItem; var objRecentCheckOutDays = (RecentCheckOutDays)pickerDay.SelectedItem; objFilter.LocationID = objSelectedLocation.LocationID; objFilter.LocationParkingLotID = objSelectedLocation.LocationParkingLotID; objFilter.UserID = objselectedOperator.UserID; if (objRecentCheckOutDays.Day == "Today") { objFilter.SelectedDay = DateTime.Now; } if (objRecentCheckOutDays.Day == "Yesterday") { objFilter.SelectedDay = DateTime.Now.AddDays(-1); } if (objRecentCheckOutDays.Day == "Daybefore Yesterday") { objFilter.SelectedDay = DateTime.Now.AddDays(-2); } await Task.Run(() => { if (objFilter != null) { DALReport dal_Report = new DALReport(); objreport = dal_Report.GetRecentCheckOutReport(Convert.ToString(App.Current.Properties["apitoken"]), objFilter); } }); if (objreport != null) { if (objreport.RecentCheckOutID.Count > 0) { VMRecentCheckOutsID = objreport.RecentCheckOutID; lvCheckInChkOutReport.ItemsSource = VMRecentCheckOutsID; if (switchViolation.IsToggled) { if (VMRecentCheckOutsID.Count >= 1) { var lstviolations = VMRecentCheckOutsID.Where(i => (i.StatusID.StatusCode.ToUpper().Contains("FOC"))); if (lstviolations.Count() > 0) { lvCheckInChkOutReport.ItemsSource = lstviolations; } else { lvCheckInChkOutReport.ItemsSource = null; } } } } } } } } ShowLoading(false); } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "RecentCheckOuts.xamls.cs", "", "GetRecentCheckOuts"); ShowLoading(false); } }