public SPReturnResult UpdatePalletChange(PalletChangeRequest request) { MesDataContext db = new MesDataContext(); string rtrnMsg = ""; bool? rtrnCode = false; db.MES_SP_S_Swap_Damaged_Pallets(request.OldPalletId, request.NewPalletId, request.Comment, false, ref rtrnMsg, ref rtrnCode); return new SPReturnResult { Code = (bool)rtrnCode, Message = rtrnMsg, }; }
public void UpdatePalletChange(PalletChangeRequest request) { AdminFactory factory = new AdminFactory(); var result = factory.UpdatePalletChange(request); if (!result.Code) { throw new HttpResponseException( HttpErrorResponse.GetHttpErrorResponse( HttpStatusCode.NotFound, "SQL Error", result.Message)); } }