Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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"));
            }
        }
Exemplo n.º 4
0
        public ActionResult Delete(int id)
        {
            FormBO.GetInstance().Delete(id);

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

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

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