Example #1
0
        public ActionResult View(int id)
        {
            FormDataModel form = FormBO.GetInstance().Get(id);

            FormUIModel model = new FormUIModel();

            model.Name   = form.Name;
            model.Fields = FormdetailBO.GetInstance().GetByForm(id);

            return(View(model));
        }
Example #2
0
        public ActionResult FormdetailChildrenField(int id)
        {
            int count = FormBO.GetInstance().GetFormdetailCount(id);

            ChildrenFieldUIModel model = new ChildrenFieldUIModel()
            {
                ID        = id,
                Count     = count,
                ClassName = "Formdetail"
            };

            return(View("ChildrenField", model));
        }
Example #3
0
        public ActionResult Create(FormDataModel form)
        {
            FormBO.GetInstance().Create(form);

            if (Session["ParentID"] != null)
            {
                return(RedirectToAction("Index", new { id = Convert.ToInt32(Session["ParentID"]) }));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }
Example #4
0
        public ActionResult Delete(int id)
        {
            FormBO.GetInstance().Delete(id);

            return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
        }
Example #5
0
 public ActionResult Edit(int id)
 {
     return(View(FormBO.GetInstance().Get(id)));
 }
Example #6
0
        //
        // GET: /ManageForm/

        public ActionResult Index(int id = 0)
        {
            return(View(FormBO.GetInstance().GetAll(id)));
        }
Example #7
0
        //
        // GET: /Form/

        public ActionResult Index()
        {
            return(View(FormBO.GetInstance().GetAll()));
        }