public IActionResult AddOverCostType(OverCostType OverCostType) { if (ModelState.IsValid) { var postResult = Helper.PostValueToSevice <OverCostType>("POST", OverCostType); return(Json(new { success = postResult.result, message = postResult.message })); } return(Json(new { success = false, message = "Model Is Not Vald!" })); }
public IActionResult EditOverCostType(long id, OverCostType OverCostType) { if (ModelState.IsValid) { OverCostType.State = BusinessEntity.Models.Base.Enums.ObjectState.Active; var postResult = Helper.PostValueToSevice <OverCostType>("PUT?id=" + OverCostType.Id.ToString(), OverCostType); return(Json(new { success = postResult.result, message = postResult.message })); } return(Json(new { success = false, message = "Model Is Not Valid!" })); }
public IActionResult DeleteOverCostType(OverCostType OverCostType) { var postResult = Helper.PostValueToSevice <OverCostType>("Delete?id=" + OverCostType.Id.ToString(), OverCostType); return(Json(new { success = postResult.result, message = postResult.message })); }