public void DisplayCancelReason() { objMaster.GetByPrimaryKey(BookingId); if (objMaster != null) { txtCancelReason.Text = objMaster.Current.CancelReason; this.BookingTypeId = objMaster.Current.BookingTypeId.ToInt(); this.MobileNo = objMaster.Current.CustomerMobileNo.ToStr(); this.RefNumber = objMaster.Current.BookingNo.ToStr(); this._onlineBookingId = objMaster.Current.OnlineBookingId.ToLong(); } }
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; } } }
void DisplayRecords() { // Booking b = new Booking(); objNotes.GetByPrimaryKey(BookingId); var data1 = objNotes.Current.Booking_Notes.OrderBy(c => c.Id); if (objNotes.Current.Booking_Notes.Count() > 0) { GridViewRowInfo row = null; for (int i = 0; i < objNotes.Current.Booking_Notes.Count(); i++) { row = grdNotes.Rows.AddNew(); row.Cells[COL_NOTE.NOTES].Value = objNotes.Current.Booking_Notes[i].notes.ToStr(); row.Cells[COL_NOTE.ID].Value = objNotes.Current.Booking_Notes[i].Id.ToInt(); row.Cells[COL_NOTE.MASTERID].Value = BookingId; } grdNotes.CurrentRow = null; } }
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(); } } }
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); } } } } }
//public decimal customerprice; //public decimal companyprice; public frmEditFare(long ID, int open) { InitializeComponent(); ObjMaster = new BookingBO(); ObjMaster.GetByPrimaryKey(ID); DisplayRecord(); openForm = open; }
// Show Data void grdLister_CellDoubleClick(object sender, GridViewCellEventArgs e) { try { //ViewDetailForm(); objMaster.GetByPrimaryKey(grdLister.CurrentRow.Cells["Id"].Value.ToInt()); DisplayRecord(); } catch (Exception 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); } }
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; }
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(); } }
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.Waiting].Value.ToDecimal(); decimal CongtionCharge = row.Cells[COLS.Parking].Value.ToDecimal(); decimal TotalCharges = row.Cells[COLS.Total].Value.ToDecimal(); BookingBO objMaster = new BookingBO(); objMaster.GetByPrimaryKey(id); if (objMaster.Current != null) { objMaster.Current.FareRate = fare; // objMaster.Current.ParkingCharges = CongtionCharge; // objMaster.Current.WaitingCharges = meetAndGreet; objMaster.Current.ExtraDropCharges = extraDrop; objMaster.Current.MeetAndGreetCharges = meetAndGreet; objMaster.Current.CongtionCharges = CongtionCharge; objMaster.Current.TotalCharges = TotalCharges; objMaster.CheckCustomerValidation = false; objMaster.DisableUpdateReturnJob = true; objMaster.Save(); ViewReport(); } } } }
void firstContextMenuItem1_Click(object sender, EventArgs e) { try { if (grdJobDetails.CurrentRow != null && grdJobDetails.CurrentRow is GridViewDataRowInfo) { BookingBO objBookingMaster = new BookingBO(); objBookingMaster.GetByPrimaryKey(grdJobDetails.CurrentRow.Cells["Id"].Value.ToLong()); if (objBookingMaster.Current != null) { try { objBookingMaster.CheckDataValidation = false; objBookingMaster.CheckCustomerValidation = false; objBookingMaster.Current.GroupJobId = null; objBookingMaster.Save(); PopulateData(this.GroupId, this.SelectedJobId); } catch (Exception ex) { if (objBookingMaster.Errors.Count > 0) { ENUtils.ShowMessage(objBookingMaster.ShowErrors()); } else { ENUtils.ShowMessage(ex.Message); } } } } } catch (Exception ex) { // ENUtils.ShowMessage(ex.Message); } }
void frmDriverLogin_Shown(object sender, EventArgs e) { try { objBooking = new BookingBO(); objBooking.GetByPrimaryKey(_objBooking.Id); if (objBooking.Current != null) { GridViewRowInfo row = null; foreach (var item in objBooking.Current.Booking_Biddings.Where(c => c.BidRate != null).OrderBy(c => c.BidRate)) { row = grdDrivers.Rows.AddNew(); row.Cells["Id"].Value = item.JobId; row.Cells["DriverNo"].Value = item.Fleet_Driver.DefaultIfEmpty().DriverNo + " - " + item.Fleet_Driver.DefaultIfEmpty().DriverName.ToStr(); row.Cells["Bid"].Value = item.BidRate.ToDecimal(); row.Cells["DriverId"].Value = item.DriverId.ToIntorNull(); } lblTotal.Text = "Total Bids : " + grdDrivers.Rows.Count; } if (objBooking.Current.DriverId != null && (objBooking.Current.BookingStatusId == Enums.BOOKINGSTATUS.PENDING || objBooking.Current.BookingStatusId == Enums.BOOKINGSTATUS.PENDING_START)) { grdDrivers.Enabled = false; txtJobOfferedTo.Text = "Job Offered to Driver (" + objBooking.Current.Fleet_Driver.DefaultIfEmpty().DriverNo + ")"; } } catch (Exception ex) { ENUtils.ShowMessage(ex.Message); } }
private void btnDeleteSelected_Click(object sender, EventArgs e) { try { if (grdLister.Rows.Where(c => c.Cells["Check"].Value.ToBool()).Count() == 0) { return; } if (DialogResult.Yes == RadMessageBox.Show("Are you sure you want to delete Selected Booking(s) ? ", "", MessageBoxButtons.YesNo, RadMessageIcon.Question)) { foreach (GridViewRowInfo row in grdLister.Rows.Where(c => c.Cells["Check"].Value.ToBool())) { objMaster = new BookingBO(); objMaster.GetByPrimaryKey(row.Cells["Id"].Value.ToInt()); if (objMaster.Current != null) { objMaster.Delete(objMaster.Current); } } PopulateData(); } } catch (Exception ex) { if (objMaster.Errors.Count > 0) { ENUtils.ShowMessage(objMaster.ShowErrors()); } else { ENUtils.ShowMessage(ex.Message); } } }
void frmDriverLogin_Shown(object sender, EventArgs e) { try { var list = (from a in General.GetQueryable <Fleet_Driver>(c => c.IsActive == true && c.HasPDA == true) orderby a.DriverNo select new { Id = a.Id, DriverName = a.DriverNo + " - " + a.DriverName }).ToList(); // General.GetQueryable<Fleet_Driver>(null) grdDrivers.RowCount = list.Count; for (int i = 0; i < list.Count; i++) { grdDrivers.Rows[i].Cells["colId"].Value = list[i].Id; grdDrivers.Rows[i].Cells["colDrv"].Value = list[i].DriverName; } lblPrice.Text = "£" + _objBooking.FareRate.ToStr(); objBooking = new BookingBO(); objBooking.GetByPrimaryKey(_objBooking.Id); if (objBooking.Current != null) { GridViewRowInfo row = null; foreach (var item in objBooking.Current.Booking_Biddings) { row = grdDrivers.Rows.FirstOrDefault(c => c.Cells["colId"].Value.ToIntorNull() == item.DriverId); if (row != null) { row.Cells["Id"].Value = item.Id; row.Cells["colChk"].Value = true; row.Tag = "lock"; } } } DateTime?biddingExpiry = objBooking.Current.PriceBiddingExpiryDate; if (biddingExpiry == null) { if (objBooking.Current.PickupDateTime.Value.Date > DateTime.Now.Date) { biddingExpiry = objBooking.Current.PickupDateTime.Value.AddHours(-2); } else { biddingExpiry = objBooking.Current.PickupDateTime.Value.AddMinutes(-15); } } txtBiddingExpiryDate.Text = string.Format("{0:dd/MM/yyyy HH:mm}", biddingExpiry); } catch (Exception ex) { ENUtils.ShowMessage(ex.Message); } }
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 Destination = row.Cells[COLS.Destination].Value.ToStr(); string PickupPoint = row.Cells[COLS.PickupPoint].Value.ToStr(); string Passenger = row.Cells[COLS.Passenger].Value.ToStr(); // int? VehicleID = row.Cells[COLS.VehicleID].Value.ToInt(); int?invoicepaymentId = row.Cells[COLS.Payment_ID].Value.ToIntorNull(); string orderNo = row.Cells[COLS.OrderNo].Value.ToStr(); BookingBO objMaster = new BookingBO(); objMaster.GetByPrimaryKey(id); if (objMaster.Current != null) { objMaster.Current.CompanyPrice = 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.InvoicePaymentTypeId = invoicepaymentId; objMaster.Current.OrderNo = orderNo; if (Destination == "") { RadMessageBox.Show("Requried: Destination"); } else if (PickupPoint == "") { RadMessageBox.Show("Requried: PickupPoint"); } else { objMaster.Current.ToAddress = Destination; objMaster.Current.FromAddress = PickupPoint; objMaster.Current.CustomerName = Passenger; // objMaster.Current.VehicleTypeId = VehicleID; objMaster.Save(); } CalculateTotal(); } } } } catch (Exception ex) { } }
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.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 Destination = row.Cells[COLS.Destination].Value.ToStr(); string PickupPoint = row.Cells[COLS.PickupPoint].Value.ToStr(); string Passenger = row.Cells[COLS.Passenger].Value.ToStr(); int? VehicleID = row.Cells[COLS.VehicleID].Value.ToInt(); int? invoicepaymentId = row.Cells[COLS.Payment_ID].Value.ToInt(); BookingBO objMaster = new BookingBO(); objMaster.GetByPrimaryKey(id); if (objMaster.Current != null) { objMaster.Current.CompanyPrice = 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.InvoicePaymentTypeId = invoicepaymentId; if (Destination == "") { RadMessageBox.Show("Requried: Destination"); } else if (PickupPoint == "") { RadMessageBox.Show("Requried: PickupPoint"); } else { objMaster.Current.ToAddress = Destination; objMaster.Current.FromAddress = PickupPoint; objMaster.Current.CustomerName = Passenger; objMaster.Current.VehicleTypeId = VehicleID; objMaster.Save(); } CalculateTotal(); } } } else if (gridCell.ColumnInfo.Name.ToLower() == "btndelete") { if (DialogResult.Yes == RadMessageBox.Show("Are you sure you want to delete a Booking ? ", "", MessageBoxButtons.YesNo, RadMessageIcon.Question)) { RadGridView grid = gridCell.GridControl; grid.CurrentRow.Delete(); } } }
private void btnDeleteSelected_Click(object sender, EventArgs e) { try { if (grdLister.Rows.Where(c => c.Cells["Check"].Value.ToBool()).Count() == 0) { return; } if (DialogResult.Yes == RadMessageBox.Show("Are you sure you want to Save and Ready Selected Booking(s) ? ", "", MessageBoxButtons.YesNo, RadMessageIcon.Question)) { bool RentGenerated = false; foreach (GridViewRowInfo row in grdLister.Rows.Where(c => c.Cells["Check"].Value.ToBool()).ToList()) { objMaster = new BookingBO(); objMaster.GetByPrimaryKey(row.Cells[COLS.BookingId].Value.ToLong()); if (objMaster.Current != null) { if (General.GetQueryable <DriverRent_Charge>(c => c.BookingId == row.Cells[COLS.BookingId].Value.ToLong()).Count() == 0) //if (objMaster.Current.DriverRent_Charges.Count == 0) { objMaster.Current.FareRate = row.Cells[COLS.Fares].Value.ToDecimal(); objMaster.Current.CompanyPrice = row.Cells[COLS.CompanyPrice].Value.ToDecimal(); objMaster.Current.CongtionCharges = row.Cells[COLS.DParking].Value.ToDecimal(); objMaster.Current.MeetAndGreetCharges = row.Cells[COLS.DWaiting].Value.ToDecimal(); objMaster.Current.DriverCommission = row.Cells[COLS.CommissionAmount].Value.ToDecimal(); objMaster.Current.ParkingCharges = row.Cells[COLS.CParking].Value.ToDecimal(); objMaster.Current.WaitingCharges = row.Cells[COLS.CWaiting].Value.ToDecimal(); objMaster.Current.IsProcessed = false; objMaster.CheckCustomerValidation = false; objMaster.CheckDataValidation = false; objMaster.Save(); } else { RentGenerated = true; } //row.Delete(); } } PopulateData(); if (RentGenerated) { ENUtils.ShowMessage("Some Jobs are not UnProcessed because of Rent Transaction is Generated from it"); } // grdLister.Rows.Where(c=>processedJobList.Contains(c.Cells[COLS.BookingId].Value.ToLong())).ToList().RemoveAll( } } catch (Exception ex) { if (objMaster.Errors.Count > 0) { ENUtils.ShowMessage(objMaster.ShowErrors()); } else { ENUtils.ShowMessage(ex.Message); } } }
private void btnDeleteSelected_Click(object sender, EventArgs e) { try { if (grdLister.Rows.Where(c => c.Cells["Check"].Value.ToBool()).Count() == 0) { return; } if (DialogResult.Yes == RadMessageBox.Show("Are you sure you want to Save and Ready Selected Booking(s) ? ", "", MessageBoxButtons.YesNo, RadMessageIcon.Question)) { // List<long> processedJobList = new List<long>(); foreach (GridViewRowInfo row in grdLister.Rows.Where(c => c.Cells["Check"].Value.ToBool()).ToList()) { objMaster = new BookingBO(); objMaster.GetByPrimaryKey(row.Cells[COLS.BookingId].Value.ToLong()); if (objMaster.Current != null) { if (objMaster.Current.MasterJobId != null) { objMaster.Current.Booking1.ReturnFareRate = row.Cells[COLS.Fares].Value.ToDecimal(); objMaster.Current.Booking1.WaitingMins = row.Cells[COLS.CompanyPrice].Value.ToDecimal(); } objMaster.Current.FareRate = row.Cells[COLS.Fares].Value.ToDecimal(); objMaster.Current.CompanyPrice = row.Cells[COLS.CompanyPrice].Value.ToDecimal(); // objMaster.Current.EscortPrice = row.Cells[COLS.EscortPrice].Value.ToDecimal(); objMaster.Current.CongtionCharges = row.Cells[COLS.DParking].Value.ToDecimal(); objMaster.Current.MeetAndGreetCharges = row.Cells[COLS.DWaiting].Value.ToDecimal(); objMaster.Current.DriverCommission = row.Cells[COLS.CommissionAmount].Value.ToDecimal(); objMaster.Current.ParkingCharges = row.Cells[COLS.CParking].Value.ToDecimal(); objMaster.Current.WaitingCharges = row.Cells[COLS.CWaiting].Value.ToDecimal(); objMaster.Current.IsProcessed = true; objMaster.CheckCustomerValidation = false; objMaster.CheckDataValidation = false; objMaster.DisableUpdateReturnJob = true; objMaster.Save(); // processedJobList.Add(objMaster.Current.Id); //row.Delete(); } } PopulateData(); // grdLister.Rows.Where(c=>processedJobList.Contains(c.Cells[COLS.BookingId].Value.ToLong())).ToList().RemoveAll( } } catch (Exception ex) { if (objMaster.Errors.Count > 0) { ENUtils.ShowMessage(objMaster.ShowErrors()); } else { ENUtils.ShowMessage(ex.Message); } } }
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 == "save") { RadGridView grid = gridCell.GridControl; if (grid.CurrentRow != null && grid.CurrentRow is GridViewDataRowInfo) { objMaster = new BookingBO(); objMaster.GetByPrimaryKey(id); if (objMaster.Current != null) { if (objMaster.Current.MasterJobId != null) { objMaster.Current.Booking1.ReturnFareRate = grid.CurrentRow.Cells[COLS.Fares].Value.ToDecimal(); objMaster.Current.Booking1.WaitingMins = grid.CurrentRow.Cells[COLS.CompanyPrice].Value.ToDecimal(); } objMaster.Current.FareRate = grid.CurrentRow.Cells[COLS.Fares].Value.ToDecimal(); objMaster.Current.CompanyPrice = grid.CurrentRow.Cells[COLS.CompanyPrice].Value.ToDecimal(); objMaster.Current.ParkingCharges = grid.CurrentRow.Cells[COLS.CParking].Value.ToDecimal(); objMaster.Current.WaitingCharges = grid.CurrentRow.Cells[COLS.CWaiting].Value.ToDecimal(); objMaster.Current.CongtionCharges = grid.CurrentRow.Cells[COLS.DParking].Value.ToDecimal(); objMaster.Current.MeetAndGreetCharges = grid.CurrentRow.Cells[COLS.DWaiting].Value.ToDecimal(); objMaster.Current.DriverCommission = grid.CurrentRow.Cells[COLS.CommissionAmount].Value.ToDecimal(); objMaster.Current.EscortPrice = grid.CurrentRow.Cells[COLS.EscortPrice].Value.ToDecimal(); objMaster.CheckCustomerValidation = false; objMaster.CheckDataValidation = false; objMaster.DisableUpdateReturnJob = true; objMaster.Save(); } } } else if (name == "saveandready") { RadGridView grid = gridCell.GridControl; objMaster = new BookingBO(); objMaster.GetByPrimaryKey(id); if (objMaster.Current != null) { if (objMaster.Current.MasterJobId != null) { objMaster.Current.Booking1.ReturnFareRate = grid.CurrentRow.Cells[COLS.Fares].Value.ToDecimal(); objMaster.Current.Booking1.WaitingMins = grid.CurrentRow.Cells[COLS.CompanyPrice].Value.ToDecimal(); } objMaster.Current.FareRate = grid.CurrentRow.Cells[COLS.Fares].Value.ToDecimal(); objMaster.Current.CompanyPrice = grid.CurrentRow.Cells[COLS.CompanyPrice].Value.ToDecimal(); objMaster.Current.ParkingCharges = grid.CurrentRow.Cells[COLS.CParking].Value.ToDecimal(); objMaster.Current.WaitingCharges = grid.CurrentRow.Cells[COLS.CWaiting].Value.ToDecimal(); objMaster.Current.CongtionCharges = grid.CurrentRow.Cells[COLS.DParking].Value.ToDecimal(); objMaster.Current.MeetAndGreetCharges = grid.CurrentRow.Cells[COLS.DWaiting].Value.ToDecimal(); objMaster.Current.DriverCommission = grid.CurrentRow.Cells[COLS.CommissionAmount].Value.ToDecimal(); objMaster.Current.EscortPrice = grid.CurrentRow.Cells[COLS.EscortPrice].Value.ToDecimal(); objMaster.Current.IsProcessed = true; objMaster.CheckCustomerValidation = false; objMaster.CheckDataValidation = false; objMaster.DisableUpdateReturnJob = true; objMaster.Save(); row.Delete(); } } }