Beispiel #1
0
        public static string BindList(string siteapplytime_s, string siteapplytime_e, string declcode, string customareacode, string ispass, string ischeck, string busitype
                                      , string modifyflag, string auditflag, string busiunit, string ordercode, string cusno, string divideno, string contractno
                                      , 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 = SiteDeclare.getSiteDeclareInfo(siteapplytime_s, siteapplytime_e, declcode, customareacode, ispass, ischeck, busitype
                                                        , getcode("modifyflag", modifyflag), auditflag, busiunit, ordercode, cusno, divideno, contractno
                                                        , submittime_s, submittime_e, sitepasstime_s, sitepasstime_e
                                                        , start, itemsPerLoad, user.CustomerCode);

            //DataSet ds = SiteDeclare.getSiteDeclareInfo(siteapplytime_s, siteapplytime_e, declcode, customareacode, ispass, ischeck, busitype
            //    , getcode("modifyflag", modifyflag), auditflag, busiunit, ordercode, cusno, divideno, contractno
            //    , 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);
        }
Beispiel #2
0
        public static string loadcheckdata(string ordercode)
        {
            DataTable dt   = SiteDeclare.getloadcheckdata(ordercode);
            var       json = JsonConvert.SerializeObject(dt);

            return(json);
        }
Beispiel #3
0
        public static string picfileconsult(string ordercode)
        {
            DataTable dt   = SiteDeclare.picfileconsult(ordercode);
            var       json = JsonConvert.SerializeObject(dt);

            return(json);
        }
Beispiel #4
0
        public static string declcontainerdata(string ordercode)
        {
            DataTable dt   = SiteDeclare.getdeclcontainerdata(ordercode);
            var       json = JsonConvert.SerializeObject(dt);

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

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

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

            return("[{\"json_order\":" + json_order + ",\"json_decl\":" + json_decl + "}]");
        }
Beispiel #6
0
        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 + SiteDeclare.Passall(ja[i].ToString(), user);
                if (i != ja.Count - 1)
                {
                    msg = msg + ",";
                }
            }
            return("[" + msg + "]");
        }
Beispiel #7
0
 public static string SaveFile(string mediaIds, string ordercode)
 {
     return(SiteDeclare.SaveFile(mediaIds, ordercode));
 }
Beispiel #8
0
 public static string check_audit_save(string ordercode, string checktime, string checkname, string checkid, string checkremark
                                       , string auditflagtime, string auditflagname, string auditflagid, string auditcontent)
 {
     return(SiteDeclare.check_audit_save(ordercode, checktime, checkname, checkid, checkremark
                                         , auditflagtime, auditflagname, auditflagid, auditcontent));
 }