Exemplo n.º 1
0
        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();
            }
        }
Exemplo n.º 2
0
        void wf_clickOkChange应收款查询()
        {
            if (wf.IsClickOk == true)
            {
                //返回条件框中的sql语句
                string 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 = "YSSearch";
                form.BringToFront();
                form.ShowReport();
            }
        }