コード例 #1
0
ファイル: UserInfoService.cs プロジェクト: ewin66/SynWinform
        public List <UserInfo> GetAllUserinfo(int userid)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.UserInfoUrl.GetAllUserInfo;
            HttpTools tools = new HttpTools();

            tools.AddParam("userid", userid).Build();
            return(GetList(url, tools));
        }
コード例 #2
0
ファイル: UserInfoService.cs プロジェクト: ewin66/SynWinform
        public UserInfo GetUserInfoByID(string userid)
        {
            string    url = KNDBsysUrl.BaseInfoUrl.UserInfoUrl.GetUserInfoByID;
            HttpTools t   = new HttpTools();

            t.AddParam("userid", userid).Build();
            return(GetEntity(url, t));
        }
コード例 #3
0
        public string GetQrnumber(int userid)
        {
            string    url   = KNDBsysUrl.WorkUrl.CheckInBLL.GetQRnumber;
            HttpTools tools = new HttpTools();

            tools.AddParam("userid", userid).Build();
            return(GetMsg(url, tools));
        }
コード例 #4
0
ファイル: FileLoadService.cs プロジェクト: ewin66/SynWinform
        public SysVer GetNewSysVer()
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.SysVerUrl.GetNewSysVer;
            HttpTools tools = new HttpTools();

            tools.AddParam("programtype", "winform").Build();
            return(GetEntity(url, tools));
        }
コード例 #5
0
        public PostData <CheckInDT, CheckInMT> GetCheckInDTMT(string checkinmtid)
        {
            string    url   = KNDBsysUrl.WorkUrl.CheckInBLL.GetCheckInByMTid;
            HttpTools tools = new HttpTools();

            tools.AddParam("checkinmtid", checkinmtid.ToInt()).Build();
            return(GetPostData(url, tools));
        }
コード例 #6
0
        public int UpdateCheckInDT(CheckInDT dT)
        {
            string    url   = KNDBsysUrl.WorkUrl.CheckInBLL.UpdateCheckInDT;
            HttpTools tools = new HttpTools();

            tools.AddParam("checkindt", DataSwitch.DataToJson(dT)).Build();;
            return(GetMsg(url, tools).ToInt());
        }
コード例 #7
0
        public bool UpdateCheckInMT(CheckInMT mT)
        {
            string    url   = KNDBsysUrl.WorkUrl.CheckInBLL.UpdateCheckInMT;
            HttpTools tools = new HttpTools();

            tools.AddParam("checkinmt", DataSwitch.DataToJson(mT)).Build();;
            return(GetMsg(url, tools).ToInt() > 0);
        }
コード例 #8
0
        public List <CustomHistoryVM> GetCustomHistoryVMs(int customid, int stauts = 0)
        {
            string    url   = KNDBsysUrl.WorkUrl.CheckInBLL.GetCustomHistory;
            HttpTools tools = new HttpTools();

            tools.AddParam("customid", customid).AddParam("stauts", stauts).Build();;
            return(GetList(url, tools));
        }
コード例 #9
0
        public List <Authority> GetOperAuthbyTag(int formtag, string authtypeName)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.AuthorityUrl.GetOperAuthByTag;
            HttpTools tools = new HttpTools();

            tools.AddParam("authtypeName", authtypeName).AddParam("tag", formtag).Build();
            return(GetList(url, tools));
        }
コード例 #10
0
ファイル: UserInfoService.cs プロジェクト: ewin66/SynWinform
        public UserInfo GetUserInfoByAccount(string account, string pwd)
        {
            string    url = KNDBsysUrl.BaseInfoUrl.UserInfoUrl.GetUserInfoByAccount;
            HttpTools t   = new HttpTools();

            t.AddParam("account", account).AddParam("pwd", pwd).Build();
            return(GetEntity(url, t));
        }
コード例 #11
0
        public List <Authority> GetAuthorities(int userid)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.AuthorityUrl.GetAllAuthority;
            HttpTools tools = new HttpTools();

            tools.AddParam("userid", userid).Build();
            return(GetList(url, tools));
        }
