示例#1
0
        public ActionResult EditMDIForm()
        {
            List <SessionListnew> list = Session["SesDet"] as List <SessionListnew>;

            if (list == null)
            {
                return(Redirect("Login/InLogin"));
            }
            else
            {
                ViewBag.formsList = MDIHelper.FormsDDLListWithParentFormValue(list[0].CmpyCode);
                return(View());
            }
        }
示例#2
0
        public ActionResult MDIForm()
        {
            List <SessionListnew> list = Session["SesDet"] as List <SessionListnew>;

            if (list == null)
            {
                return(Redirect("Login/InLogin"));
            }
            else
            {
                var formsList = MDIHelper.FormsDDLList(list[0].CmpyCode);
                return(View(new MenuItemsVM
                {
                    ParentFormList = formsList,
                    MetaDataSettings = _masterService.GetMetaSettings()
                }));
            }
        }
示例#3
0
        public ActionResult MDIForm(FormCollection formCollection, MenuItemsVM menuItemsVM)
        {
            List <SessionListnew> list = Session["SesDet"] as List <SessionListnew>;

            if (list == null)
            {
                return(Redirect("Login/InLogin"));
            }
            else
            {
                if (ModelState.IsValid)
                {
                    var metaSettings = GetMetaSettings(formCollection["hdnMetaSettings"]);
                    menuItemsVM.MenuItemSettings = metaSettings;
                    menuItemsVM.CmpyCode         = list[0].CmpyCode;
                    if (menuItemsVM.EditMode)
                    {
                        var result = _masterService.EditFrom(menuItemsVM);
                    }
                    else
                    {
                        var result = _masterService.AddFrom(menuItemsVM);
                    }
                }


                ModelState.Clear();


                var formsList = MDIHelper.FormsDDLList(list[0].CmpyCode);
                return(View("MDIForm", new MenuItemsVM
                {
                    ParentFormList = formsList,
                    MetaDataSettings = _masterService.GetMetaSettings()
                }));
            }
        }