private async void buttonItem1_Click(object sender, EventArgs e) { AdderTeamName AdderTeamName1 = new AdderTeamName(null); if (AdderTeamName1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { await Sqldatabasethrding.SqlSaveVitl(AdderTeamName1.NameTeam.adder()); NameTeam.NameTeamStatic = await NameTeam.GetAll(); ClassDataGridViewDo.DataGridEnterGridFornameTeamOption(dataGridViewX2, NameTeam.NameTeamStatic); } }
private async void dataGridViewX2_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1) { AdderTeamName AdderTeamName = new AdderTeamName(NameTeam.NameTeamStatic[ClassDataGridViewDo.RetunIndexByIdSech(Convert.ToInt32(dataGridViewX2.Rows[e.RowIndex].Cells[0].Value), NameTeam.NameTeamStatic)]); if (AdderTeamName.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (await Sqldatabasethrding.SqlSaveVitl(AdderTeamName.NameTeam.updata())) { NameTeam.NameTeamStatic = await NameTeam.GetAll(); ClassDataGridViewDo.DataGridEnterGridFornameTeamOption(dataGridViewX2, NameTeam.NameTeamStatic); } else { MegBox.Show("خطأ بالإتصال"); } } this.Opacity = 1; } }