Esempio n. 1
0
        //判定是不是吉时的单子
        private bool JudgeIsJiShiOrder(JObject jo)
        {
            bool      rtn = false;
            string    sql = "select * from list_order where code='" + jo.Value <string>("ORDERCODE") + "'";
            DataTable dt  = DBMgr.GetDataTable(sql);

            if (dt.Rows.Count > 0)   //如果是吉时的单子
            {
                rtn = true;
            }
            return(rtn);
        }
Esempio n. 2
0
        //提前报关单发送
        public static void ZSTQDZFS(string CODE)
        {
            sap.SI_CUS_CUS1002Service api = new sap.SI_CUS_CUS1002Service();
            api.Timeout     = 6000000;
            api.Credentials = new NetworkCredential("soapcall", "soapcall");
            sap.DT_CUS_CUS1002_REQITEM m = new sap.DT_CUS_CUS1002_REQITEM();//模型
            string    sql       = "select * from list_order where code ='" + CODE + "'";
            DataTable dt        = DBMgr.GetDataTable(sql);
            string    FWONO     = "";
            string    FOONO     = "";
            string    EVENT_DAT = "";

            if (dt.Rows.Count > 0)
            {
                FWONO = dt.Rows[0]["FWONO"] + "";
                FOONO = dt.Rows[0]["FOONO"] + "";
                if (!string.IsNullOrEmpty(FOONO))
                {
                    FOONO = FOONO.Remove(0, 4);
                    string datetime = DateTime.Now.ToLocalTime().ToString("yyyyMMddHHmmss");
                    m.EVENT_CODE = "ZSTQDZFS";
                    m.FWO_ID     = FWONO;
                    m.FOO_ID     = FOONO;
                    m.EVENT_DAT  = EVENT_DAT;
                    sap.DT_CUS_CUS1002_REQITEM[] mlist = new sap.DT_CUS_CUS1002_REQITEM[1];
                    mlist[0] = m;
                    sap.DT_CUS_CUS1002_RES res;
                    try
                    {
                        res = api.SI_CUS_CUS1002(mlist);
                        save_log(res.EV_ERROR + "", "ZSTQDZFS(" + res.EV_MSG + ")", CODE, "4");
                    }
                    catch (Exception e)
                    {
                        save_log("E", "ZSTQDZFS(接口回调报错)", CODE, "4");
                    }
                }
            }
        }