Exemple #1
0
        private void btn_query_Click(object sender, EventArgs e)
        {
            if (dtp_from.Text.Trim() == "" || dtp_end.Text.Trim() == "")
            {
                MessageBox.Show("请输入查询日期!");
                return;
            }
            string dt1 = Convert.ToDateTime(dtp_from.Text).ToString("yyyy-MM-dd") + " 00:00:00";
            string dt2 = Convert.ToDateTime(dtp_end.Text).ToString("yyyy-MM-dd") + " 23:59:59";

            WaitingFrom.ShowWait("数据正在加载,请稍候...");
            DataTable dt = bll_order.GetXCTJ(dt1, dt2);

            this.gridControl1.DataSource = dt;
            this.gridView1.OptionsView.ColumnAutoWidth  = false;
            this.gridView1.OptionsSelection.MultiSelect = true;
            SetGridViewRowNum.SetRowNum(gridView1);
            this.gridView1.BestFitColumns();
            WaitingFrom.CloseWait();
        }