public frmProcessedJobsList() { InitializeLoading(); InitializeComponent(); this.Load += new EventHandler(frmBookingsList_Load); grdLister.CellDoubleClick += new GridViewCellEventHandler(grdLister_CellDoubleClick); // grdLister.RowsChanging += new Telerik.WinControls.UI.GridViewCollectionChangingEventHandler(Grid_RowsChanging); objMaster = new BookingBO(); FillCombo(); this.SetProperties((INavigation)objMaster); grdLister.ShowGroupPanel = false; grdLister.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; grdLister.CommandCellClick += new CommandCellClickEventHandler(grid_CommandCellClick); this.ddlCompany.SelectedValueChanged += new EventHandler(ddlCompany_SelectedValueChanged); // grdLister.ViewCellFormatting += new CellFormattingEventHandler(grdLister_ViewCellFormatting); // grdLister.ContextMenuOpening += new ContextMenuOpeningEventHandler(grdLister_ContextMenuOpening); }
public frmIVRBookingsList() { InitializeLoading(); InitializeComponent(); this.Load += new EventHandler(frmBookingsList_Load); grdLister.CellDoubleClick += new GridViewCellEventHandler(grdLister_CellDoubleClick); grdLister.RowsChanging += new Telerik.WinControls.UI.GridViewCollectionChangingEventHandler(Grid_RowsChanging); objMaster = new BookingBO(); this.SetProperties((INavigation)objMaster); grdLister.ShowGroupPanel = false; grdLister.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; grdLister.CommandCellClick += new CommandCellClickEventHandler(grid_CommandCellClick); grdLister.ViewCellFormatting += new CellFormattingEventHandler(grdLister_ViewCellFormatting); grdLister.VerticalScroll.LargeChange = 100; grdLister.TableElement.VScrollBar.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed; pageSize = AppVars.objPolicyConfiguration.ListingPagingSize.ToInt(); grdLister.ContextMenuOpening += new ContextMenuOpeningEventHandler(grdLister_ContextMenuOpening); }
public IHttpActionResult CheckMobile(string BookingNo, string OTP) { try { bool result = false; var bookingList = new BookingBO().GetList(); if (bookingList != null) { result = bookingList.Where(x => x.BookingNo == BookingNo && x.OTP == OTP).ToList().Count() > 0; if (result == true) { return(Ok(new { Status = UTILITY.SUCCESSMESSAGE })); } else { return(Ok(new { Status = UTILITY.FAILEDMESSAGE })); } } else { return(NotFound()); } } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult DeleteByBookingNo(DeleteBookingDTO deleteBookingDTO) { try { var result = new BookingBO().DeleteBooking(new Booking { BookingNo = deleteBookingDTO.bookingNo }); if (result) { string GetDriverDeviceIDByBookingNo = new BookingBO().GetDriverDeviceIDByBookingNo(deleteBookingDTO.bookingNo); if (!string.IsNullOrWhiteSpace(GetDriverDeviceIDByBookingNo)) { PushNotification(GetDriverDeviceIDByBookingNo, deleteBookingDTO.bookingNo, UTILITY.NotifyBookingCancelledByUser); return(Ok(UTILITY.DELETEMSG)); } else { return(Ok(UTILITY.DELETEMSG)); } } else { return(NotFound()); } } catch (Exception ex) { return(InternalServerError(ex)); } }
private void grid_CommandCellClick(object sender, EventArgs e) { GridCommandCellElement gridCell = (GridCommandCellElement)sender; string name = gridCell.ColumnInfo.Name.ToLower(); GridViewRowInfo row = gridCell.RowElement.RowInfo; long id = row.Cells[COLS.BookingId].Value.ToLong(); if (name == "unprocess") { RadGridView grid = gridCell.GridControl; objMaster = new BookingBO(); objMaster.GetByPrimaryKey(id); if (objMaster.Current != null) { if (General.GetQueryable <DriverRent_Charge>(c => c.BookingId == id).Count() > 0) { ENUtils.ShowMessage("Cannot UnProcess this Job as Driver Rent is generated from it"); return; } objMaster.Current.IsProcessed = false; objMaster.CheckCustomerValidation = false; objMaster.CheckDataValidation = false; objMaster.Save(); row.Delete(); } } }
public IHttpActionResult GetNearBookingsForDriver() { try { var bookingsList = new BookingBO().GetNearBookingsForDriver( new Guid(HeaderValueByKey(UTILITY.HEADERKEYS.AUTH_TOKEN.ToString())), HeaderValueByKey(UTILITY.HEADERKEYS.DRIVERID.ToString()), Convert.ToDecimal(HeaderValueByKey(UTILITY.HEADERKEYS.LATITUDE.ToString())), Convert.ToDecimal(HeaderValueByKey(UTILITY.HEADERKEYS.LONGITUDE.ToString())), UTILITY.radius ); if (bookingsList != null) { return(Ok(bookingsList)); } else { return(Ok(new List <Booking>())); } } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult CancelBookingByDriver(BookingCancelDTO bookingCancelDTO) { try { var result = new BookingBO().BookingCancelledByDriver( HeaderValueByKey("AUTH_TOKEN"), bookingCancelDTO.driverID, bookingCancelDTO.vehicleNo, bookingCancelDTO.bookingNo, bookingCancelDTO.cancelRemarks, bookingCancelDTO.istripstarted, bookingCancelDTO.IsLoadingUnloading); if (result == true) { PushNotification(new BookingBO().GetCustomerDeviceIDByBookingNo(bookingCancelDTO.bookingNo), bookingCancelDTO.bookingNo, UTILITY.NotifyCancelledByDriver); return(Ok(new { Status = UTILITY.SUCCESSMESSAGE })); } else { return(Ok(new { Status = UTILITY.FAILEDMESSAGE })); } } catch (Exception ex) { return(InternalServerError(ex)); } }
protected void Button1_Click(object sender, EventArgs e) { BookingDetails b = new BookingDetails(); b.customer_id = customerid1.Text; b.booking_id = bookingid1.Text; b.name = txtname.Text; b.flight_no = txtFlightno.Text; b.AirLinesName = txtAirlinesname.Text; b.locationfrom = txtLocationfrom.Text; b.LocationTo = txtLocationto.Text; b.DepartureTime = DateTime.Parse(txtDeparturetime.Text); b.date_of_journey = DateTime.Parse(txtDoj.Text); b.booking_date = DateTime.Parse(txtBookingdate.Text); b.no_of_passenger = int.Parse(ddlNoofpassengers.Text); b.total_price = double.Parse(txtTotalprice.Text); if (BookingBO.insertbookingdetails(b) == "Success") { bookmessage.Text = "Your Ticket has been successfully booked!!"; } else { bookmessage.Text = "Please book your details again"; } }
void Grid_RowsChanging(object sender, GridViewCollectionChangingEventArgs e) { if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.Remove) { objMaster = new BookingBO(); try { objMaster.GetByPrimaryKey(grdLister.CurrentRow.Cells["Id"].Value.ToInt()); if (objMaster.Current != null) { objMaster.Delete(objMaster.Current); } } catch (Exception ex) { if (objMaster.Errors.Count > 0) { ENUtils.ShowMessage(objMaster.ShowErrors()); } else { ENUtils.ShowMessage(ex.Message); } e.Cancel = true; } } }
public IHttpActionResult RejectBookingByDriverInNotification(BookingCancelDTO bookingCancelDTO) { try { var result = new BookingBO().BookingRejectedByDriver( HeaderValueByKey("AUTH_TOKEN"), bookingCancelDTO.driverID, bookingCancelDTO.vehicleNo, bookingCancelDTO.bookingNo, bookingCancelDTO.cancelRemarks, bookingCancelDTO.istripstarted, bookingCancelDTO.IsLoadingUnloading); if (result) { return(Ok(new { Status = UTILITY.SUCCESSMESSAGE })); } else { return(Ok(new { Status = UTILITY.FAILEDMESSAGE })); } } catch (Exception ex) { return(InternalServerError(ex)); } }
public IActionResult Post([FromBody] BookingBO book) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } return(Ok(facade.BookingService.Create(book))); }
void grdLister_CommandCellClick(object sender, EventArgs e) { GridCommandCellElement gridCell = (GridCommandCellElement)sender; if (gridCell.ColumnInfo.Name == "btnUpdate") { GridViewRowInfo row = gridCell.RowInfo; if (row is GridViewDataRowInfo) { long id = row.Cells[COLS.ID].Value.ToLong(); decimal fare = row.Cells[COLS.Charges].Value.ToDecimal(); decimal parking = row.Cells[COLS.Parking].Value.ToDecimal(); decimal waiting = row.Cells[COLS.Waiting].Value.ToDecimal(); decimal extraDrop = row.Cells[COLS.ExtraDrop].Value.ToDecimal(); decimal meetAndGreet = row.Cells[COLS.MeetAndGreet].Value.ToDecimal(); decimal CongtionCharge = row.Cells[COLS.CongtionCharge].Value.ToDecimal(); decimal TotalCharges = row.Cells[COLS.Total].Value.ToDecimal(); BookingBO objMaster = new BookingBO(); try { objMaster.GetByPrimaryKey(id); if (objMaster.Current != null) { objMaster.Current.FareRate = fare; objMaster.Current.ParkingCharges = parking; objMaster.Current.WaitingCharges = waiting; objMaster.Current.ExtraDropCharges = extraDrop; objMaster.Current.MeetAndGreetCharges = meetAndGreet; objMaster.Current.CongtionCharges = CongtionCharge; objMaster.Current.TotalCharges = TotalCharges; objMaster.Save(); ViewReport(); } } catch (Exception ex) { if (objMaster.Errors.Count > 0) { ENUtils.ShowMessage(objMaster.ShowErrors()); } else { ENUtils.ShowMessage(ex.Message); } } } } }
private void InitializeConstructor() { this.Load += new EventHandler(frmLocations_Load); objMaster = new BookingBO(); this.SetProperties((INavigation)objMaster); this.Shown += new EventHandler(frmLocations_Shown); grdLister.CellDoubleClick += new GridViewCellEventHandler(grdLister_CellDoubleClick); grdLister.RowsChanging += new Telerik.WinControls.UI.GridViewCollectionChangingEventHandler(Grid_RowsChanging); objMaster = new BookingBO(); }
//public decimal customerprice; //public decimal companyprice; public frmEditFare(long ID, int open) { InitializeComponent(); ObjMaster = new BookingBO(); ObjMaster.GetByPrimaryKey(ID); DisplayRecord(); openForm = open; }
public IHttpActionResult SaveBooking(Booking booking) { try { var result = new BookingBO().SaveBooking(booking); if (result) { Booking bookings = new BookingBO().GetBooking(new Booking { BookingNo = booking.BookingNo }); var driverList = new BookingBO().GetNearTrucksDeviceID(bookings.BookingNo, UTILITY.radius, bookings.VehicleType, bookings.VehicleGroup, bookings.Latitude, bookings.Longitude);//UTILITY.radius if (driverList.Count > 0) { PushNotification(driverList.Select(x => x.DeviceID).ToList <string>(), booking.BookingNo, UTILITY.NotifyNewBooking); return(Ok(new { bookingNo = booking.BookingNo, message = UTILITY.SUCCESSMSG })); } else { var CancelBooking = new BookingBO().DeleteBooking(new Booking { BookingNo = booking.BookingNo }); if (CancelBooking == true) { return(Ok(new { Status = UTILITY.NotifyCustomer })); } else { return(Ok(new { Status = UTILITY.NotifyCustomerFail })); } } } else { return(BadRequest()); } } catch (Exception ex) { return(InternalServerError(ex)); } }
void grdLister_CommandCellClick(object sender, EventArgs e) { try { GridCommandCellElement gridCell = (GridCommandCellElement)sender; if (gridCell.ColumnInfo.Name == "btnUpdate") { GridViewRowInfo row = gridCell.RowInfo; if (row is GridViewDataRowInfo) { long id = row.Cells[COLS.BookingId].Value.ToLong(); decimal fare = row.Cells[COLS.Charges].Value.ToDecimal(); decimal parking = row.Cells[COLS.Parking].Value.ToDecimal(); decimal waiting = row.Cells[COLS.Waiting].Value.ToDecimal(); decimal extraDrop = row.Cells[COLS.ExtraDrop].Value.ToDecimal(); decimal meetAndGreet = row.Cells[COLS.MeetAndGreet].Value.ToDecimal(); decimal CongtionCharge = row.Cells[COLS.CongtionCharge].Value.ToDecimal(); decimal TotalCharges = row.Cells[COLS.Total].Value.ToDecimal(); string pickup = row.Cells[COLS.PickupPoint].Value.ToStr(); string destination = row.Cells[COLS.Destination].Value.ToStr(); BookingBO objMaster = new BookingBO(); objMaster.GetByPrimaryKey(id); if (objMaster.Current != null) { objMaster.Current.FareRate = fare; objMaster.Current.CustomerPrice = fare; objMaster.Current.ParkingCharges = parking; objMaster.Current.WaitingCharges = waiting; objMaster.Current.ExtraDropCharges = extraDrop; objMaster.Current.MeetAndGreetCharges = meetAndGreet; objMaster.Current.CongtionCharges = CongtionCharge; objMaster.Current.TotalCharges = TotalCharges; objMaster.Current.FromAddress = pickup; objMaster.Current.ToAddress = destination; objMaster.CheckDataValidation = false; objMaster.CheckCustomerValidation = false; objMaster.Save(); } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ClearJob(long jobId) { BookingBO obj = new BookingBO(); obj.GetByPrimaryKey(jobId); if (obj.Current != null) { obj.CheckCustomerValidation = false; obj.CheckDataValidation = false; obj.DisableUpdateReturnJob = true; obj.Current.BookingStatusId = Enums.BOOKINGSTATUS.DISPATCHED; obj.Save(); } }
public frmAllocateDriver(long ID, int openFrom) { InitializeComponent(); ObjMaster = new BookingBO(); ObjMaster.GetByPrimaryKey(ID); ComboFunctions.FillDriverNoCombo(ddl_Driver); // ComboFunctions.FillDriverNoQueueCombo(ddl_Driver); DisplayRecord(); this.Shown += new EventHandler(frmAllocateDriver_Shown); this.KeyDown += new KeyEventHandler(frmAllocateDriver_KeyDown); this.IsOpenFrom = openFrom; }
public frmImportBooking() { InitializeComponent(); this.Load += new EventHandler(frmComcabBooking_Load); objWBView = new WorkbookView(); objMaster = new BookingBO(); this.SetProperties((INavigation)objMaster); grdBookings.TableElement.RowHeight = 70; grdBookings.TableElement.AlternatingRowColor = Color.AliceBlue; grdBookings.EnableAlternatingRowColor = true; grdBookings.ViewCellFormatting += new CellFormattingEventHandler(grdBookings_ViewCellFormatting); this.InitializeForm("frmBooking"); grdBookings.ShowRowHeaderColumn = true; }
public IHttpActionResult DriverReceivedConfirm(string BookingNo) { var result = new BookingBO().CustomerPaymentUpdate(BookingNo); if (result) { PushNotification(new BookingBO().GetCustomerDeviceIDByBookingNoByPaymentReceiveConfirm(BookingNo), BookingNo, UTILITY.NotifyDriverpaymentReceived); return(Ok(new { UTILITY.NotifyDriverpaymentReceived })); } else { return(Ok(new { UTILITY.FAILEDMESSAGE })); } }
public IHttpActionResult SaveDestinationReachDateTime(DestinationReachDateTimeDTO obj) { try { var result = new BookingBO().SaveDestinationReachDateTime(obj.bookingNo, obj.DestinationReachDateTime); if (result) { PushNotification(new BookingBO().GetCustomerDeviceIDByBookingNo(obj.bookingNo), obj.bookingNo, UTILITY.NotifyDestinationReachDateTime); } return(Ok(result ? UTILITY.SUCCESSMSG : UTILITY.FAILEDMSG)); } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult IsConfirmBooking(string bookingNo) { try { var booking = new BookingBO().GetBooking(new Booking { BookingNo = bookingNo }); var driverInfo = new Driver(); var driverActivity = new DriverActivity(); if (booking.IsConfirm) { driverInfo = new DriverBO().GetDriver(new Driver { DriverID = booking.DriverID }); driverActivity = new DriverActivityBO().GetDriverActivityByDriverID(new DriverActivity { DriverID = booking.DriverID }); } if (booking != null) { return(Ok(new { isConfirm = booking.IsConfirm, driverId = driverInfo.DriverID ?? "", vehicleNo = driverInfo.VehicleNo ?? "", driverName = driverInfo.DriverName ?? "", driverImage = "", MobileNo = driverInfo.MobileNo ?? "", latitude = driverActivity.CurrentLat, longitude = driverActivity.CurrentLong, OTP = booking.OTP, VehicleType = booking.VehicleType })); } else { return(NotFound()); } } catch (Exception ex) { return(InternalServerError(ex)); } }
public IActionResult Put(int id, [FromBody] BookingBO book) { if (id != book.Id) { return(StatusCode(405, "Path Id does not match Booking Id in json object")); } try { var bookUpdated = facade.BookingService.Update(book); return(Ok(bookUpdated)); } catch (InvalidOperationException e) { return(StatusCode(404, e.Message)); } }
public frmTrashBooking() { InitializeComponent(); InitializeConstructor(); this.Load += new EventHandler(frmLocations_Load); grdLister.CellDoubleClick += new GridViewCellEventHandler(grdLister_CellDoubleClick); grdLister.RowsChanging += new Telerik.WinControls.UI.GridViewCollectionChangingEventHandler(Grid_RowsChanging); objMaster = new BookingBO(); this.SetProperties((INavigation)objMaster); grdLister.ShowRowHeaderColumn = false; this.Shown += new EventHandler(frmTrashBooking_Shown); grdLister.CommandCellClick += new CommandCellClickEventHandler(grid_CommandCellClick); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { FlightSchedule F = (FlightSchedule)Cache["Flight"]; txtFlightno.Text = F.FlightNo; txtAirlinesname.Text = F.AirlineName; txtLocationfrom.Text = F.Locationfrom; txtLocationto.Text = F.LocationTo; txtDeparturetime.Text = F.DepartureTime.ToString("HH:mm:ss"); txtDoj.Text = F.DateofJourney.ToString(); txtBookingdate.Text = DateTime.Now.ToString(); customerid1.Text = Session["User"].ToString(); bookingid1.Text = BookingBO.getbookid(); txtname.Text = BookingBO.getcustomername(Session["User"].ToString()); } }
public IHttpActionResult GetDriverBySearch(int?status) { try { var result = new BookingBO().GetCustomerBySearch(status); if (result != null) { return(Ok(result)); } else { return(NotFound()); } } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult BookingHistoryList() { try { var bookingList = new BookingBO().GetBookingHistoryList(); if (bookingList != null) { return(Ok(bookingList)); } else { return(NotFound()); } } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult BookingHistoryListbyCustomerMobileNo(string MobileNo) { try { var bookingList = new BookingBO().GetBookingHistoryList().Where(x => x.CustomerID == MobileNo); if (bookingList != null) { return(Ok(bookingList)); } else { return(NotFound()); } } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult BookingList(string mobileNo) { try { var bookingList = new BookingBO().GetListByMobileNo(mobileNo); if (bookingList != null) { return(Ok(bookingList)); } else { return(NotFound()); } } catch (Exception ex) { return(InternalServerError(ex)); } }
public frmWebBookingsList() { InitializeComponent(); this.Load += new EventHandler(frmBookingsList_Load); grdLister.CellDoubleClick += new GridViewCellEventHandler(grdLister_CellDoubleClick); objMaster = new BookingBO(); this.SetProperties((INavigation)objMaster); grdLister.ShowGroupPanel = false; grdLister.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; grdLister.CommandCellClick += new CommandCellClickEventHandler(grid_CommandCellClick); grdLister.ViewCellFormatting += new CellFormattingEventHandler(grdLister_ViewCellFormatting); grdLister.VerticalScroll.LargeChange = 100; grdLister.TableElement.VScrollBar.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed; }