public IHttpActionResult SaveGrn(whgr1 Grn) { if (!ModelState.IsValid) { return(BadRequest()); } int trxNo = GrnHelper.SaveGrn(Grn); if (trxNo <= 0) { return(InternalServerError()); } return(Ok(trxNo)); }
public IHttpActionResult GetStatusCode(int TrxNo) { if (!ModelState.IsValid) { return(BadRequest()); } whgr1 myGrn = GrnHelper.GetGrn(TrxNo); if (myGrn == null) { return(InternalServerError()); } return(Ok(myGrn.StatusCode)); }
public IHttpActionResult GetNewGrnNo(DateTime ReceiptDate) { if (!ModelState.IsValid) { return(BadRequest()); } string newGrnNo = GrnHelper.GetNewGrnNo(ReceiptDate); if (string.IsNullOrEmpty(newGrnNo)) { return(InternalServerError()); } return(Ok(newGrnNo)); }
public IHttpActionResult DeleteGrnDetail(int TrxNo, int LineItemNo) { if (!ModelState.IsValid) { return(BadRequest()); } int afRecCnt = GrnHelper.DeleteGrnDetail(TrxNo, LineItemNo); if (afRecCnt <= 0) { return(InternalServerError()); } return(Ok()); }
public IHttpActionResult AssignBinNo(int TrxNo, int LineItemNo) { if (!ModelState.IsValid) { return(BadRequest()); } string BinNo = GrnHelper.AssignBinNo(TrxNo, LineItemNo); if (string.IsNullOrEmpty(BinNo)) { return(InternalServerError()); } return(Ok(BinNo)); }
public IHttpActionResult AssignBinNos(int TrxNo) { if (!ModelState.IsValid) { return(BadRequest()); } var myGrnDetails = GrnHelper.AssignBinNos(TrxNo); if (myGrnDetails == null) { return(InternalServerError()); } return(Ok(myGrnDetails)); }
public IHttpActionResult SaveGrnDetail(whgr2 grnDetail) { if (!ModelState.IsValid) { return(BadRequest()); } int afRecCnt = GrnHelper.SaveGrnDetail(grnDetail); if (afRecCnt <= 0) { return(InternalServerError()); } return(Ok()); }
public IHttpActionResult GetGrnDetail(int TrxNo, int LineItemNo) { if (!ModelState.IsValid) { return(BadRequest()); } var myGrnDetail = GrnHelper.GetGrnDetail(TrxNo, LineItemNo); if (myGrnDetail == null) { return(InternalServerError()); } return(Ok(myGrnDetail)); }
public IHttpActionResult DeleteGrn(int TrxNo, int Type) { if (!ModelState.IsValid) { return(BadRequest()); } int afRecCnt = GrnHelper.DeleteGrn(TrxNo, Type); if (afRecCnt <= 0) { return(BadRequest()); } return(Ok()); }
public IHttpActionResult GetItems(string WarehouseCode, string SupplierCode) { if (!ModelState.IsValid) { return(BadRequest()); } var items = GrnHelper.GetPutAwayItem(WarehouseCode, SupplierCode); if (items == null) { return(InternalServerError()); } return(Ok(items)); }
public IHttpActionResult AssignBinNos(dynamic GrnDetails) { if (!ModelState.IsValid) { return(BadRequest()); } foreach (var item in GrnDetails) { int TrxNo = item.TrxNo; int LineItemNo = item.LineItemNo; string binNo = GrnHelper.AssignBinNo(TrxNo, LineItemNo); item.BinNo = binNo; } return(Ok(GrnDetails)); }
public IHttpActionResult GetGrn(int TrxNo) { if (!ModelState.IsValid) { return(BadRequest()); } var whgr1 = GrnHelper.GetGrn(TrxNo); var whgr2 = GrnHelper.GetGrnDetails(TrxNo); if (whgr1 == null) { return(InternalServerError()); } var data = new { whgr1, whgr2 }; return(Ok(data)); }