コード例 #1
0
 private void button5_Click(object sender, EventArgs e)
 {
     if (dataGridView2.SelectedRows.Count >= 1 && dataGridView2.Rows.Count > 1)
     {
         showbillproducts sbp = new showbillproducts();
         sbp.inovice_id = int.Parse(dataGridView2.SelectedRows[0].Cells[1].Value.ToString());
         sbp.ShowDialog();
     }
     else
     {
         MessageBox.Show("يرجي اختيار الفاتورة لعرض منتاجاتها");
     }
 }
コード例 #2
0
 private void button7_Click(object sender, EventArgs e)
 {
     if (dataGridView3.Rows.Count > 1 && dataGridView3.SelectedRows.Count > 0)
     {
         showbillproducts sb = new showbillproducts();
         sb.inovice_id = int.Parse(dataGridView3.SelectedRows[0].Cells[1].Value.ToString());
         if (dataGridView3.SelectedRows[0].Cells[2].Value.ToString() == "جملة")
         {
             sb.pricetype = 1;
         }
         else
         {
             sb.pricetype = 2;
         }
         sb.ShowDialog();
     }
     else
     {
         MessageBox.Show("يرجي اختيار الفاتورة المراد عرض منتجاتها");
     }
 }