private void dataCountry_SelectionChanged(object sender, EventArgs e) { if (dataCountry.SelectedRows.Count > 0) { country.Id = System.Convert.ToInt32(dataCountry.Rows[dataCountry.CurrentRow.Index].Cells[1].Value.ToString()); country = (Classes.Country)(Helpers.ReaderHelper.SelectObjectOnId((object)country, "spCountry", 11, country.Id)); } }
private void Country_Load(object sender, EventArgs e) { this.BringToFront(); country = new Classes.Country(); conn = new SqlConnection(Form1.connString); adapter = new SqlDataAdapter("select name as [Naziv države], id from country", conn); RefreshGrid(); }
public fCountryUpdate(Classes.Country countryU, Forms.Country fCountry) { this.country = countryU; this.fCountry = fCountry; InitializeComponent(); }
public fCountryUpdate(Classes.Country countryU) { this.country = countryU; InitializeComponent(); }