Exemple #1
0
        private void bt_getdis_Click(object sender, EventArgs e)
        {
            EntityDispatchListHead doc = new EntityDispatchListHead();

            doc.cDLCode   = tx_cCode.Text == "" ? "1" : tx_cCode.Text;
            textBox1.Text = QueryCode(8005, JsonConvert.SerializeObject(doc));
        }
Exemple #2
0
        private void bt_wtdispatchth_Click(object sender, EventArgs e)
        {
            EntityDispatchListHead doc = new EntityDispatchListHead();

            doc.cSTCode  = "2";
            doc.dDate    = DateTime.Parse("2017-11-03");
            doc.cDepCode = "SZ300115";
            doc.cCusCode = "0207006";
            doc.cDLCode  = "TWT20171100000001";
            doc.cDefine1 = "合同";
            doc.cDefine3 = "是";
            List <EntityDispatchListBody> list = new List <EntityDispatchListBody>();

            list.Add(new EntityDispatchListBody
            {
                cInvCode     = "1070200902",
                cWhCode      = "CD049", //仓库编码
                iQuantity    = -1,      //数量
                iQuotedPrice = 369,     //报价
                iSum         = -369,    //价税合计
                iTaxRate     = 17,      //税率
                DHID         = "0"
            });
            doc.Details = list;
            string entity = JsonConvert.SerializeObject(doc);

            //entity= System.Web.HttpUtility.UrlEncode(entity);

            string postUrl = string.Format(@"{0}={1}&ModelType=8026", addpara, entity);
            string result  = SendHttpRequest(addurl, postUrl, "POST");

            textBox1.Text = result;
        }
Exemple #3
0
        /// <summary>
        /// 发货单测试
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bt_dispatchlist_Click(object sender, EventArgs e)
        {
            EntityDispatchListHead doc = new EntityDispatchListHead();

            doc.cSTCode  = "1";
            doc.dDate    = DateTime.Parse("2017-12-05");
            doc.cDepCode = "SZ300104";
            doc.cCusCode = "01007";
            doc.cDLCode  = "2017120004";
            doc.cDefine1 = "合同";
            doc.cDefine3 = "是";
            List <EntityDispatchListBody> list = new List <EntityDispatchListBody>();

            list.Add(new EntityDispatchListBody
            {
                cInvCode     = "1010100001",
                cWhCode      = "K001", //仓库编码
                iQuantity    = 1,      //数量
                iQuotedPrice = 200,    //报价
                iSum         = 200,    //价税合计
                iTaxRate     = 17,     //税率
                DHID         = "0",
                cBatch       = null
            });
            list.Add(new EntityDispatchListBody
            {
                cInvCode     = "1010100001",
                cWhCode      = "K001", //仓库编码
                iQuantity    = 1,      //数量
                iQuotedPrice = 200,    //报价
                iSum         = 200,    //价税合计
                iTaxRate     = 17,     //税率
                DHID         = "0",
                cBatch       = null
            });
            list.Add(new EntityDispatchListBody
            {
                cInvCode     = "102111",
                cWhCode      = "K001", //仓库编码
                iQuantity    = 0,      //数量
                iQuotedPrice = 0,      //报价
                iSum         = -90,    //价税合计
                iTaxRate     = 17,     //税率
                DHID         = "0"
            });
            doc.Details = list;
            string entity = JsonConvert.SerializeObject(doc);

            //entity= System.Web.HttpUtility.UrlEncode(entity);

            string postUrl = string.Format(@"{0}={1}&ModelType=8005", addpara, entity);
            string result  = SendHttpRequest(addurl, postUrl, "POST");

            textBox1.Text = result;
        }