private void RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { if (datagridProductlist.Rows[e.RowIndex].Cells[/*e.ColumnIndex*/0].Value!=null) { int id =int.Parse(datagridProductlist.Rows[e.RowIndex].Cells[0].Value.ToString()); Product frm = new Product(id); frm.ShowDialog(); } }
private void EditPanel_Add(object sender, EventArgs e) { try { Product p = new Product(); p.ShowDialog(); Fill_Products_LB(); } catch { } }
private void Button_Click(object sender, RoutedEventArgs e) { try { Product p = new Product(); p.ShowDialog(); Fill_Products_LB(); } catch { } }
private void EditPanel_Edit(object sender, EventArgs e) { try { if(Products_DG.SelectedIndex != -1) { Product p = new Product(((DataRowView)Products_DG.SelectedItem)[0]); p.ShowDialog(); Fill_Products_LB(); } } catch { } }
private void addNewProductToolStripMenuItem_Click(object sender, EventArgs e) { Product frm = new Product(); frm.ShowDialog(); }