Exemplo n.º 1
0
 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,
     };
 }
Exemplo n.º 2
0
        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));
            }
        }