Exemplo n.º 1
0
 private void biModify_Click(object sender, EventArgs e)
 {
     if (dgvData.SelectedRows.Count > 0)
     {
         DataGridViewRow    row    = dgvData.SelectedRows[0];
         FrmInOutTimeEditor editor = new FrmInOutTimeEditor((Maticsoft.Model.SMT_TIMESCALE_INFO)row.Tag);
         if (editor.ShowDialog(this) == DialogResult.OK)
         {
             var info = editor.TimeScaleInfo;
             row.Cells[0].Value  = info.TIME_NO;
             row.Cells[1].Value  = info.TIME_NAME;
             row.Cells[2].Value  = info.TIME_WEEK_DAY1;
             row.Cells[3].Value  = info.TIME_WEEK_DAY2;
             row.Cells[4].Value  = info.TIME_WEEK_DAY3;
             row.Cells[5].Value  = info.TIME_WEEK_DAY4;
             row.Cells[6].Value  = info.TIME_WEEK_DAY5;
             row.Cells[7].Value  = info.TIME_WEEK_DAY6;
             row.Cells[8].Value  = info.TIME_WEEK_DAY7;
             row.Cells[9].Value  = info.TIME_RANGE_START1;
             row.Cells[10].Value = info.TIME_RANGE_END1;
             row.Cells[11].Value = info.TIME_RANGE_START2;
             row.Cells[12].Value = info.TIME_RANGE_END2;
             row.Cells[13].Value = info.TIME_RANGE_START3;
             row.Cells[14].Value = info.TIME_RANGE_END3;
             row.Cells[15].Value = info.TIME_NEXT_NO;
             row.Cells[16].Value = info.TIME_DATE_START.Date.ToString("yyyy-MM-dd");
             row.Cells[17].Value = info.TIME_DATE_END.ToString("yyyy-MM-dd");
         }
     }
     else
     {
         WinInfoHelper.ShowInfoWindow(this, "请选择编辑对象!");
     }
 }
Exemplo n.º 2
0
        private void biNew_Click(object sender, EventArgs e)
        {
            FrmInOutTimeEditor editor = new FrmInOutTimeEditor();

            if (editor.ShowDialog(this) == DialogResult.OK)
            {
                AddData(editor.TimeScaleInfo);
            }
        }
Exemplo n.º 3
0
 private void biView_Click(object sender, EventArgs e)
 {
     if (dgvData.SelectedRows.Count > 0)
     {
         DataGridViewRow    row    = dgvData.SelectedRows[0];
         FrmInOutTimeEditor editor = new FrmInOutTimeEditor((Maticsoft.Model.SMT_TIMESCALE_INFO)row.Tag, true);
         editor.ShowDialog(this);
     }
     else
     {
         WinInfoHelper.ShowInfoWindow(this, "请选择查看的时区!");
     }
 }