public string GetAllUserInfo(string userid) { var userlist = dbSet.FullClient.Queryable <RegUserInfo>().Where(e => e.delflag == false).Select((ui) => new RegUserInfo() { id = ui.id, RegName = ui.RegName, RegTel = ui.RegTel }).ToList(); return(DataSwitch.HttpPostList <RegUserInfo>(userlist)); }
public string GetVerlist(string path) { List <string> strlist = new List <string>(); StreamReader sr = new StreamReader(path, Encoding.Default); String line; while ((line = sr.ReadLine()) != null) { strlist.Add(line); } string msg = strlist[0]; msg = msg.Substring(msg.IndexOf(',')); string post = DataSwitch.HttpPostList <string>(strlist, msg); return(post); }
public string InsertTable(string authlistjson, string userid) { List <UserAuth> auths = dbSet.GetList(u => u.UserID == userid.ToInt()); List <Authority> authlist = DataSwitch.JsonToList <Authority>(authlistjson); List <UserAuth> userAuths = new List <UserAuth>(); List <Authority> addauth = new List <Authority>(); foreach (var auth in authlist) { bool check = true; foreach (var au in auths) { if (auth.id == au.AuthID) { check = false; } } if (check) { UserAuth userAuth = new UserAuth { AuthID = auth.id, UserID = userid.ToInt() }; userAuths.Add(userAuth); addauth.Add(auth); } } if (userAuths.Count == 0) { return(DataSwitch.HttpPostList(addauth)); } bool insert = dbSet.InsertRange(userAuths.ToArray()); if (insert) { return(DataSwitch.HttpPostList(addauth)); } return(DataSwitch.HttpPostMsg(General.strFail)); }
public string GetAllServerType(string userid) { var list = dbSet.GetList(s => s.delflag == false).ToList(); return(DataSwitch.HttpPostList <ServerType>(list)); }
public string GetAllCustomInfo(string userid) { var list = dbSet.GetList(s => s.delflag == false).ToList(); return(DataSwitch.HttpPostList <CustomInfo>(list)); }
public string GetDicbytype(string type) { List <Sysdic> cS = GetDicByTypeName(type); return(DataSwitch.HttpPostList <Sysdic>(cS)); }
public string GetOperAuthByTag(string authtype, int tag) { var authlist = dbSet.GetList(a => a.AuthTypeName == authtype & a.ParentID == tag); return(DataSwitch.HttpPostList <Authority>(authlist)); }
public string GetUserAuth(string userid, string portType) { var authlist = GetAuthoritiesClz(userid, portType); return(DataSwitch.HttpPostList <Authority>(authlist)); }
public string GetAllAuthority() { var authlist = GetAllAuth(); return(DataSwitch.HttpPostList <Authority>(authlist)); }