Beispiel #1
0
 private void DoModify()
 {
     if (dgvData.SelectedRows.Count > 0)
     {
         FrmCtrlTaskEditor taskEditor = new FrmCtrlTaskEditor((Maticsoft.Model.SMT_CTRLR_TASK)dgvData.SelectedRows[0].Tag);
         if (taskEditor.ShowDialog(this) == DialogResult.OK)
         {
             DataGridViewRow row  = dgvData.SelectedRows[0];
             var             info = taskEditor.Task;
             row.Cells[0].Value  = info.TASK_NO;
             row.Cells[1].Value  = info.TASK_NAME;
             row.Cells[2].Value  = info.VALID_STARTDATE.Date;
             row.Cells[3].Value  = info.VALID_ENDDATE.Date;
             row.Cells[4].Value  = info.ACTION_TIME;
             row.Cells[5].Value  = info.MON_STATE;
             row.Cells[6].Value  = info.TUE_STATE;
             row.Cells[7].Value  = info.THI_STATE;
             row.Cells[8].Value  = info.WES_STATE;
             row.Cells[9].Value  = info.FRI_STATE;
             row.Cells[10].Value = info.SAT_STATE;
             row.Cells[11].Value = info.SUN_STATE;
             row.Cells[12].Value = info.DOOR_NAMES;     //
             row.Cells[13].Value = info.STR_CTRL_STYLE; //
             row.Cells[14].Value = info.TASK_DESC;
         }
     }
     else
     {
         WinInfoHelper.ShowInfoWindow(this, "请选择一条任务修改!");
     }
 }
Beispiel #2
0
 private void biView_Click(object sender, EventArgs e)
 {
     if (dgvData.SelectedRows.Count > 0)
     {
         FrmCtrlTaskEditor taskEditor = new FrmCtrlTaskEditor((Maticsoft.Model.SMT_CTRLR_TASK)dgvData.SelectedRows[0].Tag, true);
         taskEditor.ShowDialog(this);
     }
 }
Beispiel #3
0
        //新建
        private void biNew_Click(object sender, EventArgs e)
        {
            FrmCtrlTaskEditor taskEditor = new FrmCtrlTaskEditor();

            if (taskEditor.ShowDialog(this) == DialogResult.OK)
            {
                AddData(taskEditor.Task);
            }
        }