Exemple #1
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());
        }
Exemple #2
0
        public string GetAllUser()
        {
            UserInfoService infoService = new UserInfoService();
            List <UserInfo> users       = infoService.GetAllUserinfo(1);
            string          str         = DataSwitch.DataToJson(users);

            return(str);
        }
Exemple #3
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);
        }
Exemple #4
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);
        }
        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);
        }
Exemple #6
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);
        }
Exemple #7
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);
        }
Exemple #8
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);
        }
Exemple #9
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);
        }
Exemple #10
0
        public string InitTreeNode_json(List <Authority> treelist, int fid, bool showoper)
        {
            List <WebTreeNode> webTreeNodes = new List <WebTreeNode>();
            List <Authority>   fAu_ls       = treelist.Where(au => au.ParentID == fid).ToList();

            foreach (var tn in fAu_ls)
            {
                WebTreeNode wtn = new WebTreeNode {
                    id         = tn.id,
                    iconCls    = tn.Imageid,
                    text       = tn.TreeName,
                    children   = GetChild(treelist, tn.id, showoper),
                    attributes = CreateUrl(tn)
                };
                webTreeNodes.Add(wtn);
            }
            return(DataSwitch.DataToJson(webTreeNodes));
        }
Exemple #11
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);
        }
        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);
        }
        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);
        }