private void MenuYeniKayit_Click(object sender, EventArgs e) { if (this.ParentForm?.Name != "MainForm") { return; } Forms.PlantForm form = new Forms.PlantForm(); form.Tablo = Table; form.ShowDialog(); }
public override TitleBarTab CreateTab() { var form = new PlantForm(); form.Tablo = MainForm.Table; form.Text = "Bitki Ekle"; return(new TitleBarTab(this) { Content = form }); }
public void PlantUpdate() { if (this.ParentForm?.Name != "MainForm") { return; } List <int> idler = new List <int>(); foreach (DataGridViewRow dr in dtgDataView.SelectedRows) { idler.Add(Convert.ToInt32(dr.Cells[0].Value)); } if (idler.Count <= 0) { return; } PlantForm form = new Forms.PlantForm(new herbariumEntities().plant.Find(idler[0]), Table); form.ShowDialog(); }