Пример #1
0
        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!" }));
        }
Пример #2
0
        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!" }));
        }
Пример #3
0
        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 }));
        }