Example #1
0
        private void dataGridViewGepek_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            buttonSave.Visible   = true;
            buttonCancel.Visible = true;
            modositva_gep        = true;

            int sor = dataGridViewGepek.SelectedRows[0].Index;
            //int gepid = Convert.ToInt32(dataGridViewGepek.Rows[sor].Cells["id"].Value);


            Gepek gepek = new Gepek(
                Convert.ToInt32(dataGridViewGepek.SelectedRows[0].Cells["id"].Value),
                dataGridViewGepek.SelectedRows[0].Cells["gyarto"].Value.ToString(),
                dataGridViewGepek.SelectedRows[0].Cells["sorozat"].Value.ToString(),
                dataGridViewGepek.SelectedRows[0].Cells["tipus"].Value.ToString(),
                Convert.ToDouble(dataGridViewGepek.SelectedRows[0].Cells["pixel"].Value),
                dataGridViewGepek.SelectedRows[0].Cells["szenzor"].Value.ToString(),
                dataGridViewGepek.SelectedRows[0].Cells["objektiv"].Value.ToString(),
                Convert.ToInt32(dataGridViewGepek.SelectedRows[0].Cells["ar"].Value)
                );

            GepekOperations go = new GepekOperations(gepek);

            Gepek modositottGepek = go.getModositottGepek();

            dataGridViewGepek.Rows[sor].Cells["gyarto"].Value   = modositottGepek.getGyarto();
            dataGridViewGepek.Rows[sor].Cells["sorozat"].Value  = modositottGepek.getSorozat();
            dataGridViewGepek.Rows[sor].Cells["tipus"].Value    = modositottGepek.getTipus();
            dataGridViewGepek.Rows[sor].Cells["pixel"].Value    = modositottGepek.getPixel();
            dataGridViewGepek.Rows[sor].Cells["szenzor"].Value  = modositottGepek.getSzenzor();
            dataGridViewGepek.Rows[sor].Cells["objektiv"].Value = modositottGepek.getObjektiv();
            dataGridViewGepek.Rows[sor].Cells["ar"].Value       = modositottGepek.getAr();
        }
 public GepekOperations(Gepek gepek)
 {
     this.gepek = gepek;
 }