示例#1
0
        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!" }));
        }
示例#2
0
        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!" }));
        }
示例#3
0
        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 }));
        }