Beispiel #1
0
        public static string uprole(string schid, string roleid, string rolename, string rolestr, string rolextstr)
        {
            if (!Com.Public.isVa(schid, ""))
            {
                return("无跨界权限;");
            }
            string ret = "success";

            if (Com.Session.userid == null)
            {
                ret = "expire";
            }
            else
            {
                try
                {
                    SchSystem.BLL.SchRole   bll   = new SchSystem.BLL.SchRole();
                    SchSystem.Model.SchRole model = new SchSystem.Model.SchRole();
                    model.RoleId      = int.Parse(roleid);
                    model.RoleName    = Com.Public.SqlEncStr(rolename);
                    model.RoleStr     = rolestr;
                    model.RoleExtStr  = rolextstr;
                    model.Stat        = 1;
                    model.LastRecTime = DateTime.Now;
                    model.LastRecUser = Com.Session.userid;
                    bll.Update(model);
                }
                catch (Exception ex)
                {
                    ret = ex.Message;
                }
            }
            return(ret);
        }
Beispiel #2
0
        public static string uprole(string schid, string roleid, string rolename, string rolestr, string rolextstr)
        {
            if (!Com.Public.isVa(schid, ""))
            {
                return("无跨界权限;");
            }
            string ret = "success";

            Com.DataPack.DataRsp <Com.DataPack.UserInfo> rsp = Com.Public.UserFuncSoure(Com.SoureSession.jsid, Com.SoureSession.jstoken);
            if (rsp.code == "ERROR_TOKEN")
            {
                ret = "expire";
            }
            else
            {
                try
                {
                    SchSystem.BLL.SchRole   bll   = new SchSystem.BLL.SchRole();
                    SchSystem.Model.SchRole model = new SchSystem.Model.SchRole();
                    model.RoleId      = int.Parse(roleid);
                    model.RoleName    = Com.Public.SqlEncStr(rolename);
                    model.RoleStr     = rolestr;
                    model.RoleExtStr  = rolextstr;
                    model.Stat        = 1;
                    model.LastRecTime = DateTime.Now;
                    model.LastRecUser = Com.SoureSession.Soureuserid;
                    bll.Update(model);
                }
                catch (Exception ex)
                {
                    ret = ex.Message;
                }
            }
            return(ret);
        }