Forums - C# Corner

Forum guidelines
Goran Bibic

Goran Bibic

  • 669
  • 1.7k
  • 17.6k

Constructor change if I wrong and auto generate field

Mar 13 2018 3:22 PM
I want to change in constructor type od ,,izmeni,, I have Created form with name izmeni, but I am wrong and automaticly put izmeni new class...auto generate. I want to change to existing form ,,izmeni,, ...this colorised is problem...I want with izmjeniPrijavnicuButton_Click open existing form izmeni, but app open new empty form
 
  1. private void izmjeniPrijavnicuButton_Click(object sender, EventArgs e)  
  2.        {  
  3.            if (prijava_radnikaDataGridView.SelectedRows.Count > 0)  
  4.            {  
  5.                izmeni dodaj = new izmeni(Convert.ToInt32(prijava_radnikaDataGridView.SelectedRows[0].Cells["dataGridViewTextBoxColumn1"].Value.ToString()));  
  6.            dodaj.Show();  
  7.            }  
  8.            else  
  9.            {  
  10.                MessageBox.Show("Selektujte prijavu za izmjenu!",  
  11.                                   "GreŇ°ka",  
  12.                                   MessageBoxButtons.OK,  
  13.                                   MessageBoxIcon.Error,  
  14.                                   MessageBoxDefaultButton.Button1);  
  15.            }  
  16.    } 
 

Answers (2)