コード例 #1
0
        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));
        }
コード例 #2
0
ファイル: FileLoadSer.cs プロジェクト: KimTree122/KNDBsys
        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);
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        public string GetAllServerType(string userid)
        {
            var list = dbSet.GetList(s => s.delflag == false).ToList();

            return(DataSwitch.HttpPostList <ServerType>(list));
        }
コード例 #5
0
        public string GetAllCustomInfo(string userid)
        {
            var list = dbSet.GetList(s => s.delflag == false).ToList();

            return(DataSwitch.HttpPostList <CustomInfo>(list));
        }
コード例 #6
0
        public string GetDicbytype(string type)
        {
            List <Sysdic> cS = GetDicByTypeName(type);

            return(DataSwitch.HttpPostList <Sysdic>(cS));
        }
コード例 #7
0
        public string GetOperAuthByTag(string authtype, int tag)
        {
            var authlist = dbSet.GetList(a => a.AuthTypeName == authtype & a.ParentID == tag);

            return(DataSwitch.HttpPostList <Authority>(authlist));
        }
コード例 #8
0
        public string GetUserAuth(string userid, string portType)
        {
            var authlist = GetAuthoritiesClz(userid, portType);

            return(DataSwitch.HttpPostList <Authority>(authlist));
        }
コード例 #9
0
        public string GetAllAuthority()
        {
            var authlist = GetAllAuth();

            return(DataSwitch.HttpPostList <Authority>(authlist));
        }