Exemple #1
0
        private void btnOpenProblemTrace_Click(object sender, EventArgs e)
        {
            if (this.dataGridViewExt1.CurrentRow == null)
            {
                MessageBox.Show("请先选择一行数据");
                return;
            }
            var key = this.dataGridViewExt1.CurrentRow.Cells["ID"].Value;

            if (key == null)
            {
                MessageBox.Show("请先选择一行数据");
            }
            else
            {
                var probID = this.dataGridViewExt1.CurrentRow.Cells["ProblemTraceID"].Value;
                if (probID == null || string.IsNullOrWhiteSpace(probID.ToString()))
                {
                    MessageBox.Show("该计划没有下发任务!");
                }
                else
                {
                    _loacateIndex = true;
                    FormArgument.ProblemTraceID = Convert.ToInt32(probID);
                    ProblemTraceForm tempForm2 = FormSingle.GetForm(typeof(ProblemTraceForm)) as ProblemTraceForm;
                    tempForm2.ShowNormal(this.ParentForm);
                }
            }
        }
Exemple #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FormArgument.ProblemTraceID = -1;//-1表示新增
            ProblemTraceForm tempForm = FormSingle.GetForm(typeof(ProblemTraceForm)) as ProblemTraceForm;

            tempForm.ShowNormal(this.ParentForm);
        }
Exemple #3
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            var key = this.dgvProblemTrace.CurrentRow.Cells["ID"].Value;

            if (key == null)
            {
                MessageBox.Show("请先选择一行数据");
            }
            else
            {
                FormArgument.ProblemTraceID = Int32.Parse(key.ToString());
                ProblemTraceForm tempForm = FormSingle.GetForm(typeof(ProblemTraceForm)) as ProblemTraceForm;
                tempForm.ShowNormal(this.ParentForm);
            }
        }
Exemple #4
0
        private void dgvProblemTrace_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            var key = dgvProblemTrace.Rows[e.RowIndex].Cells["ID"].Value;

            if (key == null)
            {
                MessageBox.Show("请先查询");
            }
            else
            {
                FormArgument.ProblemTraceID = Int32.Parse(key.ToString());
                ProblemTraceForm tempForm = FormSingle.GetForm(typeof(ProblemTraceForm)) as ProblemTraceForm;
                tempForm.ShowNormal(this.ParentForm);
            }
        }