public ActionResult Governance(Guid?selAgency)
        {
            int UserIDX = db_Accounts.GetUserIDX();

            var model = new vmDashboardGovernance();

            T_OE_USERS user = db_Accounts.GetT_OE_USERSByIDX(UserIDX);

            if (user != null)
            {
                model.UnlockedInd = user.ALLOW_GOVERNANCE;

                //if user has unlocked governance, display more
                if (model.UnlockedInd == true)
                {
                    if (selAgency != null)
                    {
                        model.selAgency = selAgency;
                        model.projects  = db_EECIP.GetT_OE_PROJECTS_ByOrgIDX(selAgency.ConvertOrDefault <Guid>());

                        T_OE_ORGANIZATION o = db_Ref.GetT_OE_ORGANIZATION_ByID(selAgency.ConvertOrDefault <Guid>());
                        if (o != null)
                        {
                            model.selAgencyName = o.ORG_NAME;
                        }
                    }
                }
            }

            return(View(model));
        }
        public ActionResult GovernanceOrgAdd(vmDashboardGovernance model)
        {
            int  UserIDX = db_Accounts.GetUserIDX();
            Guid?SuccID  = db_Ref.InsertUpdatetT_OE_ORGANIZATION(null, model.edit_org_abbr, model.edit_org_name, null, null, "Governance", null, null, true, UserIDX);

            if (SuccID != null)
            {
                TempData["Success"] = "Governance Group Added";
            }
            else
            {
                TempData["Error"] = "Unable to add group";
            }

            return(RedirectToAction("Governance"));
        }