/// <summary> /// Webs the internal expense to biz internal expense. /// </summary> /// <param name="DataInternalExpense">The data internal expense.</param> /// <returns>BizInternalExpense.</returns> public static BizInternalExpense WebInternalExpenseToBizInternalExpense(this WebInternalExpense DataInternalExpense) { BizInternalExpense bizInternalExpense = new BizInternalExpense { Id = DataInternalExpense.Id, UserId = DataInternalExpense.UserId, Amount = DataInternalExpense.Amount, CreationDate = DataInternalExpense.CreationDate, }; return(bizInternalExpense); }
/// <summary> /// Bizs the internal expense to web internal expense. /// </summary> /// <param name="DataInternalExpense">The data internal expense.</param> /// <returns>WebInternalExpense.</returns> public static WebInternalExpense BizInternalExpenseToWebInternalExpense(this BizInternalExpense DataInternalExpense) { WebInternalExpense webInternalExpense = new WebInternalExpense { Id = DataInternalExpense.Id, UserId = DataInternalExpense.UserId, Amount = DataInternalExpense.Amount, CreationDate = DataInternalExpense.CreationDate, }; return(webInternalExpense); }
public IHttpActionResult Post(WebInternalExpense webInternalExpense) { string response = crudFuction.BizInsertInternalExpense(webInternalExpense.WebInternalExpenseToBizInternalExpense()); if (!response.Equals("EXITO")) { return(BadRequest(response)); } else { return(Ok(response)); } }