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