示例#1
0
 /// <summary>
 /// 刷新事件
 /// MOdify by xlb 2013-05-29
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnRefresh_Click(object sender, EventArgs e)
 {
     try
     {
         this.dateStart.DateTime = System.DateTime.Today.AddMonths(-1);
         this.dateEnd.DateTime   = System.DateTime.Today;
         this.dbGrid.DataSource  = null;
         this.dateStart.Focus();
         GetInitDB(true);
         MyControlEventArgs retvals = new MyControlEventArgs(true, this.User_Table.Rows.Count.ToString(), this);
         if (OnButtonClick != null)
         {
             OnButtonClick(this, retvals);
         }
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
示例#2
0
        /// <summary>
        /// 查询事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (CheckDate())
                {
                    m_WaitDialog = new DevExpress.Utils.WaitDialogForm("正在查询数据...", "请稍等");
                    GetInitDB(true);
                    MyControlEventArgs retvals = new MyControlEventArgs(true, this.User_Table.Rows.Count.ToString(), this);
                    if (OnButtonClick != null)
                    {
                        OnButtonClick(this, retvals);
                    }
                    m_WaitDialog.Hide();

                    m_WaitDialog.Close();
                }
            }
            catch (Exception ex)
            {
                m_WaitDialog.Close();
                MyMessageBox.Show(1, ex);
            }
        }