public IHttpActionResult SaveGin(whgi1 gin) { if (!ModelState.IsValid) { return(BadRequest()); } int trxNo = GinHelper.SaveGin(gin); if (trxNo <= 0) { return(InternalServerError()); } return(Ok(trxNo)); }
public IHttpActionResult DeleteFromInv(int TrxNo) { if (!ModelState.IsValid) { return(BadRequest()); } bool isValid = GinHelper.DeleteFromInv(TrxNo); if (!isValid) { return(InternalServerError()); } return(Ok()); }
public IHttpActionResult GetGin(int TrxNo) { if (!ModelState.IsValid) { return(BadRequest()); } var myGin = GinHelper.GetGin(TrxNo); if (myGin == null) { return(NotFound()); } return(Ok(myGin)); }
public IHttpActionResult GetNewGinNo(DateTime IssueDate) { if (!ModelState.IsValid) { return(BadRequest()); } string newGinNo = GinHelper.GetNewGinNo(IssueDate); if (string.IsNullOrEmpty(newGinNo)) { return(InternalServerError()); } return(Ok(newGinNo)); }
public IHttpActionResult DeleteGinDetail(int TrxNo, int LineItemNo) { if (!ModelState.IsValid) { return(BadRequest()); } bool isValid = GinHelper.DeleteGinDetail(TrxNo, LineItemNo); if (!isValid) { return(InternalServerError()); } return(Ok()); }
public IHttpActionResult SaveGinDetails(IEnumerable <whgi2> ginDetails) { if (!ModelState.IsValid) { return(BadRequest()); } bool isValid = GinHelper.SaveGinDetails(ginDetails); if (!isValid) { return(InternalServerError()); } return(Ok()); }
public IHttpActionResult GetGinDetail(int TrxNo, int LineItemNo) { if (!ModelState.IsValid) { return(BadRequest()); } var ginDetail = GinHelper.GetGinDetail(TrxNo, LineItemNo); if (ginDetail == null) { return(NotFound()); } return(Ok(ginDetail)); }
public IHttpActionResult GetGinDetails(int TrxNo) { if (!ModelState.IsValid) { return(BadRequest()); } var ginDetails = GinHelper.GetGinDetails(TrxNo); if (ginDetails == null) { return(InternalServerError()); } return(Ok(ginDetails)); }
public IHttpActionResult DeleteGin(int TrxNo, int Type) { if (!ModelState.IsValid) { return(BadRequest()); } bool isValid = GinHelper.DeleteGin(TrxNo, Type); if (!isValid) { return(NotFound()); } return(Ok()); }