예제 #1
0
        public ActionResult AddUser()
        {
            string      UserNum   = WebUtil.GetQueryStringValue <string>("UserNum", string.Empty);
            string      CompanyID = this.CompanyID;
            AdminEntity entity    = null;

            if (!UserNum.IsEmpty())
            {
                ITopClient client = new TopClientDefault();
                Dictionary <string, string> dic = new Dictionary <string, string>();
                dic.Add("CompanyID", CompanyID);
                dic.Add("UserNum", UserNum);
                string result = client.Execute(UserApiName.UserApiName_Single, dic);
                if (!result.IsEmpty())
                {
                    DataResult <AdminEntity> dataResult = JsonConvert.DeserializeObject <DataResult <AdminEntity> >(result);
                    entity = dataResult.Result;
                }
            }
            entity         = entity == null ? new AdminEntity() : entity;
            ViewBag.Entity = entity;

            ViewBag.DepartList = DropDownHelper.GetDepart(entity.DepartNum, CompanyID);
            ViewBag.RoleList   = DropDownHelper.GetRole(entity.RoleNum, CompanyID);
            return(View());
        }
예제 #2
0
        public ActionResult UserList()
        {
            string CompanyID = this.CompanyID;

            ViewBag.DepartList = DropDownHelper.GetDepart(string.Empty, CompanyID);
            ViewBag.RoleList   = DropDownHelper.GetRole(string.Empty, CompanyID);
            return(View());
        }