public static string BindList(string inspsiteapplytime_s, string inspsiteapplytime_e, string inspcode, string approvalcode, string ispass, string ischeck, string busitype
                                      , string lawflag, string isneedclearance, string isfumigation, string modifyflag, string busiunit, string contractno, string ordercode, string cusno, string divideno
                                      , string customareacode, string submittime_s, string submittime_e, string sitepasstime_s, string sitepasstime_e
                                      , int start, int itemsPerLoad)
        {
            WGUserEn user = (WGUserEn)HttpContext.Current.Session["user"];

            if (user == null || string.IsNullOrEmpty(user.CustomerCode))
            {
                return("[]");
            }
            DataSet ds = SiteInspection.getSiteInspectionInfo(inspsiteapplytime_s, inspsiteapplytime_e, inspcode, approvalcode, ispass, ischeck, busitype
                                                              , lawflag, isneedclearance, isfumigation, getcode("modifyflag", modifyflag), busiunit, contractno, ordercode, cusno, divideno
                                                              , customareacode, submittime_s, submittime_e, sitepasstime_s, sitepasstime_e
                                                              , start, itemsPerLoad, user.CustomerCode);

            //DataSet ds = SiteInspection.getSiteInspectionInfo(inspsiteapplytime_s, inspsiteapplytime_e, inspcode, approvalcode, ispass, ischeck, busitype
            //        , lawflag, isneedclearance, isfumigation, getcode("modifyflag", modifyflag), busiunit, contractno, ordercode, cusno, divideno
            //        , customareacode, submittime_s, submittime_e, sitepasstime_s, sitepasstime_e
            //        , start, itemsPerLoad, "KSJSBGYXGS");

            IsoDateTimeConverter iso = new IsoDateTimeConverter();//序列化JSON对象时,日期的处理格式

            iso.DateTimeFormat = "yyyy-MM-dd HH:mm:ss";
            var json = "[{\"data\":" + JsonConvert.SerializeObject(ds.Tables[0], iso) + ",\"sum\":" + ds.Tables[1].Rows[0][0] + "}]";

            return(json);
        }
        public static string loadcheckdata(string ordercode)
        {
            DataTable dt   = SiteInspection.getloadcheckdata(ordercode);
            var       json = JsonConvert.SerializeObject(dt);

            return(json);
        }
        public static string picfileconsult(string ordercode)
        {
            DataTable dt   = SiteInspection.picfileconsult(ordercode);
            var       json = JsonConvert.SerializeObject(dt);

            return(json);
        }
        public static string inspcontainerdata(string ordercode)
        {
            DataTable dt   = SiteInspection.getinspcontainerdata(ordercode);
            var       json = JsonConvert.SerializeObject(dt);

            return(json);
        }
        public static string Detail(string ordercode)
        {
            IsoDateTimeConverter iso = new IsoDateTimeConverter();

            iso.DateTimeFormat = "yyyyMMdd HH:mm:ss";

            DataSet ds         = SiteInspection.Detail(ordercode);
            var     json_order = JsonConvert.SerializeObject(ds.Tables[0], iso);
            var     json_insp  = JsonConvert.SerializeObject(ds.Tables[1]);

            return("[{\"json_order\":" + json_order + ",\"json_insp\":" + json_insp + "}]");
        }
        public static string Passall(string ordercode)
        {
            WGUserEn user = (WGUserEn)HttpContext.Current.Session["user"];

            if (user == null || string.IsNullOrEmpty(user.CustomerCode))
            {
                return("[]");
            }

            string msg = "";
            JArray ja  = JArray.Parse(ordercode);

            for (int i = 0; i < ja.Count; i++)
            {
                msg = msg + SiteInspection.Passall(ja[i].ToString(), user);
                if (i != ja.Count - 1)
                {
                    msg = msg + ",";
                }
            }
            return("[" + msg + "]");
        }
 public static string SaveFile(string mediaIds, string ordercode)
 {
     return(SiteInspection.SaveFile(mediaIds, ordercode));
 }
 public static string check_fumigation_save(string ordercode, string inspchecktime, string inspcheckname, string inspcheckid, string inspcheckremark
                                            , string fumigationtime, string fumigationname, string fumigationid)
 {
     return(SiteInspection.check_fumigation_save(ordercode, inspchecktime, inspcheckname, inspcheckid, inspcheckremark
                                                 , fumigationtime, fumigationname, fumigationid));
 }