コード例 #1
0
        /// <summary>
        /// 执行查询
        /// </summary>
        private void DoSearch()
        {
            Frm_Duration frm_1 = new Frm_Duration();

            frm_1.swapdata["MODE"] = "0";
            string s_begin = string.Empty;
            string s_end   = string.Empty;

            if (frm_1.ShowDialog() == DialogResult.OK)
            {
                if (frm_1.swapdata["begin"] == null || frm_1.swapdata["begin"] is System.DBNull)
                {
                    s_begin = "1900-01-01";
                }
                else
                {
                    s_begin = Convert.ToDateTime(frm_1.swapdata["begin"]).ToString("yyyy-MM-dd");
                }

                if (frm_1.swapdata["end"] == null || frm_1.swapdata["end"] is System.DBNull)
                {
                    s_end = "9999-12-31";
                }
                else
                {
                    s_end = Convert.ToDateTime(frm_1.swapdata["end"]).ToString("yyyy-MM-dd");
                }

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

                this.RefreshData();
            }
            frm_1.Dispose();
        }
コード例 #2
0
ファイル: Report_Cashier.cs プロジェクト: radtek/Lime
		private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
		{
			Frm_Duration frm_1 = new Frm_Duration();
			frm_1.swapdata["MODE"] = "1";

			if (frm_1.ShowDialog() == DialogResult.OK)
			{
				if (frm_1.swapdata["begin"] == null)
				{
					s_begin = "1900-01-01";
				}
				else
				{
					s_begin = Convert.ToDateTime(frm_1.swapdata["begin"]).ToString("yyyy-MM-dd");
				}

				if (frm_1.swapdata["end"] == null)
				{
					s_end = "9999-12-31";
				}
				else
				{
					s_end = Convert.ToDateTime(frm_1.swapdata["end"]).ToString("yyyy-MM-dd");
				}
				this.RefreshData();				 
			}
			frm_1.Dispose();
		}
コード例 #3
0
ファイル: Report_FinRoll.cs プロジェクト: radtek/Lime
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Frm_Duration frm_1 = new Frm_Duration();

            frm_1.swapdata["MODE"] = "2";

            if (frm_1.ShowDialog() == DialogResult.OK)
            {
                string s_begin = string.Empty;
                string s_end   = string.Empty;

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

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


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

                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();

                this.Cursor = Cursors.Arrow;
            }
            frm_1.Dispose();
        }
コード例 #4
0
ファイル: Report_Hhzm.cs プロジェクト: radtek/Lime
        /// <summary>
        /// 查询条件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Frm_Duration frm_1 = new Frm_Duration();

            frm_1.swapdata["MODE"] = "2";

            if (frm_1.ShowDialog() == DialogResult.OK)
            {
                string s_begin = string.Empty;
                string s_end   = string.Empty;

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

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

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

                this.Cursor = Cursors.WaitCursor;

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

                repAdapter.Fill(dt_report);
                gridView1.EndUpdate();
                this.Cursor = Cursors.Arrow;
            }
            frm_1.Dispose();
        }