public static string addrole(string schid, string rolename, string rolestr, string roleextstr) { if (!Com.Public.isVa(schid, "")) { return("无跨界权限;"); } string ret = ""; if (Com.Session.userid == null) { ret = "expire"; } else { try { SchSystem.BLL.SchRoleSoure bll = new SchSystem.BLL.SchRoleSoure(); SchSystem.Model.SchRoleSoure model = new SchSystem.Model.SchRoleSoure(); model.RecTime = DateTime.Now; model.RecUser = Com.Session.userid; model.SchId = int.Parse(schid); model.SysType = 0; model.RoleName = Com.Public.SqlEncStr(rolename); model.RoleStr = rolestr; //model.RoleExtStr = roleextstr; model.RoleStrExt = roleextstr; model.Stat = 1; model.LastRecTime = DateTime.Now; model.LastRecUser = Com.Session.userid; int id = bll.Add(model); ret = id.ToString(); } catch (Exception ex) { ret = ex.Message; } } return(ret); }