Esempio n. 1
0
 /// <summary>
 /// 上一页以及下一页的跳转功能
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void gridViewPaging1_PagingChanged(object sender, MyPagingEventArgs e)
 {
     if (BgWait1.IsBusy == false)
     {
         gridControl1.RefreshDataSource();
         BgWait1.RunWorkerAsync("SearchData");
     }
 }
Esempio n. 2
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     if (BgWait1.IsBusy == false)
     {
         page.CurrentPage = 1;
         BgWait1.RunWorkerAsync("SearchData");
     }
 }
Esempio n. 3
0
        /// <summary>
        /// barManager控件响应事件,打开新窗体,传入参数区分新增跟修改,等待窗体数据返回更新列表数据
        /// lastupdata:20161115XXQ
        /// /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barManager1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                frmExecute AddExetue = null;
                strDeviCode = null;
                if (BgWait1.IsBusy == false)
                {
                    switch (e.Item.Name)
                    {
                    case "bbtniAdd":

                        AddExetue = new frmExecute(context, strDeviCode);

                        if (AddExetue.ShowDialog() == DialogResult.OK)
                        {
                            BgWait1.RunWorkerAsync("SearchData");
                        }

                        break;

                    case "bbtniUpdate":

                        if (gridView1.FocusedRowHandle >= 0)
                        {
                            var model1 = gridView1.GetRow(gridView1.FocusedRowHandle) as SRExcute.DeviceExecute;

                            AddExetue = new frmExecute(context, model1.DeviCode);

                            if (AddExetue.ShowDialog() == DialogResult.OK)
                            {
                                BgWait1.RunWorkerAsync("SearchData");
                            }
                        }
                        else
                        {
                            ClsMsg.ShowWarningMsg("选中要修改的设备信息");
                        }

                        break;

                    case "bbtnExit":

                        this.Close();

                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                ClsMsg.ShowErrMsg(ex.ToString());
            }
        }
Esempio n. 4
0
        private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            try
            {
                if (BgWait1.IsBusy == false)
                {
                    switch (e.ClickedItem.Name)
                    {
                    case "bttniStartTask":
                        BgWait1.RunWorkerAsync("bttniStartTask");

                        break;

                    case "bttniEndTask":
                        BgWait1.RunWorkerAsync("bttniEndTask");


                        break;

                    case "bbtniExit":

                        this.Close();

                        break;


                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Esempio n. 5
0
 /// <summary>
 /// 搜索按钮响应时间
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     BgWait1.RunWorkerAsync("SearchData");
 }