//确定 private void button2_Click(object sender, EventArgs e) { try { ClientProduceOutputBillSave clientDmo = new ClientProduceOutputBillSave { AccountingUnit_ID = SysConfig.Current.AccountingUnit_ID.Value, Department_ID = SysConfig.Current.Department_ID ?? 0, Domain_ID = SysConfig.Current.Domain_ID, User_ID = SysConfig.Current.User_ID, CreateTime = DateTime.Now }; var clientDetail = new ClientGoods(); clientDetail.Goods_ID = mClientGoods.Goods_ID; clientDetail.Goods_Number = decimal.Parse(txtNumber.Text); clientDmo.Details.Add(clientDetail); XmlSerializerUtil.ClientXmlSerializer(clientDmo); SyncBillUtil.SyncProductOut(); MessageBox.Show("操作成功"); txtNumber.Text = ""; textBox1.Text = ""; } catch (Exception ex) { MessageBox.Show(ex.Message);; } }
private void button1_Click(object sender, EventArgs e) { ClientProduceOutputBillSave dmo = new ClientProduceOutputBillSave(); dmo.AccountingUnit_ID = SysConfig.Current.AccountingUnit_ID ?? 0; dmo.Department_ID = SysConfig.Current.Department_ID ?? 0; dmo.Domain_ID = SysConfig.Current.Domain_ID; dmo.User_ID = SysConfig.Current.User_ID; foreach (ListViewItem item in listView1.Items) { if (item.Checked) { var goods = item.Tag as ClientGoods; var detail = new ClientGoods(); detail.Goods_ID = goods.Goods_ID; decimal?number = null; try { number = decimal.Parse(item.SubItems[2].Text); } catch (Exception) { } detail.Goods_Number = number; dmo.Details.Add(detail); } } XmlSerializerUtil.ClientXmlSerializer(dmo); SyncBillUtil.SyncProductInStore(); MessageBox.Show("操作成功"); Close(); }
private void btnOk_Click(object sender, EventArgs e) { try { var dmo = new ClientProduceOutputBillSave(); dmo.ID = long.Parse(pId); foreach (ListViewItem item in listView1.Items) { var goods = item.Tag as ClientGoods; var detail = new ClientGoods(); detail.Bill_ID = goods.Bill_ID; detail.ID = goods.ID; detail.Goods_ID = goods.Goods_ID; detail.Goods_Number = goods.Goods_Number; dmo.Details.Add(detail); } var cprkId = SyncBillUtil.ProductInStoreSaveAndCheck(dmo); if (cprkId == 0) { MessageBox.Show("没有成品入库新建权限"); return; } else if (cprkId == -1) { MessageBox.Show("没有成品入库审核权限"); return; } MessageBox.Show("审核成功"); state = 1; try { //九联业务,如果九联模块用户个性设置中,{默认其他出库会计单位}{默认其他出库仓库}和单据相同,生成【其他出库单】 var id = RpcFacade.Call <long>("/MainSystem/B3_JiuLian/Rpcs/ButcherTouchScreenRpc/OtherOutStoreRpc/OtherOutStoreInsertAndCheck", long.Parse(pId)); if (id == 0) { MessageBox.Show("没有其他出库新建权限"); return; } else if (id == -1) { MessageBox.Show("没有其他出库审核权限"); return; } else if (id == -2) { return; } else if (id == -3) { return; } MessageBox.Show("生成已审核其他出库No." + id); } catch (Exception) { } //RpcFacade.Call<List<RpcObject>>("/MainSystem/B3Butchery/Rpcs/ProductInStoreRpc/ProductInStoreCheck", long.Parse(pId)); //MessageBox.Show("审核成功"); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { this.Close(); } }