Exemplo n.º 1
0
        public ActionResult ProfilePage(tbl_GroupRoleMappingMaster obj, string hid)
        {
            if (Session["User"] == null)
            {
                return(RedirectToAction("LogIn", "LogIn"));
            }
            try
            {
                if (!string.IsNullOrEmpty(hid))
                {
                    new MvcHelper((tbl_UserDetail)Session["User"]);
                    tbl_GroupRoleMappingMaster tbl = new tbl_GroupRoleMappingMaster()
                    {
                        IsActive  = true,
                        GroupName = obj.GroupName,
                        PageName  = obj.PageName,
                        EntryBy   = ((tbl_UserDetail)Session["user"]).UserGroup.ToString(),
                    };
                    MvcHelper.EditGroupRoleMappingMaster(obj, Convert.ToInt32(hid));
                }
            }

            catch
            {
                TempData["Error"] = "Something went wrong.";
            }
            ViewBag.groupList = MvcHelper.GetGroupRoleMappingMasterList();
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult ProfilePage(double?id, string ed)
        {
            if (Session["User"] == null)
            {
                return(RedirectToAction("LogIn", "LogIn"));
            }

            if (((tbl_UserDetail)Session["User"]).GroupPages.Contains("Profile"))
            {
                try
                {
                    if (id != null)
                    {
                        var x = MvcHelper.GetGroupRoleMappingMaster(Convert.ToInt32(id));

                        if (!string.IsNullOrEmpty(ed) && ed.Equals("2"))
                        {
                            x.ApproveStat = string.Empty;
                        }

                        ViewBag.obj = x;
                        ViewBag.hid = id;
                    }
                }

                catch (Exception ex)
                {
                    TempData["Error"] = "Something went wrong.";
                }

                ViewBag.groupList = MvcHelper.GetGroupRoleMappingMasterList();
            }
            return(View());
        }