Example #1
0
        public ActionResult Manager(int ID, string Reason, int?Day, bool?Check, CheckStatus status = CheckStatus.Wait)
        {
            Core.DataBookManager.Check(ID, Reason, sAMAccountName, Day, Check, status);
            Core.MessageManager.Add(Core.DataBookManager.Get(ID), ADController.GetNameBysAMAccountName(sAMAccountName));
            var groups = ADController.GetGroupList();

            ViewBag.Wait    = Core.DataBookManager.Get(groups, CheckStatus.Wait);
            ViewBag.DGroups = ADController.GetUserDict(groups);
            return(View());
        }
Example #2
0
        public ActionResult Manager()
        {
            List <string> groups;

            //获取我管理的组
            if (ADController.IsManager(LUser))
            {
                groups = ADController.GetGroupList();
            }
            else
            {
                groups = Core.AuthorizeManager.GetList(ADController.GetNameBysAMAccountName(sAMAccountName));
            }
            //获取当前管理组的权限审核列表
            ViewBag.Wait = Core.DataBookManager.Get(groups, CheckStatus.Wait);

            ViewBag.DGroups = ADController.GetUserDict(groups);

            return(View());
        }
Example #3
0
        public ActionResult Apply(string Boss)
        {
            var           groups = HttpContext.GetValue("Group");
            List <string> None;
            List <string> Have;
            List <int>    Indexs;

            Core.AuthorizeManager.Screen(groups, sAMAccountName, out None, out Have);
            try
            {
                Indexs = Core.DataBookManager.Add(None, sAMAccountName);
                Core.MessageManager.Add(None, ADController.GetNameBysAMAccountName(sAMAccountName), Boss);
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
            ViewBag.Have = Have;
            ViewBag.Book = Core.DataBookManager.Get(Indexs);
            return(View("ASuccess"));
        }
Example #4
0
        public ActionResult Manager(int ID, string Reason, int?Day, bool?Check, CheckStatus status = CheckStatus.Wait)
        {
            Core.DataBookManager.Check(ID, Reason, sAMAccountName, Day, Check, status);
            Core.MessageManager.Add(Core.DataBookManager.Get(ID), ADController.GetNameBysAMAccountName(sAMAccountName));
            //待审批列表
            List <string> groups;

            if (ADController.IsManager(LUser))
            {
                groups = ADController.GetGroupList();
            }
            else
            {
                groups = Core.AuthorizeManager.GetList(ADController.GetNameBysAMAccountName(sAMAccountName));
            }


            ViewBag.Wait = Core.DataBookManager.Get(groups, CheckStatus.Wait);

            ViewBag.DGroups = ADController.GetUserDict(groups);
            return(View());
        }