コード例 #12
0
        public List <ServerType> GetAllServerTypes(int userid)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.ServerTypeUrl.GetAllServerType;
            HttpTools tools = new HttpTools();

            tools.AddParam("userid", userid).Build();;
            return(GetList(url, tools));
        }
コード例 #13
0
        public int GetCustomidByQR(string qrcode)
        {
            string    url   = KNDBsysUrl.WorkUrl.CheckInBLL.GetCustomidByQR;
            HttpTools tools = new HttpTools();

            tools.AddParam("qrcode", qrcode).Build();;
            return(GetMsg(url, tools).ToInt());
        }
コード例 #14
0
        public List <Authority> GetUserAuth(string userid, string port)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.UserAuthUrl.GetUserAuth;
            HttpTools tools = new HttpTools();

            tools.AddParam("userid", userid)
            .AddParam("portType", port).Build();
            return(GetList(url, tools));
        }
コード例 #15
0
        public int CountcustomTel(string tel)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.CustomInfoUrl.CountCustomTel;
            HttpTools tools = new HttpTools();

            tools.AddParam("tel", tel).Build();
            string msg = GetMsg(url, tools);

            return(msg.ToInt());
        }
コード例 #16
0
        public CustomInfo FindCustomByid(int customid)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.CustomInfoUrl.FindCustomByid;
            HttpTools tools = new HttpTools();

            tools.AddParam("customid", customid).Build();
            CustomInfo custom = GetEntity(url, tools);

            return(custom);
        }
コード例 #17
0
        public bool DeleteAuthority(Authority auth)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.AuthorityUrl.DeleteAuthority;
            HttpTools tools = new HttpTools();

            tools.AddParam("authority", DataSwitch.DataToJson(auth)).Build();
            string msg = GetMsg(url, tools);

            return(msg.ToInt() > 0);
        }
コード例 #18
0
        public bool DeleteServerType(ServerType serverType)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.ServerTypeUrl.DeleteServerType;
            HttpTools tools = new HttpTools();

            tools.AddParam("servertype", DataSwitch.DataToJson(serverType)).Build();
            string msg = GetMsg(url, tools);

            return(msg.ToInt() > 0);
        }
コード例 #19
0
        public CustomInfo FindCustomByTel(string tel)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.CustomInfoUrl.FindCustomByTel;
            HttpTools tools = new HttpTools();

            tools.AddParam("tel", tel).Build();
            CustomInfo custom = GetEntity(url, tools);

            return(custom);
        }
コード例 #20
0
        public bool DeleteCustomInfo(CustomInfo customInfo)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.CustomInfoUrl.DeleteCustomInfo;
            HttpTools tools = new HttpTools();

            tools.AddParam("customInfo", DataSwitch.DataToJson(customInfo)).Build();
            string msg = GetMsg(url, tools);

            return(msg.ToInt() > 0);
        }
コード例 #21
0
ファイル: UserInfoService.cs プロジェクト: ewin66/SynWinform
        public bool Deleteuserinfo(UserInfo userInfo)
        {
            string    url = KNDBsysUrl.BaseInfoUrl.UserInfoUrl.DeleteUserInfo;
            HttpTools t   = new HttpTools();

            t.AddParam("userinfo", DataSwitch.DataToJson(userInfo)).Build();
            string msg = GetMsg(url, t);

            return(msg.ToInt() > 0);
        }
コード例 #22
0
        public List <Authority> AddUserAuth(List <Authority> userAuths, string userid)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.UserAuthUrl.AddUserAuth;
            HttpTools tools = new HttpTools();

            tools.AddParam("auth", DataSwitch.DataToJson(userAuths))
            .AddParam("userid", userid).Build();
            List <Authority> add = GetList(url, tools);

            return(add);
        }
