Example #1
0
        public string GetHddz(string conditions, string token)
        {
            ServResponse servResp = new ServResponse();

            try
            {
                //conditions = "{\"beginTime\":\"2016-01-01\",\"endTime\":\"\"}";
                Conditions c = new Conditions();
                try
                {
                    c = JsonConvert.DeserializeObject <Conditions>(conditions);
                }
                catch { throw new Exception("传入的查询条件解析错误!"); }


                DateTime beginTime = new DateTime();
                DateTime endTime   = new DateTime();

                DateTime.TryParse(c.beginTime, out beginTime);
                DateTime.TryParse(c.endTime, out endTime);

                List <Interfaces.Model.ToEMailResponse> list = new Interfaces.Service.HddzService().GetEmailResponseList(beginTime, endTime, c.serviceNo, c.areaNo, c.areaName);


                //return JsonConvert.SerializeObject(list);
                servResp.data = list;
            }
            catch (Exception ex)
            {
                servResp.result = false;
                servResp.msg    = ex.Message;
            }
            return(servResp.ToJsonString());
        }
Example #2
0
        public void ProcessRequest(HttpContext context)
        {
            ServResponse servResp = new ServResponse();

            try
            {
                string strErr     = "";
                string tableName  = context.Request.Params["tablename"];
                string changeCols = context.Request.Params["changecols"];
                string id         = context.Request.Params["id"];
                string parameters = context.Request.Params["parameters"];
                string strJson    = context.Request.Params["strjson"];

                if (string.IsNullOrEmpty(strJson))
                {
                    List <string> p = new List <string>();
                    if (parameters != null)
                    {
                        p = parameters.Split(',').ToList();
                    }

                    servResp.result = Interfaces.GeneralPortal.DataToFreshPort(tableName, changeCols, id, out strErr, p.ToArray());
                    servResp.msg    = strErr;
                }
                else
                {
                    List <RequestPara> list = JsonConvert.DeserializeObject <List <RequestPara> >(strJson);

                    if (list != null && list.Count > 0)
                    {
                        foreach (var para in list)
                        {
                            List <string> p = new List <string>();
                            if (para.parameters != null)
                            {
                                p = para.parameters.Split(',').ToList();
                            }
                            Interfaces.GeneralPortal.DataToFreshPort(para.tablename, para.changecols, para.id, out strErr, p.ToArray());
                        }
                    }
                    servResp.result = true;
                    servResp.msg    = strErr;
                }
            }
            catch (Exception ex)
            {
                servResp.result = false;
                servResp.msg    = ex.Message;
            }

            context.Response.Write(servResp.ToJsonString());
        }
Example #3
0
        public string QuarantineData(string ywbh, string cxh)
        {
            ServResponse servResp = new ServResponse();

            try
            {
                string strErr = "";

                servResp.result = Interfaces.GeneralPortal.DataToFreshPort("yw_hddz_jzxxx", "djydsj,jycydzt,tgjysj,kgsj,ssys,kghcl,kghclsj,jydbz", ywbh, out strErr, new string[] { cxh });
                servResp.msg    = strErr;
            }
            catch (Exception ex)
            {
                servResp.result = false;
                servResp.msg    = ex.Message;
            }

            return(servResp.ToJsonString());
        }
Example #4
0
        public string AirDistributionData(string cdphbm)
        {
            ServResponse servResp = new ServResponse();

            try
            {
                string strErr = "";

                servResp.result = Interfaces.GeneralPortal.DataToFreshPort("yw_hddz_kycd", "", cdphbm, out strErr);
                servResp.result = Interfaces.GeneralPortal.DataToFreshPort("yw_hddz_tpcdxx", "", cdphbm, out strErr);
                servResp.msg    = strErr;
            }
            catch (Exception ex)
            {
                servResp.result = false;
                servResp.msg    = ex.Message;
            }

            return(servResp.ToJsonString());
        }