Exemplo n.º 1
0
        private void Show_Condition()
        {
            Frm_financeDaySearch frm_1 = new Frm_financeDaySearch();

            frm_1.swapdata["BusinessObject"] = this;
            if (frm_1.ShowDialog() == DialogResult.OK)
            {
                frm_1.Dispose();
                string s_begin = string.Empty;
                string s_end   = string.Empty;
                string s_fa003 = string.Empty;

                if (this.swapdata["dbegin"] == null)
                {
                    s_begin = "1900/01/01";
                }
                else
                {
                    s_begin = Convert.ToDateTime(this.swapdata["dbegin"]).ToString("yyyy/MM/dd");
                }

                if (this.swapdata["dend"] == null)
                {
                    s_end = "9999/12/31";
                }
                else
                {
                    s_end = Convert.ToDateTime(this.swapdata["dend"]).ToString("yyyy/MM/dd");
                }

                if (this.swapdata["FA003"] == null || string.IsNullOrEmpty(this.swapdata["FA003"].ToString()))
                {
                    s_fa003 = "%";
                }
                else
                {
                    s_fa003 = this.swapdata["FA003"].ToString() + "%";
                }


                op_begin.Value = s_begin;
                op_end.Value   = s_end;
                op_fa003.Value = s_fa003;

                gridView1.BeginUpdate();
                dt_finance.Rows.Clear();

                finAdapter.Fill(dt_finance);

                gridCol_Fa004.SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Sum;
                gridCol_Fa004.SummaryItem.DisplayFormat = "合计 = {0:N2}";

                gridColumn5.SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Count;
                gridColumn5.SummaryItem.DisplayFormat = "共计 = {0:N0}笔";

                gridView1.EndUpdate();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 显示查询条件
        /// </summary>
        private void Show_Condition()
        {
            Frm_financeDaySearch frm_1 = new Frm_financeDaySearch();

            frm_1.swapdata["BusinessObject"] = this;
            if (frm_1.ShowDialog() == DialogResult.OK)
            {
                string s_begin = string.Empty;
                string s_end   = string.Empty;
                string s_fa003 = string.Empty;
                string s_fa100 = string.Empty;

                if (frm_1.swapdata["dbegin"] == null)
                {
                    s_begin = "1900/01/01";
                }
                else
                {
                    s_begin = Convert.ToDateTime(frm_1.swapdata["dbegin"]).ToString("yyyy/MM/dd");
                }

                if (frm_1.swapdata["dend"] == null)
                {
                    s_end = "9999/12/31";
                }
                else
                {
                    s_end = Convert.ToDateTime(frm_1.swapdata["dend"]).ToString("yyyy/MM/dd");
                }

                if (frm_1.swapdata["FA003"] == null || string.IsNullOrEmpty(frm_1.swapdata["FA003"].ToString()))
                {
                    s_fa003 = "%";
                }
                else
                {
                    s_fa003 = frm_1.swapdata["FA003"].ToString() + "%";
                }

                if (frm_1.swapdata["FA100"] == null)
                {
                    s_fa100 = "%";
                }
                else
                {
                    s_fa100 = frm_1.swapdata["FA100"].ToString();
                }


                op_begin.Value = s_begin;
                op_end.Value   = s_end;
                op_fa003.Value = s_fa003;
                op_fa100.Value = s_fa100;

                op_begin_2.Value = s_begin;
                op_end_2.Value   = s_end;
                op_fa003_2.Value = s_fa003;
                op_fa100_2.Value = s_fa100;

                this.Cursor = Cursors.WaitCursor;


                //////1.按收费笔数检索
                gridView1.BeginUpdate();
                dt_finance.Rows.Clear();

                finAdapter.Fill(dt_finance);

                gridCol_Fa004.SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Sum;
                gridCol_Fa004.SummaryItem.DisplayFormat = "合计 = {0:N2}";

                gridColumn5.SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Count;
                gridColumn5.SummaryItem.DisplayFormat = "共计 = {0:N0}笔";

                gridView1.EndUpdate();


                //////2. 按发票检索
                gridView3.BeginUpdate();
                dt_invoice.Rows.Clear();

                invAdapter.Fill(dt_invoice);

                gridColumn_fee.SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Sum;
                gridColumn_fee.SummaryItem.DisplayFormat = "合计 = {0:N2}";

                gridColumn_ph.SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Count;
                gridColumn_ph.SummaryItem.DisplayFormat = "共计 = {0:N0}张发票";

                gridView3.EndUpdate();

                this.Cursor = Cursors.Arrow;
            }
            frm_1.Dispose();
        }