Example #1
0
        private void WeiKai_btn作废未开_Click(object sender, EventArgs e)
        {
            WeiKaiArgs args = new WeiKaiArgs()
            {
                Count = int.Parse(WeiKai_txt要作废发票份数.Text), FpType = (FaPiaoTypes)Enum.Parse(typeof(FaPiaoTypes), WeiKai_cmbFpType.SelectedValue.ToString())
            };
            string          rtnStr = Base64Encode(DataService.DoService(args));
            CountableResult res    = JsonConvert.DeserializeObject <CountableResult>(rtnStr);

            MessageBox.Show($"作废{res.Total}条,成功{res.Succeed}条,失败{res.Failed}条。错误信息:{res.ErrorInfo.ErrorDescription}");
        }
        private void ZuoFei_btnDoService_Click(object sender, EventArgs e)
        {
            List <DataGridViewRow> list = new List <DataGridViewRow>();

            foreach (DataGridViewRow row in ZuoFei_gridView.SelectedRows)
            {
                list.Add(row);
            }
            string rtnStr = Base64Encode(DataService.DoService(new ZuoFeiArgs()
            {
                DataRowList = list
            }));
            CountableResult res = JsonConvert.DeserializeObject <CountableResult>(rtnStr);

            MessageBox.Show($"作废{res.Total}条,成功{res.Succeed}条,失败{res.Failed}条。错误信息:{res.ErrorInfo.ErrorDescription}");
        }