コード例 #1
0
        private void add_Click(object sender, EventArgs e)
        {
            Instraction_AddEdit instAE = new Instraction_AddEdit(_driver.createInstraction());

            if (instAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                LoadData();
            }
        }
コード例 #2
0
        private void dgvInstractions_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (isCellNoHeader(e.RowIndex))
            {
                int idInstraction = Convert.ToInt32(dgvInstractions.Rows[e.RowIndex].Cells[0].Value);
                Instraction instraction = instractionList.getItem(idInstraction);

                if ((dgvInstractions.Columns[e.ColumnIndex].HeaderText == "Номер") && (instraction.File != string.Empty))
                {
                    WorkWithFiles.openFile(instraction.File);
                }
                else
                {
                    Instraction_AddEdit instAE = new Instraction_AddEdit(instraction);
                    if (instAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                        LoadData();
                }
            }
        }
コード例 #3
0
        private void dgvInstractions_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (isCellNoHeader(e.RowIndex))
            {
                int         idInstraction = Convert.ToInt32(dgvInstractions.Rows[e.RowIndex].Cells[0].Value);
                Instraction instraction   = instractionList.getItem(idInstraction);

                if ((dgvInstractions.Columns[e.ColumnIndex].HeaderText == "Номер") && (instraction.File != string.Empty))
                {
                    WorkWithFiles.openFile(instraction.File);
                }
                else
                {
                    Instraction_AddEdit instAE = new Instraction_AddEdit(instraction);
                    if (instAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        LoadData();
                    }
                }
            }
        }
コード例 #4
0
 private void add_Click(object sender, EventArgs e)
 {
     Instraction_AddEdit instAE = new Instraction_AddEdit(_driver.createInstraction());
     if (instAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         LoadData();
 }