예제 #1
0
 /// <summary>
 /// sag tuş ile güncelleme ekranini açan metot
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void UpdateItemToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (productType == "1")
     {
         BookUpdateForm frmUpdateBook = new BookUpdateForm(productId);
         frmUpdateBook.ShowDialog();
     }
     else if (productType == "3")
     {
         MagazineUpdateForm frmMagazineUpdate = new MagazineUpdateForm(productId);
         frmMagazineUpdate.ShowDialog();
     }
     else if (productType == "2")
     {
         CdUpdateForm frmCdUpdate = new CdUpdateForm(productId);
         frmCdUpdate.ShowDialog();
     }
 }
예제 #2
0
 /// <summary>
 /// çift tıklama ile veri güncelleme ekranını açan metot
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DgvUrunler_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgvUrunler.Rows[e.RowIndex].Cells["productType"].Value.ToString() == "1")
     {
         BookUpdateForm frmBookUpdate = new BookUpdateForm(dgvUrunler.Rows[e.RowIndex].Cells["productId"].Value.ToString());
         frmBookUpdate.ShowDialog();
     }
     else if (dgvUrunler.Rows[e.RowIndex].Cells["productType"].Value.ToString() == "3")
     {
         MagazineUpdateForm frmMagazineUpdate = new MagazineUpdateForm(dgvUrunler.Rows[e.RowIndex].Cells["productId"].Value.ToString());
         frmMagazineUpdate.ShowDialog();
     }
     else if (dgvUrunler.Rows[e.RowIndex].Cells["productType"].Value.ToString() == "2")
     {
         CdUpdateForm frmCdUpdate = new CdUpdateForm(dgvUrunler.Rows[e.RowIndex].Cells["productId"].Value.ToString());
         frmCdUpdate.ShowDialog();
     }
     else
     {
         MessageBox.Show("invalid product type");
     }
 }