コード例 #23
0
        public bool DeleteUserAuth(List <UserAuth> userAuths, string userid)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.UserAuthUrl.DelteUserAuth;
            HttpTools tools = new HttpTools();

            tools.AddParam("userauthjson", DataSwitch.DataToJson(userAuths))
            .AddParam("userid", userid).Build();
            string msg = GetMsg(url, tools);

            return(msg.ToInt() > 0);
        }
コード例 #24
0
        public bool CopyUserAuth(string userid, string copyuserid)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.UserAuthUrl.CopyUserAuth;
            HttpTools tools = new HttpTools();

            tools.AddParam("userid", userid)
            .AddParam("copyuserid", copyuserid).Build();
            string msg = GetMsg(url, tools);

            return(msg.ToInt() > 0);
        }
コード例 #25
0
        public string GetUserInfo(string name, string post)
        {
            string url = KNDBsysUrl.BaseInfoUrl.UserInfoUrl.GetAllUserInfo;

            HttpTools tools = new HttpTools();

            tools.AddParam("name", name).AddParam("post", post).Build();

            HttpWebResponse res = HttpHelper.CreatePostHttpResponse(url, tools.dic, 3000, null);

            if (res != null)
            {
                return(DataSwitch.GetResponseString(res));
            }
            return("");
        }
コード例 #26
0
        public List <Sysdic> GetDicByType(string type)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.DictionaryUrl.GetDicByType;
            HttpTools tools = new HttpTools();

            tools.AddParam("dictype", type).Build();
            HttpWebResponse res = HttpHelper.CreatePostHttpResponse(url, tools.dic, 3000, null);

            if (res != null)
            {
                string json = DataSwitch.GetResponseString(res);
                PostData <Sysdic, DBNull> postData = DataSwitch.JsonToObj <PostData <Sysdic, DBNull> >(json);
                return(postData.rows);
            }
            return(new List <Sysdic>());
        }
コード例 #27
0
        public bool DleteDictionary(Sysdic sysdic)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.DictionaryUrl.DeleteSysdic;
            HttpTools tools = new HttpTools();

            tools.AddParam("dic", DataSwitch.DataToJson(sysdic)).Build();
            HttpWebResponse res = HttpHelper.CreatePostHttpResponse(url, tools.dic, 3000, null);

            if (res != null)
            {
                string json = DataSwitch.GetResponseString(res);
                PostData <DBNull, DBNull> postData = DataSwitch.JsonToObj <PostData <DBNull, DBNull> >(json);
                if (postData.Msg != General.reFail)
                {
                    return(true);
                }
            }
            return(false);
        }
コード例 #28
0
        public int AddDictionary(Sysdic cSDic)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.DictionaryUrl.AddDicByType;
            HttpTools tools = new HttpTools();

            tools.AddParam("dic", DataSwitch.DataToJson(cSDic)).Build();
            HttpWebResponse res = HttpHelper.CreatePostHttpResponse(url, tools.dic, 3000, null);

            if (res != null)
            {
                string json = DataSwitch.GetResponseString(res);
                PostData <DBNull, DBNull> postData = DataSwitch.JsonToObj <PostData <DBNull, DBNull> >(json);
                if (postData.Msg != General.reFail)
                {
                    return(int.Parse(postData.Msg));
                }
            }
            return(General.intFail);
        }
コード例 #29
0
ファイル: FileLoadService.cs プロジェクト: ewin66/SynWinform
        public int AddSysVer(SysVer sysVer)
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.SysVerUrl.AddSysVer;
            HttpTools tools = new HttpTools();

            tools.AddParam("sysver", DataSwitch.DataToJson(sysVer)).Build();
            HttpWebResponse res = HttpHelper.CreatePostHttpResponse(url, tools.dic, 3000, null);

            if (res != null)
            {
                string json = DataSwitch.GetResponseString(res);
                PostData <SysVer, SysVer> postData = DataSwitch.JsonToObj <PostData <SysVer, SysVer> >(json);
                if (postData.Msg != General.reFail)
                {
                    return(int.Parse(postData.Msg));
                }
            }
            return(General.intFail);
        }