Ejemplo n.º 1
0
        private void productsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmProduct frm = new frmProduct();

            frm.lblUser.Text = lblUser.Text;
            frm.Reset();
            frm.Show();
        }
Ejemplo n.º 2
0
        private void metroTile2_Click(object sender, EventArgs e)
        {
            frmProduct frm = new frmProduct();

            frm.lblUser.Text = lblUser.Text;
            frm.Reset();
            frm.Show();
        }
Ejemplo n.º 3
0
 private void dgw_MouseClick(object sender, MouseEventArgs e)
 {
     try
     {
         if (lblOperation.Text == "Product Master")
         {
             DataGridViewRow dr = dgw.SelectedRows[0];
             this.Hide();
             frmProduct frm = new frmProduct();
             frm.Show();
             frm.txtID.Text            = dr.Cells[0].Value.ToString();
             frm.txtProductID.Text     = dr.Cells[1].Value.ToString();
             frm.txtProductName.Text   = dr.Cells[2].Value.ToString();
             frm.cmbCategory.Text      = dr.Cells[3].Value.ToString();
             frm.txtSubCategoryID.Text = dr.Cells[4].Value.ToString();
             frm.cmbSubCategory.Text   = dr.Cells[5].Value.ToString();
             frm.txtFeatures.Text      = dr.Cells[6].Value.ToString();
             frm.txtPrice.Text         = dr.Cells[7].Value.ToString();
             frm.txtVAT.Text           = dr.Cells[8].Value.ToString();
             frm.txtServiceTax.Text    = dr.Cells[9].Value.ToString();
             frm.txtDiscount.Text      = dr.Cells[10].Value.ToString();
             byte[]       data = (byte[])dr.Cells[11].Value;
             MemoryStream ms   = new MemoryStream(data);
             frm.pictureBox1.Image = Image.FromStream(ms);
             frm.btnUpdate.Enabled = true;
             frm.btnDelete.Enabled = true;
             frm.btnSave.Enabled   = false;
             frm.lblUser.Text      = lblUser.Text;
             lblOperation.Text     = "";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }