Esempio n. 1
0
        // GET: Home
        public ActionResult Index()
        {
            myFormViewModel mfvm = new myFormViewModel();
            indexshake      ish  = new indexshake();
            myFormManager   mfm  = new myFormManager();

            ish.myformmanager   = mfm;
            ish.myfromviewmodel = mfvm;
            if (Session["login"] != null)
            {
                return(View(ish));
            }
            return(RedirectToAction("Login"));
        }
Esempio n. 2
0
        public void RegisterMyForm(myFormViewModel data)
        {
            BusinessLayerResult <myform> layerResult = new BusinessLayerResult <myform>();

            if (data != null)
            {
                int dbResult = repo_form.Insert(new myform()
                {
                    name        = data.name,
                    description = data.description,
                    createdBy   = data.createdBy,
                    createdAt   = DateTime.Now
                });
            }
        }
Esempio n. 3
0
        public ActionResult Index(indexshake model)
        {
            myFormViewModel myf = model.myfromviewmodel;

            myf.createdBy = Int32.Parse(Session["adminId"].ToString());
            formManager fm = new formManager();

            fm.RegisterMyForm(myf);
            myFormViewModel mfvm = new myFormViewModel();
            indexshake      ish  = new indexshake();
            myFormManager   mfm  = new myFormManager();

            ish.myformmanager   = mfm;
            ish.myfromviewmodel = mfvm;
            return(View(ish));
        }