public ManualBookingTrackModel GetByKeyId(int ManualBookingId) { ManualBookingTrackModel mbm = new ManualBookingTrackModel(); //mbm.BookingNo = "1234"; return(mbm); }
public MessageModel Save(ManualBookingTrackModel MbtModel, string CompanyCode) { MessageModel objMessage = new MessageModel(); string conString = CompanyConfigService.getDbCredentials(CompanyCode); SqlDataAceessLayer _dal = new SqlDataAceessLayer(conString); string Query = @"INSERT INTO Domestic.Trn_Vehicle_Tracking (Vehicle_ID,Trip_ID,Booking_ID,Manual_Booking_ID,Tracking_Date,Location, Tracking_Time,Remarks,Reason_ID,KMs) Select 0,0,0," + MbtModel.ManualBookingId.ToString() + ",'" + MbtModel.TrackingDate.ToString("yyyy-MM-dd") + "','" + MbtModel.Location + "','" + MbtModel.TrackingDate.ToString("HH:mm") + "','" + MbtModel.Remark + "'," + MbtModel.ReasonId + ",0"; try { DataSet Ds = _dal.ExecuteSql(Query); objMessage.MessageId = 0; objMessage.Message = "Save Sucessfully"; } catch (Exception ex) { objMessage.MessageId = 1; objMessage.Message = ex.Message; } return(objMessage); }
public ActionResult Save(ManualBookingTrackModel MbtModel) { ManualBookingTrackService mbtservice = new ManualBookingTrackService(); MessageModel msg = mbtservice.Save(MbtModel, "ripl"); return(Json(msg)); }