示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            product = "new";
            addProduct ap = new addProduct();

            ap.ShowDialog(this);
        }
示例#2
0
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         product = "old";
         int selectedrowindex = dataGridView1.SelectedCells[0].RowIndex;
         int totalrows        = dataGridView1.Rows.Count;
         if (selectedrowindex == totalrows)
         {
             MessageBox.Show("சரியான பொருளை தேர்ந்தெடுங்கள்");
             return;
         }
         product_id = dataGridView1.Rows[selectedrowindex].Cells["productid"].Value.ToString();
         cateName   = dataGridView1.Rows[selectedrowindex].Cells["categoryname"].Value.ToString();
         prdname    = dataGridView1.Rows[selectedrowindex].Cells["productname"].Value.ToString();
         addProduct ap = new addProduct();
         ap.ShowDialog(this);
     }
     catch (ArgumentOutOfRangeException)
     {
         MessageBox.Show("உங்களால் பழைய பொருளை உருவாக்க முடியாது", "பொருளின் விவரம்", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }