protected void ButtonSaveRemarks_Click(object sender, System.EventArgs e) { string serial = this.CarSearchDetails.VehicleIdentNbr; DateTime expectedResolutionDate = this.CarSearchDetails.NextOnRentDate; string remarks = this.CarSearchDetails.Remark; this.CarSearchDetails.ModalExtenderCarDetails.Hide(); AvailabilityCarSearch.SaveVehicleRemark(serial, remarks, expectedResolutionDate); this.GridviewSortingAndPaging(null); this.UpdatePanelCarSearch.Update(); }
private List <App.BLL.AvailabilityCarSearch.CarSearchDetails> getCardSearchList() { AvailabilityCarSearch.TheCarFilter = CarFilter1; return(AvailabilityCarSearch.GetCarSearchList(SessionHandler.AvailabilityCarSearchCountry, Convert.ToInt32(SessionHandler.AvailabilityCarSearchCMSPoolId), SessionHandler.AvailabilityCarSearchCMSLocationGroupCode ?? 0, Convert.ToInt32(SessionHandler.AvailabilityCarSearchOPSRegionId), Convert.ToInt32(SessionHandler.AvailabilityCarSearchOPSAreaId), SessionHandler.AvailabilityCarSearchLocation, SessionHandler.AvailabilityCarSearchFleetName, Convert.ToInt32(SessionHandler.AvailabilityCarSearchCarSegmentId), Convert.ToInt32(SessionHandler.AvailabilityCarSearchCarClassId), Convert.ToInt32(SessionHandler.AvailabilityCarSearchCarGroupId), SessionHandler.AvailabilityCarSearchStatus, SessionHandler.AvailabilityCarSearchOwnArea, SessionHandler.AvailabilityCarSearchModelCode, Convert.ToInt32(SessionHandler.AvailabilityCarSearchNoRev), SessionHandler.AvailabilityCarSearchSelectBy, Convert.ToInt32(SessionHandler.AvailabilityCarSearchPageSize), Convert.ToInt32(SessionHandler.AvailabilityCarSearchCurrentPageNumber), SessionHandler.AvailabilityCarSearchSortExpression, this.PanelCarSearch, this.PagerControlCarSearch.PagerButtonFirst, this.PagerControlCarSearch.PagerButtonNext, this.PagerControlCarSearch.PagerButtonPrevious, this.PagerControlCarSearch.PagerButtonLast, this.PagerControlCarSearch.PagerLabelTotalPages, this.PagerControlCarSearch.PagerDropDownListPage, this.GridviewCarSearch, this.LabelTotalRecordsDisplay, this.EmptyDataTemplateCarSearch)); }
protected void GridviewCarSearch_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e) { if (e.CommandName.ToString() == "SelectVehicle") { string serial = e.CommandArgument.ToString(); this.CarSearchDetails.LabelSerial.Text = serial; List <AvailabilityCarSearch.VehicleRemarks> results = AvailabilityCarSearch.GetVehicleRemarks(serial); foreach (AvailabilityCarSearch.VehicleRemarks item in results) { this.CarSearchDetails.BDDays = item.BDDays; this.CarSearchDetails.BlockDate = item.BlockDate; this.CarSearchDetails.Carhold = item.carhold; this.CarSearchDetails.GroupCharged = item.GroupCharged; this.CarSearchDetails.DriverName = item.DriverName; this.CarSearchDetails.DueDate = item.DueDate; this.CarSearchDetails.Duetime = item.duetime; this.CarSearchDetails.Duewwd = item.Duewwd; this.CarSearchDetails.Group = item.Group; this.CarSearchDetails.Kilometers = item.Kilometers; this.CarSearchDetails.LastDocument = item.lastDocument; this.CarSearchDetails.License = item.License; this.CarSearchDetails.LstDate = item.LstDate; this.CarSearchDetails.Lsttime = item.Lsttime; this.CarSearchDetails.Lstwwd = item.Lstwwd; this.CarSearchDetails.MMDays = item.MMDays; this.CarSearchDetails.Model = item.Model; this.CarSearchDetails.ModelCode = item.ModelCode; this.CarSearchDetails.Movetype = item.Movetype; this.CarSearchDetails.NonRev = item.NonRev; this.CarSearchDetails.Operstat = item.Operstat; this.CarSearchDetails.OwnArea = item.OwnArea; this.CarSearchDetails.Prevwwd = item.Prevwwd; this.CarSearchDetails.RegDate = item.RegDate; this.CarSearchDetails.Unit = item.Unit; this.CarSearchDetails.VehicleIdentNbr = item.VehicleIdentNbr; this.CarSearchDetails.Remark = item.Remark; this.CarSearchDetails.NextOnRentDate = Convert.ToDateTime(item.NextOnRentDate); } this.CarSearchDetails.LoadDetails(); this.CarSearchDetails.ModalExtenderCarDetails.Show(); } }
protected void GridviewSortingAndPaging(string sortExpression) { if (sortExpression == null) { sortExpression = SessionHandler.AvailabilityCarSearchSortExpression; } //--Added by Gavin 2/4/12-- AvailabilityCarSearch.TheCarFilter = CarFilter1; AvailabilityCarSearch.GetCarSearchResult(SessionHandler.AvailabilityCarSearchCountry, Convert.ToInt32(SessionHandler.AvailabilityCarSearchCMSPoolId), SessionHandler.AvailabilityCarSearchCMSLocationGroupCode ?? 0, Convert.ToInt32(SessionHandler.AvailabilityCarSearchOPSRegionId), Convert.ToInt32(SessionHandler.AvailabilityCarSearchOPSAreaId), SessionHandler.AvailabilityCarSearchLocation, SessionHandler.AvailabilityCarSearchFleetName, Convert.ToInt32(SessionHandler.AvailabilityCarSearchCarSegmentId), Convert.ToInt32(SessionHandler.AvailabilityCarSearchCarClassId), Convert.ToInt32(SessionHandler.AvailabilityCarSearchCarGroupId), SessionHandler.AvailabilityCarSearchStatus, SessionHandler.AvailabilityCarSearchOwnArea, SessionHandler.AvailabilityCarSearchModelCode, Convert.ToInt32(SessionHandler.AvailabilityCarSearchNoRev), SessionHandler.AvailabilityCarSearchSelectBy, Convert.ToInt32(SessionHandler.AvailabilityCarSearchPageSize), Convert.ToInt32(SessionHandler.AvailabilityCarSearchCurrentPageNumber), sortExpression, this.PanelCarSearch, this.PagerControlCarSearch.PagerButtonFirst, this.PagerControlCarSearch.PagerButtonNext, this.PagerControlCarSearch.PagerButtonPrevious, this.PagerControlCarSearch.PagerButtonLast, this.PagerControlCarSearch.PagerLabelTotalPages, this.PagerControlCarSearch.PagerDropDownListPage, this.GridviewCarSearch, this.LabelTotalRecordsDisplay, this.EmptyDataTemplateCarSearch); this.UpdatePanelCarSearch.Update(); }
protected void GenerateReport() { //Get Selection Values from reportselection user controls int selectedLogic = this.UserControlReportSettings.Logic; //Set values from report selection string country = this.UserControlReportSettings.Country; //Set default values for CMS / OPS logic int cms_pool_id = -1; string cms_pool = null; int cms_location_group_id = -1; string cms_location_group = null; int ops_region_id = -1; string ops_region = null; int ops_area_id = -1; string ops_area = null; //Check option logic switch (selectedLogic) { case (int)ReportSettings.OptionLogic.CMS: //Set Values for CMS cms_pool_id = this.UserControlReportSettings.CMS_Pool_Id; cms_pool = this.UserControlReportSettings.CMS_Pool; cms_location_group_id = this.UserControlReportSettings.CMS_Location_Group_Id; cms_location_group = this.UserControlReportSettings.CMS_Location_Group; break; case (int)ReportSettings.OptionLogic.OPS: //Set Values for OPS ops_region_id = this.UserControlReportSettings.OPS_Region_Id; ops_region = this.UserControlReportSettings.OPS_Region; ops_area_id = this.UserControlReportSettings.OPS_Area_Id; ops_area = this.UserControlReportSettings.OPS_Area; break; } //Set common values string location = this.UserControlReportSettings.Location; int car_segment_id = this.UserControlReportSettings.Car_Segment_Id == 0 ? -1 : UserControlReportSettings.Car_Segment_Id; string car_segment = this.UserControlReportSettings.Car_Segment; int car_class_id = this.UserControlReportSettings.Car_Class_Id == 0 ? -1 : UserControlReportSettings.Car_Class_Id; string car_class = this.UserControlReportSettings.Car_Class; int car_group_id = this.UserControlReportSettings.Car_Group_Id == 0 ? -1 : UserControlReportSettings.Car_Group_Id; string car_group = this.UserControlReportSettings.Car_Group; int noRev = this.UserControlReportSettings.NoRev == 0 ? -1 : UserControlReportSettings.NoRev; string ownArea = this.UserControlReportSettings.OwnArea; string modelCode = this.UserControlReportSettings.ModelCode; string status = this.UserControlReportSettings.Status; string selectBy = this.UserControlReportSettings.CarSearch_SelectBy; string fleet_name = this.UserControlReportSettings.Fleet_Name ?? "-1"; //Set Selection Session Values this.SetSelectionSessionValues(country, cms_pool_id, cms_location_group_id, ops_region_id, ops_area_id, location, car_segment_id, car_class_id, car_group_id, fleet_name, ownArea, modelCode, status, noRev, selectBy); //Set Last Selection Value base.SaveLastSelectionToSession(selectedLogic, country, cms_pool_id, cms_location_group_id, ops_region_id, ops_area_id, location, car_segment_id, car_class_id, car_group_id); //Load Data AvailabilityCarSearch.GetCarSearchResult(country ?? "-1", cms_pool_id, cms_location_group_id, ops_region_id, ops_area_id, location ?? "-1", fleet_name, car_segment_id, car_class_id, car_group_id, status, ownArea, modelCode, noRev, selectBy, Convert.ToInt32(SessionHandler.AvailabilityCarSearchPageSize), Convert.ToInt32(SessionHandler.AvailabilityCarSearchCurrentPageNumber), null, this.PanelCarSearch, this.PagerControlCarSearch.PagerButtonFirst, this.PagerControlCarSearch.PagerButtonNext, this.PagerControlCarSearch.PagerButtonPrevious, this.PagerControlCarSearch.PagerButtonLast, this.PagerControlCarSearch.PagerLabelTotalPages, this.PagerControlCarSearch.PagerDropDownListPage, this.GridviewCarSearch, this.LabelTotalRecordsDisplay, this.EmptyDataTemplateCarSearch); //Log Usage Statistics base.LogUsageStatistics((int)ReportStatistics.ReportName.AvailabilityCarSearch, country, cms_pool_id, cms_location_group_id, ops_region_id, ops_area_id, location); //Set Report Selection this.SetReportSelection(selectedLogic, country, cms_pool_id, cms_location_group_id, ops_region_id, ops_area_id, car_segment_id, car_class_id, car_group_id, location); this.UpdatePanelCarSearch.Update(); }