public IHttpActionResult AttachOperatorDriver(OperatorDriverList operatorDriverlist) { try { var result = new OperatorDriverBO().SaveOperatorDriver(operatorDriverlist); return(Ok(result)); } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult SaveOperatorDriver(OperatorDriverList operatorDriverList) { try { var result = new OperatorDriverBO().SaveOperatorDriver(operatorDriverList); return(Ok(result ? UTILITY.SUCCESSMSG : UTILITY.FAILEDMSG)); } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult UpdateOperatorDriverTruckAttachment(OperatorDriverTruckAttachment operatorDriverTruckAttachment) { try { var result = new OperatorDriverBO().UpdateOperatorDriverTruckAttachment(operatorDriverTruckAttachment); if (result == true) { return(Ok(new { Status = UTILITY.SUCCESSMESSAGE })); } else { return(Ok(new { Status = UTILITY.FAILEDMESSAGE })); } } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult VehicleNoList(string OPeratorID) { try { var DriverList = new OperatorDriverBO().GetVehicleNoList(OPeratorID); if (DriverList != null) { return(Ok(DriverList)); } else { return(NotFound()); } } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult OperatorDrivertotalList() { try { var OperatorDriverList = new OperatorDriverBO().GetOperatorTotalDriverList(); if (OperatorDriverList != null) { return(Ok(OperatorDriverList)); } else { return(NotFound()); } } catch (Exception ex) { return(InternalServerError(ex)); } }
public IHttpActionResult CheckDriverVehicle() { try { var DRIVERID = HttpContext.Current.Request.Headers["DRIVERID"]; var OperatorDriverList = new OperatorDriverBO().GetOperatorDriverList(DRIVERID); string vehicleattachedNo = OperatorDriverList.Select(s => s.VehicleattachedNo).FirstOrDefault(); if (string.IsNullOrWhiteSpace(vehicleattachedNo)) { return(Ok(new { Status = UTILITY.FAILEDMESSAGE, Message = "Sorry there is No Vehicle attched to your Profile!" })); } else { return(Ok(new { Status = UTILITY.SUCCESSMESSAGE })); } } catch (Exception ex) { return(InternalServerError(ex)); } }