//查询未核销估价明细 private void 未核销估价ToolStripMenuItem_Click(object sender, EventArgs e) { string DataSql = "select * from T_NotOffset where T_NotOffset.单据日期>'2003-12-31' and T_NotOffset.未核销数量<>0 "; //查询窗体 WFilter wf = new WFilter(0, "单据号", false); wf.strSql = DataSql; wf.s_items.Add("单据号," + "T_NotOffset" + ".单据号,C"); wf.s_items.Add("客户名称," + "T_NotOffset" + ".客户名称,C"); wf.s_items.Add("单据日期," + "T_NotOffset" + ".单据日期,N"); wf.btnOK.Enabled = false; wf.ShowDialog(); if (wf.DialogResult == DialogResult.OK) { string StrSql = wf.Return_Sql + " order by T_NotOffset.单据日期 "; DataTable DT = (new SqlDBConnect()).Get_Dt(StrSql); if (DT.Rows.Count <= 0) { MessageBox.Show("未找到与所选条件相关的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } NotOffSetForm form = new NotOffSetForm(StrSql); form.MdiParent = this; form.Show(); } }
//是否可删 private void 未销租机查询ToolStripMenuItem_Click(object sender, EventArgs e) { string strSql; WFilter wf = new WFilter(0, "", false); wf.tableName = "T_Receipt_Main"; //表名 wf.strSql = "SELECT Custid 客户代码,Custname 客户名称,SourceStoreH 仓库,MatId 商品编号," + "MatName 卡片名称,MatType 类别,num 数量,amount 金额,VerifyPerson 验收员 " + "FROM T_WXChildren where (ReceiptTypeID ='88')"; wf.s_items.Add("客户代码,CustID,C"); wf.s_items.Add("客户名称,CustName,C"); wf.s_items.Add("仓库,SourceStoreH,C"); wf.s_items.Add("商品编号,MatId,C"); wf.s_items.Add("卡片名称,MatName,C"); wf.s_items.Add("类别,MatType,C"); wf.s_items.Add("数量,num,N"); wf.s_items.Add("金额,amount,N"); wf.s_items.Add("验收员,VerifyPerson,N"); //隐掉查询键 wf.btnOK.Enabled = false; wf.ShowDialog(); if (wf.DialogResult == DialogResult.OK) { //返回条件框中的sql语句 strSql = wf.Return_Sql; strSql += "order by Custid,Matid"; if (!(new DBUtil()).yn_exist_data(strSql)) { MessageBox.Show("不存在该条数据!", "提示"); return; } Connect(strSql, "WXRent"); } }
private void 应付款查询ToolStripMenuItem_Click(object sender, EventArgs e) { string strSql; WFilter wf = new WFilter(0, "", false); wf.tableName = "T_YFSearch"; //表名 wf.strSql = "select InvoiceNo 发票编号,OccurTime 单据日期,CustName 客户名称,T_Receipt_Main_Det.MatId 商品编号," + "MatName 商品名称,SourceStoreH 仓库,num 数量,Amount 含税金额,MoneyPayed 核销金额,Amount-MoneyPayed 余额, "+ "ReceiptId 单据号,ReceiptTypeID 单据类别 from T_Receipt_Main_Det " + "left join T_MatInf on T_MatInf .Matid =T_Receipt_Main_Det .MatId " + "where ((ReceiptTypeID ='01' and InvoiceNo<>'11111111' and InvoiceNo<>'22222222' " + "and InvoiceNo<>'33333333' and InvoiceNo<>'55555555' and InvoiceNo<>'66666666' " + "and InvoiceNo<>'77777777')or (ReceiptTypeID='03') or (ReceiptTypeID='20') or (ReceiptTypeID='YF')) "; wf.s_items.Add("单据号,ReceiptId,C"); wf.s_items.Add("单据类别,ReceiptTypeID,C"); wf.s_items.Add("发票编号,InvoiceNo,C"); wf.s_items.Add("单据日期,OccurTime,N"); wf.s_items.Add("客户名称,CustName,C"); wf.s_items.Add("商品编号,MatId,C"); wf.s_items.Add("商品名称,MatName,C"); wf.s_items.Add("仓库,SourceStoreH,C"); wf.s_items.Add("数量,num,N"); wf.s_items.Add("含税金额,Amount,N"); wf.s_items.Add("核销金额,MoneyPayed,N"); wf.s_items.Add("余额,Amount-MoneyPayed,N"); //隐掉查询键 wf.btnOK.Enabled = false; wf.ShowDialog(); if (wf.DialogResult == DialogResult.OK) { //返回条件框中的sql语句 strSql = wf.Return_Sql; strSql += "order by InvoiceNo ,CustName "; YSYFForm form = new YSYFForm(); //form.TypeName = "YFSearch"; form.Strsql = strSql; form.MdiParent = this; form.Show(); form.TypeName = "YFSearch"; form.BringToFront(); form.ShowReport(); } }
//是否可删 private void 应收款查询ToolStripMenuItem_Click(object sender, EventArgs e) { wf = new WFilter(0, "", true); wf.tableName = "T_YSSearch"; //表名 wf.strSql = "select ReceiptId 单据号,ReceiptTypeID 单据类别,InvoiceNo 发票编号," + "OccurTime 单据日期,Custid 客户编码, CustName 客户名称," + "T_Receipt_Main_Det.MatId 商品编号,MatName 商品名称,SourceStoreH 仓库,num 数量," + "Amount 含税金额,MoneyPayed 核销金额,Amount- MoneyPayed 余额," + "TTaxPurchPrice 成本金额,Amount-TTaxPurchPrice 毛利," + "OffPeriod 账期,Area 管理区号,CheckPerson 复核员,Salesman 业务员," + "BillUser 操作员 from T_Receipt_Main_Det left join T_MatInf on T_MatInf .Matid =T_Receipt_Main_Det .MatId " + "where (ReceiptTypeID ='51' or ReceiptTypeID ='52' or ReceiptTypeID ='56' or ReceiptTypeID ='YS')"; wf.s_items.Add("单据号,ReceiptId,C"); wf.s_items.Add("单据类别,ReceiptTypeID,C"); wf.s_items.Add("发票编号,InvoiceNo,C"); wf.s_items.Add("单据日期,OccurTime,N"); wf.s_items.Add("客户编码,Custid,C"); wf.s_items.Add("客户名称,CustName,C"); wf.s_items.Add("商品编号,MatId,C"); wf.s_items.Add("商品名称,MatName,C"); wf.s_items.Add("仓库,SourceStoreH,C"); wf.s_items.Add("数量,num,N"); wf.s_items.Add("含税金额,Amount,N"); wf.s_items.Add("成本金额,TTaxPurchPrice,N"); wf.s_items.Add("核销金额,MoneyPayed,N"); wf.s_items.Add("余额,Amount- MoneyPayed,N"); wf.s_items.Add("毛利,Amount-TTaxPurchPrice,N"); wf.clickOkChange += new WFilter.ClickOkChange(wf_clickOkChange应收款查询); //隐掉查询键 wf.btnOK.Enabled = false; wf.Show(); }
private void 单据查询ToolStripMenuItem1_Click(object sender, EventArgs e) { string strSql = "select T_Receipt_Main.ReceiptId as 单据号,T_Receipt_Main.CustomerReceiptNo as 自定义单据号, T_Receipt_Main.ReceiptTypeID as 单据类别, " + "CurWorkMonth as 工作年月, OccurTime as 单据日期, CustId as 客户编码, CustName as 客户名称, InvoiceNo as 发票号,SourceStoreH as 仓库编号 "+ "from T_Receipt_Main,T_Receipts_Det,T_MatInf "+ "where T_Receipt_Main.ReceiptId=T_Receipts_Det.ReceiptId and T_Receipts_Det.MatId=T_MatInf.MatID "; //添加查找窗体 WFilter wf = new WFilter(0, "单据号", true); wf.strSql = strSql; wf.s_items.Add("单据类别,T_Receipt_Main.ReceiptTypeID,C"); wf.s_items.Add("单据号,T_Receipt_Main.ReceiptId,C"); wf.s_items.Add("自定义单据号,T_Receipt_Main.CustomerReceiptNo,C"); wf.s_items.Add("客户编码,CustId,C"); wf.s_items.Add("客户名称,CustName,C"); wf.s_items.Add("单据日期,OccurTime,N"); wf.s_items.Add("物料编码,T_Receipts_Det.MatId,C"); wf.s_items.Add("物料名称,T_MatInf.MatName,C"); wf.btnOK.Enabled = false; wf.ShowDialog(); if (wf.DialogResult == DialogResult.OK) { wf.Return_Sql += " order by OccurTime"; ReceiptQueryForm form = new ReceiptQueryForm(wf.Return_Sql, 0); form.curWorkMonth = this.curWorkMonth; form.MdiParent = this; form.Show(); } }
private void 预收款查询ToolStripMenuItem_Click(object sender, EventArgs e) { string strSql; WFilter wf = new WFilter(0, "", false); wf.strSql = "select OccurTime 单据日期,CustID 客户编号,CustName 客户名称," + "T_Receipt_Main_Det.MatId 商品编号,T_MatInf .MatName 商品名称," + "Amount 含税金额,VerifyPerson 验收员 from T_Receipt_Main_Det " + "LEFT JOIN T_MatInf ON T_MatInf .Matid =T_Receipt_Main_Det .MatId " + "where ReceiptTypeID ='YS'"; wf.s_items.Add("单据日期,OccurTime,N"); wf.s_items.Add("客户编号,CustID,C"); wf.s_items.Add("客户名称,CustName,C"); wf.s_items.Add("商品编号,T_Receipt_Main_Det.MatId,C"); wf.s_items.Add("商品名称,T_MatInf .MatName,C"); wf.s_items.Add("含税金额,Amount,N"); wf.s_items.Add("验收员,VerifyPerson,C"); //隐掉查询键 wf.btnOK.Enabled = false; wf.ShowDialog(); if (wf.DialogResult == DialogResult.OK) { //返回条件框中的sql语句 strSql = wf.Return_Sql; if (!(new DBUtil()).yn_exist_data(strSql)) { MessageBox.Show("不存在该条数据!", "提示"); return; } Connect(strSql, "YSKSearch"); } }
private void 销售单明细表ToolStripMenuItem_Click(object sender, EventArgs e) { string strSql; WFilter wf = new WFilter(0, "", true); wf.tableName = "T_Receipt_Main"; //表名 wf.strSql = "SELECT ReceiptId 单据号,InvoiceNo 发票编号, ReceiptTypeID 单据类别," + "CustomerReceiptNo 自定义编号,CurWorkMonth 工作年月,OccurTime 单据日期," + "CustName 客户名称,MatId 商品编号 ,MatName 商品名称,SourceStoreH 仓库," + "MatType 类型,num 数量,price 含税单价,Amount 含税金额,TTaxPurchPrice 成本金额," + "ML 毛利, lotCode 批号,VerifyPerson 验收员,BillUser 操作员,Memo 备注 " + "FROM T_JXDetail where (ReceiptTypeID >='51' AND ReceiptTypeID <='99')"; wf.s_items.Add("单据号,ReceiptId,C"); wf.s_items.Add("单据类别,ReceiptTypeID,C"); wf.s_items.Add("发票编号,InvoiceNo,C"); wf.s_items.Add("自定义编号,CustomerReceiptNo,C"); wf.s_items.Add("工作年月,CurWorkMonth,N"); wf.s_items.Add("单据日期,OccurTime,N"); wf.s_items.Add("客户名称,CustName,C"); wf.s_items.Add("商品编号,MatId,C"); wf.s_items.Add("商品名称,MatName,C"); wf.s_items.Add("仓库,SourceStoreH,C"); wf.s_items.Add("类型,MatType,C"); wf.s_items.Add("数量,num,N"); wf.s_items.Add("含税单价,price,N"); wf.s_items.Add("含税金额,Amount,N"); wf.s_items.Add("成本金额,TTaxPurchPrice,N"); wf.s_items.Add("毛利,ML,N"); wf.s_items.Add("批号,lotCode,C"); wf.s_items.Add("验收员,VerifyPerson,C"); wf.s_items.Add("操作员,BillUser,C"); //隐掉查询键 wf.btnOK.Enabled = false; wf.ShowDialog(); if (wf.DialogResult == DialogResult.OK) { //返回条件框中的sql语句 strSql = wf.Return_Sql; strSql += "order by OccurTime,receipttypeid"; if (!(new DBUtil()).yn_exist_data(strSql)) { MessageBox.Show("不存在该条数据!", "提示"); return; } Connect(strSql, "XSDetail"); } }
private void 进销存明细ToolStripMenuItem_Click(object sender, EventArgs e) { WFilter wf = new WFilter(0, "MatID", true); //wf.tableName = "T_MatInf"; //表名 wf.strSql = "SELECT dbo.T_Receipt_Main_Det.MatId 物料编号," + "T_Receipt_Main_Det.SourceStoreH AS 仓库编号," + "CONVERT(char(10), dbo.T_Receipt_Main_Det.OccurTime, 121) AS 单据日期," + "dbo.T_ReceiptModal.ReceName AS 单据名称," + " dbo.T_Receipt_Main_Det.ReceiptId AS 单据编号, " + " dbo.T_Receipt_Main_Det.InvoiceNO AS 发票号," + " dbo.T_CustomerInf.CustName AS 客户名称, " + " dbo.T_Receipt_Main_Det.MatType AS 物料类型 FROM dbo.T_Receipt_Main_Det LEFT OUTER JOIN" + " dbo.T_CustomerInf ON dbo.T_CustomerInf.CustID = dbo.T_Receipt_Main_Det.CustID INNER JOIN" + " dbo.T_ReceiptModal ON dbo.T_Receipt_Main_Det.ReceiptTypeID = dbo.T_ReceiptModal.ReceTypeID "; wf.s_items.Add("物料编号,T_Receipt_Main_Det.MatID,C"); wf.s_items.Add("仓库编号,T_Receipt_Main_Det.SourceStoreH,C"); wf.s_items.Add("物料类型,T_Receipt_Main_Det.MatType,C"); wf.s_items.Add("单据日期,T_Receipt_Main_Det.OccurTime,N"); //wf.button3.Enabled = false;// //wf.btnOK.Enabled = false; wf.ShowDialog(); if (wf.DialogResult == DialogResult.OK) { string strSql = wf.Return_Sql; string strSqlWhere = ""; if (strSql.IndexOf(" where ") != -1) { strSqlWhere = strSql.Substring(strSql.IndexOf(" where ")); } PurchaseSSForm form = new PurchaseSSForm(strSqlWhere); form.MdiParent = this; form.Show(); form.progressBar1.Maximum = 7; form.progressBar1.Value = 0; form.build_dt(); form.Produce_dt(); form.progressBar1.Value = 0; } }
private void toolStripButton1_Click(object sender, EventArgs e) { WFilter wf = new WFilter(0, "", false); //应收 if (this.toolStripComboBox1.SelectedIndex == 0) { DataSql = "select * from S70取应收款单据 "; wf.strSql = DataSql; wf.s_items.Add("单据类别,S70取应收款单据.djh,C"); wf.s_items.Add("单据类别,S70取应收款单据.单据类别,C"); wf.s_items.Add("发票编号,S70取应收款单据.发票编号,C"); wf.s_items.Add("单据编号,S70取应收款单据.单据编号,C"); wf.s_items.Add("单据日期,S70取应收款单据.单据日期,C"); wf.s_items.Add("客户名称,S70取应收款单据.客户名称,C"); wf.s_items.Add("商品编号,S70取应收款单据.商品编号,C"); wf.s_items.Add("商品名称,S70取应收款单据.商品名称,C"); wf.s_items.Add("仓库,S70取应收款单据.LX,C"); wf.s_items.Add("数量,S70取应收款单据.数量,N"); wf.s_items.Add("含税金额,S70取应收款单据.含税金额,N"); wf.s_items.Add("核销金额,S70取应收款单据.核销金额,N"); wf.s_items.Add("余额,S70取应收款单据.客户名称-S70取应收款单据.核销金额,N"); //wf.s_items.Add("毛利,S70取应收款单据.单据日期,N"); } //应付 if (this.toolStripComboBox1.SelectedIndex == 1) { DataSql = "select * from S71取应付款单据 "; wf.strSql = DataSql; wf.s_items.Add("单据类别,S71取应付款单据.单据类别,C"); wf.s_items.Add("发票编号,S71取应付款单据.发票编号,C"); wf.s_items.Add("单据日期,S71取应付款单据.单据日期,C"); wf.s_items.Add("客户名称,S71取应付款单据.客户名称,C"); wf.s_items.Add("商品编号,S71取应付款单据.商品编号,C"); wf.s_items.Add("商品名称,S71取应付款单据.商品名称,C"); wf.s_items.Add("数量,S71取应付款单据.数量,N"); wf.s_items.Add("含税金额,S71取应付款单据.含税金额,N"); wf.s_items.Add("核销金额,S71取应付款单据.核销金额,N"); wf.s_items.Add("余额,S71取应付款单据.客户名称-S71取应收款单据.核销金额,N"); } //应收核销 if (this.toolStripComboBox1.SelectedIndex == 2) { DataSql = "select * from S70应收款核销 "; wf.strSql = DataSql; wf.s_items.Add("工作年月,S70应收款核销.工作年月,C"); wf.s_items.Add("核销记录,S70应收款核销.核销记录,C"); wf.s_items.Add("客户代码,S70应收款核销.客户代码,C"); wf.s_items.Add("客户名称,S70应收款核销.客户名称,C"); wf.s_items.Add("核销金额,S70应收款核销.核销金额,N"); wf.s_items.Add("支付方式,S70应收款核销.现金支票,C"); wf.s_items.Add("凭证号,S70应收款核销.凭证号,C"); wf.s_items.Add("备注,S70应收款核销.备注,C"); } //应付核销 if (this.toolStripComboBox1.SelectedIndex == 3) { DataSql = "select * from S71应付款核销 "; wf.strSql = DataSql; wf.s_items.Add("工作年月,S70应收款核销.工作年月,C"); wf.s_items.Add("核销记录,S70应收款核销.核销记录,C"); wf.s_items.Add("客户代码,S70应收款核销.客户代码,C"); wf.s_items.Add("客户名称,S70应收款核销.客户名称,C"); wf.s_items.Add("核销金额,S70应收款核销.核销金额,N"); wf.s_items.Add("支付方式,S70应收款核销.现金支票,C"); wf.s_items.Add("凭证号,S70应收款核销.凭证号,C"); wf.s_items.Add("备注,S70应收款核销.备注,C"); } //预收 if (this.toolStripComboBox1.SelectedIndex == 4) { DataSql = "select * from S70取应收款单据 where S70取应收款单据.单据类别='50' "; wf.strSql = DataSql; wf.s_items.Add("单据类别,S70取应收款单据.djh,C"); wf.s_items.Add("单据类别,S70取应收款单据.单据类别,C"); wf.s_items.Add("发票编号,S70取应收款单据.发票编号,C"); wf.s_items.Add("单据编号,S70取应收款单据.单据编号,C"); wf.s_items.Add("单据日期,S70取应收款单据.单据日期,C"); wf.s_items.Add("客户名称,S70取应收款单据.客户名称,C"); wf.s_items.Add("商品编号,S70取应收款单据.商品编号,C"); wf.s_items.Add("商品名称,S70取应收款单据.商品名称,C"); wf.s_items.Add("仓库,S70取应收款单据.LX,C"); wf.s_items.Add("数量,S70取应收款单据.数量,N"); wf.s_items.Add("含税金额,S70取应收款单据.含税金额,N"); wf.s_items.Add("核销金额,S70取应收款单据.核销金额,N"); wf.s_items.Add("余额,S70取应收款单据.客户名称-S70取应收款单据.核销金额,N"); //wf.s_items.Add("毛利,S70取应收款单据.单据日期,N"); } //预付 if (this.toolStripComboBox1.SelectedIndex == 5) { DataSql = "select * from T_NotOffset where S71取应付款单据.单据类别='50' "; wf.strSql = DataSql; wf.s_items.Add("单据类别,S71取应付款单据.单据类别,C"); wf.s_items.Add("发票编号,S71取应付款单据.发票编号,C"); wf.s_items.Add("单据日期,S71取应付款单据.单据日期,C"); wf.s_items.Add("客户名称,S71取应付款单据.客户名称,C"); wf.s_items.Add("商品编号,S71取应付款单据.商品编号,C"); wf.s_items.Add("商品名称,S71取应付款单据.商品名称,C"); wf.s_items.Add("数量,S71取应付款单据.数量,N"); wf.s_items.Add("含税金额,S71取应付款单据.含税金额,N"); wf.s_items.Add("核销金额,S71取应付款单据.核销金额,N"); wf.s_items.Add("余额,S71取应付款单据.客户名称-S71取应收款单据.核销金额,N"); } wf.btnOK.Enabled = false; wf.ShowDialog(); if (wf.DialogResult == DialogResult.OK) { this.sqlwhere = wf.Return_Sql.Substring(wf.Return_Sql.IndexOf(" where ")); //应收 if (this.toolStripComboBox1.SelectedIndex == 0) { Dt = new DataTable("tb_tmp"); Dt.Columns.Add("单据类别", Type.GetType("System.String")); Dt.Columns.Add("单据日期", Type.GetType("System.String")); Dt.Columns.Add("仓库", Type.GetType("System.String")); Dt.Columns.Add("发票编号", Type.GetType("System.String")); Dt.Columns.Add("客户名称", Type.GetType("System.String")); Dt.Columns.Add("商品编号", Type.GetType("System.String")); Dt.Columns.Add("商品名称", Type.GetType("System.String")); Dt.Columns.Add("数量", Type.GetType("System.Double")); Dt.Columns.Add("含税金额", Type.GetType("System.Double")); Dt.Columns.Add("核销金额", Type.GetType("System.Double")); Dt.Columns.Add("核销记录", Type.GetType("System.String")); Dt.Columns.Add("操作员", Type.GetType("System.String")); Dt.Columns.Add("成本金额", Type.GetType("System.Double")); Dt.Columns.Add("凭证号", Type.GetType("System.String")); Dt.Columns.Add("备注", Type.GetType("System.String")); Dt.Columns.Add("备注1", Type.GetType("System.String")); Update_Dts_YINGSHOU(); Produce_dt(); } //应付 if (this.toolStripComboBox1.SelectedIndex == 1) { Dt = new DataTable("tb_tmp"); Dt.Columns.Add("发票编号", Type.GetType("System.String")); Dt.Columns.Add("单据日期", Type.GetType("System.String")); Dt.Columns.Add("客户名称", Type.GetType("System.String")); Dt.Columns.Add("商品编号", Type.GetType("System.String")); Dt.Columns.Add("商品名称", Type.GetType("System.String")); Dt.Columns.Add("数量", Type.GetType("System.Double")); Dt.Columns.Add("含税金额", Type.GetType("System.Double")); Dt.Columns.Add("核销金额", Type.GetType("System.Double")); Dt.Columns.Add("余额", Type.GetType("System.Double")); Dt.Columns.Add("核销日期", Type.GetType("System.String")); Dt.Columns.Add("核销记录", Type.GetType("System.String")); Dt.Columns.Add("凭证号", Type.GetType("System.String")); Dt.Columns.Add("备注", Type.GetType("System.String")); Dt.Columns.Add("备注1", Type.GetType("System.String")); Update_Dts_YINGFU(); Produce_dt(); } //应收核销 if (this.toolStripComboBox1.SelectedIndex == 2) { Dt = new DataTable("tb_tmp"); Dt.Columns.Add("工作年月", Type.GetType("System.String")); Dt.Columns.Add("客户代码", Type.GetType("System.String")); Dt.Columns.Add("客户名称", Type.GetType("System.String")); Dt.Columns.Add("商品名称", Type.GetType("System.String")); Dt.Columns.Add("核销金额", Type.GetType("System.Double")); Dt.Columns.Add("现金支票", Type.GetType("System.String")); Dt.Columns.Add("核销记录", Type.GetType("System.String")); Dt.Columns.Add("凭证号", Type.GetType("System.String")); Dt.Columns.Add("备注", Type.GetType("System.String")); Dt.Columns.Add("备注1", Type.GetType("System.String")); Update_Dts_YINGSHOUHX(); Produce_dt(); } //应付核销 if (this.toolStripComboBox1.SelectedIndex == 3) { Dt = new DataTable("tb_tmp"); Dt.Columns.Add("工作年月", Type.GetType("System.String")); Dt.Columns.Add("核销记录", Type.GetType("System.String")); Dt.Columns.Add("客户名称", Type.GetType("System.String")); Dt.Columns.Add("核销金额", Type.GetType("System.Double")); Dt.Columns.Add("凭证号", Type.GetType("System.String")); Dt.Columns.Add("备注", Type.GetType("System.String")); Dt.Columns.Add("备注1", Type.GetType("System.String")); Update_Dts_YINGFUHX(); Produce_dt(); } //预收 if (this.toolStripComboBox1.SelectedIndex == 4) { Dt.Columns.Add("单据类别", Type.GetType("System.String")); Dt.Columns.Add("单据日期", Type.GetType("System.String")); Dt.Columns.Add("仓库", Type.GetType("System.String")); Dt.Columns.Add("发票编号", Type.GetType("System.String")); Dt.Columns.Add("客户名称", Type.GetType("System.String")); Dt.Columns.Add("商品编号", Type.GetType("System.String")); Dt.Columns.Add("商品名称", Type.GetType("System.String")); Dt.Columns.Add("数量", Type.GetType("System.Double")); Dt.Columns.Add("含税金额", Type.GetType("System.Double")); Dt.Columns.Add("核销金额", Type.GetType("System.Double")); Dt.Columns.Add("核销记录", Type.GetType("System.String")); Dt.Columns.Add("操作员", Type.GetType("System.String")); Dt.Columns.Add("成本金额", Type.GetType("System.Double")); Dt.Columns.Add("凭证号", Type.GetType("System.String")); Dt.Columns.Add("备注", Type.GetType("System.String")); Dt.Columns.Add("备注1", Type.GetType("System.String")); Update_Dts_YUSHOU(); Produce_dt(); } //预付 if (this.toolStripComboBox1.SelectedIndex == 5) { Dt = new DataTable("tb_tmp"); Dt.Columns.Add("发票编号", Type.GetType("System.String")); Dt.Columns.Add("单据日期", Type.GetType("System.String")); Dt.Columns.Add("客户名称", Type.GetType("System.String")); Dt.Columns.Add("商品编号", Type.GetType("System.String")); Dt.Columns.Add("商品名称", Type.GetType("System.String")); Dt.Columns.Add("数量", Type.GetType("System.Double")); Dt.Columns.Add("含税金额", Type.GetType("System.Double")); Dt.Columns.Add("核销金额", Type.GetType("System.Double")); Dt.Columns.Add("余额", Type.GetType("System.Double")); Dt.Columns.Add("核销日期", Type.GetType("System.String")); Dt.Columns.Add("核销记录", Type.GetType("System.String")); Dt.Columns.Add("凭证号", Type.GetType("System.String")); Dt.Columns.Add("备注", Type.GetType("System.String")); Dt.Columns.Add("备注1", Type.GetType("System.String")); Update_Dts_YUFU(); Produce_dt(); } } }