protected void btnObject_Click(object sender, EventArgs e) { wsInvoiceService.InvoiceService ws = new wsInvoiceService.InvoiceService(); wsInvoiceService.MySoapHeader header = new wsInvoiceService.MySoapHeader(); header.USERNO = _USERNO; //帳號 header.PWD = _PWD; //密碼 ws.MySoapHeaderValue = header; this.lblMsg.Text = ws.OrdersAppend(this.GetData().ToArray()); }
protected void btnObject_Click(object sender, EventArgs e) { wsInvoiceService.InvoiceService ws = new wsInvoiceService.InvoiceService(); //使用Json字串輸入 wsInvoiceService.MySoapHeader header = new wsInvoiceService.MySoapHeader(); header.USERNO = _USERNO; //帳號 header.PWD = _PWD; //密碼 ws.MySoapHeaderValue = header; this.gvList.DataSource = ws.GetInvoiceList(null, null, null); this.gvList.DataBind(); }
protected void btnJson_Click(object sender, EventArgs e) { wsInvoiceService.InvoiceService ws = new wsInvoiceService.InvoiceService(); //使用Json字串輸入 wsInvoiceService.MySoapHeader header = new wsInvoiceService.MySoapHeader(); header.USERNO = _USERNO; //帳號 header.PWD = _PWD; //密碼 ws.MySoapHeaderValue = header; string jsonText = ws.GetInvoiceJson(null, null, null); this.lblMsg.Text = jsonText; }
protected void btnJson_Click(object sender, EventArgs e) { wsInvoiceService.InvoiceService ws = new wsInvoiceService.InvoiceService(); //使用Json字串輸入 string JsonString = "[{\"Amount\":3000,\"BuyerAddress\":null,\"BuyerCarrierId\":null,\"BuyerCellPhone\":null,\"BuyerCompanyId\":\"87654321\",\"BuyerEmail\":\"[email protected]\",\"BuyerInvoiceTitle\":\"我家保養廠\",\"BuyerName\":\"我家保養廠\",\"Card4No\":null,\"DetailWithTax\":\"Y\",\"DornateId\":null,\"InvoiceDate\":null,\"InvoiceFor\":\"C\",\"InvoiceID\":null,\"InvoiceUrl\":null,\"OrderDate\":\"\\/Date(1431532800000+0800)\\/\",\"OrderID\":\"J20150519001\",\"OrderSource\":null,\"PayKind\":null,\"PrintYesOrNo\":false,\"ProductID\":\"100102058\",\"ProductName\":\"BENZ-W204-4D\\/前檔\\/副\\/台\\/膠\",\"Quantity\":1,\"SiteID\":null,\"Tax\":150,\"TaxRate\":0.05,\"TaxType\":\"1\",\"TotalAmount\":3150,\"UnitPrice\":2625},{\"Amount\":3000,\"BuyerAddress\":null,\"BuyerCarrierId\":null,\"BuyerCellPhone\":null,\"BuyerCompanyId\":\"87654321\",\"BuyerEmail\":\"[email protected]\",\"BuyerInvoiceTitle\":\"我家保養廠\",\"BuyerName\":\"我家保養廠\",\"Card4No\":null,\"DetailWithTax\":\"Y\",\"DornateId\":null,\"InvoiceDate\":null,\"InvoiceFor\":\"C\",\"InvoiceID\":null,\"InvoiceUrl\":null,\"OrderDate\":\"\\/Date(1431532800000+0800)\\/\",\"OrderID\":\"J20150519001\",\"OrderSource\":null,\"PayKind\":null,\"PrintYesOrNo\":false,\"ProductID\":\"FEE001\",\"ProductName\":\"安裝費\",\"Quantity\":1,\"SiteID\":null,\"Tax\":150,\"TaxRate\":0.05,\"TaxType\":\"1\",\"TotalAmount\":3150,\"UnitPrice\":525}]"; wsInvoiceService.MySoapHeader header = new wsInvoiceService.MySoapHeader(); header.USERNO = _USERNO; //帳號 header.PWD = _PWD; //密碼 ws.MySoapHeaderValue = header; this.lblMsg.Text = ws.OrdersAppendFromJson(JsonString); }