Beispiel #1
0
        private void PicJobParameter_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show(this, "尚未选择要修改Job", "数据同步");
                return;
            }

            DataGridViewRow row     = this.dataGridView1.SelectedRows[0];
            string          jobCode = row.Cells[0].Value.ToString();
            JobEntity       entity  = null;

            IJob job = SyncService.Current.GetJobInstance(jobCode, out entity);

            JobCfgForm form = job.GetCfgForm();

            form.SetJobEntity(entity);
            form.StartPosition = FormStartPosition.CenterScreen;
            form.ShowDialog(this);
        }
Beispiel #2
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (this.dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show(this, "尚未选择要修改Job", "数据同步");
                return;
            }

            DataGridViewRow row     = this.dataGridView1.SelectedRows[0]; // this.lvJobList.SelectedItems[0];
            string          jobCode = row.Cells[0].Value.ToString();      // item.Text;
            JobEntity       entity  = null;                               // SyncService.Current.JobCfgManager.GetJobByCode(jobCode);

            IJob job = SyncService.Current.GetJobInstance(jobCode, out entity);

            JobCfgForm form = job.GetCfgForm();

            form.SetJobEntity(entity);
            form.StartPosition = FormStartPosition.CenterScreen;
            form.ShowDialog(this);
        }