Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        public UserInfo GetUserInfoByID(string userid)
        {
            string    url = KNDBsysUrl.BaseInfoUrl.UserInfoUrl.GetUserInfoByID;
            HttpTools t   = new HttpTools();

            t.AddParam("userid", userid).Build();
            return(GetEntity(url, t));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 4
0
        public SysVer GetNewSysVer()
        {
            string    url   = KNDBsysUrl.BaseInfoUrl.SysVerUrl.GetNewSysVer;
            HttpTools tools = new HttpTools();

            tools.AddParam("programtype", "winform").Build();
            return(GetEntity(url, tools));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 10
0
        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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 21
0
        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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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("");
        }
Ejemplo n.º 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>());
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 29
0
        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);
        }