Exemple #1
0
        public HttpResponseMessage GetReportedDataInfo(Datainfo info)
        {
            string result = string.Empty;

            try
            {
                Dainfo      = info;
                this.htView = this.GetHasView();
                string   strW               = this.GetStrWhere();
                string   strYear            = info.vtime.Substring(0, 4);
                string[] strBeginAndEndDate = this.GetBeginAndEndDate();
                string   strview            = this.htView[info.strView].ToString();
                string   viewtype           = info.strView;
                if (viewtype != "企业污染源" || viewtype != "污水处理厂")
                {
                    strview += "_Pre";
                }
                RuleQuery_Reported_Data ruleInfo = new RuleQuery_Reported_Data();
                DataTable dtPre = ruleInfo.GetReportedDataInfo(viewtype,
                                                               info.strSTCode, strview, strW, strYear, strBeginAndEndDate[0], strBeginAndEndDate[1],
                                                               info.timetype == "" ? 1 : Convert.ToInt32(info.timetype), int.Parse(info.factType));
                result = rule.JsonStr("ok", "", dtPre);
            }
            catch (Exception e)
            {
                result = rule.JsonStr("error", e.Message, "");
            }

            return(new HttpResponseMessage {
                Content = new StringContent(result, System.Text.Encoding.UTF8, "application/json")
            });
        }
Exemple #2
0
        public HttpResponseMessage GetSubmitDataInfo(Dt info)
        {
            string result = string.Empty;

            try
            {
                RuleQuery_Reported_Data ruleInfo = new RuleQuery_Reported_Data();
                DataTable dtPre = ruleInfo.GetSubmitDataInfo_CQ(info.fldstcode, info.fldYWType, info.fldJCType, info.fldLevel, info.fldBeginDate, info.fldEndDate, info.fldTpyeNums, info.fldSource);
                result = rule.JsonStr("ok", "", dtPre);
            }
            catch (Exception e)
            {
                result = rule.JsonStr("error", e.Message, "");
            }
            return(new HttpResponseMessage {
                Content = new StringContent(result, System.Text.Encoding.UTF8, "application/json")
            });
        }