Ejemplo n.º 1
0
 private void dgw_MouseClick(object sender, MouseEventArgs e)
 {
     try
     {
         if (lblOperation.Text == "Stock")
         {
             DataGridViewRow dr = dgw.SelectedRows[0];
             this.Hide();
             frmStock frm = new frmStock();
             frm.Show();
             frm.txtID.Text           = dr.Cells[0].Value.ToString();
             frm.txtStockID.Text      = dr.Cells[1].Value.ToString();
             frm.dtpDate.Text         = dr.Cells[2].Value.ToString();
             frm.txtProductID.Text    = dr.Cells[3].Value.ToString();
             frm.cmbProductName.Text  = dr.Cells[4].Value.ToString();
             frm.txtSupplierID.Text   = dr.Cells[5].Value.ToString();
             frm.cmbSupplierName.Text = dr.Cells[6].Value.ToString();
             frm.txtQuantity.Text     = dr.Cells[7].Value.ToString();
             frm.txtQty1.Text         = dr.Cells[7].Value.ToString();
             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);
     }
 }
Ejemplo n.º 2
0
        private void metroTile6_Click(object sender, EventArgs e)
        {
            frmStock frm = new frmStock();

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

            frm.lblUser.Text = lblUser.Text;
            frm.Reset();
            frm.Show();
        }