Example #1
0
        public void Update(InvoiceUpdateRequest model)
        {
            DataProvider.ExecuteNonQuery(GetConnection, "dbo.Invoice_Update",
                                         inputParamMapper : delegate(SqlParameterCollection paramCollection)
            {
                paramCollection.AddWithValue("@Id", model.Id);
                MapCommonParameters(model, paramCollection);
            }
                                         );

            return;
        }
Example #2
0
        public HttpResponseMessage Update(InvoiceUpdateRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, ModelState));
            }

            _invoice.Update(model);

            SuccessResponse response = new SuccessResponse();

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }
Example #3
0
 public InvoiceUpdateResponse InvoiceUpdate(InvoiceUpdateRequest request)
 {
     return(Execute <InvoiceUpdateRequest, InvoiceUpdateResponse>(
                request,
                response => response.Invoice = MealMenuOrderFacade.InvoiceUpdate(request.Invoice, request.UserId)));
 }