private void clonarToolStripMenuItem_Click(object sender, EventArgs e) { if (DataGridTests.SelectedRows.Count > 0) { var Rows = DataGridTests.SelectedRows; for (int i = 0; i < Rows.Count; i++) { XMLTest.Add(Test.GetTest(Rows[i])); } } }
private void BtnSave_Click(object sender, EventArgs e) { var Test = GetFormTest(); if (Test != null) { if (string.IsNullOrEmpty(TxtIdTest.Text)) { XMLTest.Add(Test); } else { XMLTest.Edit(Test); } CleanForm(); } }