示例#1
0
        public ActionResult FieldDelete(FieldDeleteViewModel fvm)
        {
            if (ModelState.IsValid)
            {
                _ud.DeleteField(fvm.fieldName);

                string url = Url.Action("RefreshFieldsList", "Fields");
                return(Json(new { success = true, url = url, target = fvm.target }));
            }
            return(PartialView("FieldDelete", fvm));
        }
示例#2
0
        public ActionResult FieldDelete(string name, string target)
        {
            FieldDeleteViewModel fvm = new FieldDeleteViewModel();

            fvm.target = target;

            Field fld = _ud.GetFieldDetails(name);

            fvm.fieldName = fld.fieldName;
            fvm.act       = "Delete";

            return(PartialView("FieldDelete", fvm));
        }