示例#1
0
        //导入NC
        protected void btnnc_Click(object sender, EventArgs e)
        {
            try
            {
                string           result      = "";
                ApiDispatchOrder apifyd      = new ApiDispatchOrder();
                string           filePath    = "~/FileInterface/download/nc_" + txtsendcode.Text + ".xml";
                string           xmlFileName = System.Web.HttpContext.Current.Server.MapPath(filePath);
                List <string>    resList     = apifyd.SendXmlApiDispatchOrder(txtsendcode.Text, xmlFileName, ltlempid.Text, 8);

                string jg = resList[0].ToString() == "1" ? "导入NC成功" : GetNCError(resList);
                result = "单据号:" + txtsendcode.Text + ",结果:" + jg;

                if (resList[0].ToString() == "1")
                {
                    if (tmd_dispatch.UpdateFydStatus(txtsendcode.Text, 2, ltlempid.Text, hidempname.Value, "3"))
                    {
                        //WebMsg.MessageBox(result);
                        this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "", "<script language='javascript'> _closemsg('" + result + "');</script>", false);
                        BindList();
                    }
                }
                else
                {
                    this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "", "<script language='javascript'> _closemsg('" + result + "');</script>", false);

                    BindList();
                }
            }
            catch (Exception)
            {
                WebMsg.MessageBox("导入失败");
            }
        }
示例#2
0
        //发运单物流导入NC
        protected void Button3_Click(object sender, EventArgs e)
        {
            string        strmsg      = string.Empty;
            string        fileName    = txtFYD.Text + ".xml";
            string        filePath    = "../../FileInterface/" + fileName;
            string        xmlFileName = Server.MapPath(filePath);
            List <string> result      = apidispatchorder.SendXmlApiDispatchOrder(txtFYD.Text, xmlFileName, "", 6);

            strmsg += "代码:" + result[0] + ",结果:" + result[2] + "\n";
            WebMsg.MessageBox(strmsg);
        }
示例#3
0
        protected void btnNC_Click(object sender, EventArgs e)
        {
            string           result      = "";
            ApiDispatchOrder apifyd      = new ApiDispatchOrder();
            string           filePath    = "~/FileInterface/download/nc_" + ltlfyd.Text + ".xml";
            string           xmlFileName = System.Web.HttpContext.Current.Server.MapPath(filePath);
            List <string>    resList     = apifyd.SendXmlApiDispatchOrder(ltlfyd.Text, xmlFileName, ltlempid.Text, 8);

            string jg = resList[0].ToString() == "1" ? "导入NC成功" : GetNCError(resList);

            result = "单据号:" + ltlfyd.Text + ",结果:" + jg;

            if (resList[0].ToString() == "1")
            {
                this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "", "<script language='javascript'> _closemsg('" + result + "');</script>", false);
            }
            else
            {
                this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "", "<script language='javascript'> _closemsg('" + result + "');</script>", false);
            }
        }