Beispiel #1
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow dr = dataGridView1.SelectedRows[0];
                this.Hide();
                frmStock frm = new frmStock();
                frm.Show();
                frm.txtStockID.Text = dr.Cells[0].Value.ToString();
                frm.txtConfigID.Text = dr.Cells[1].Value.ToString();
                frm.txtProductname.Text = dr.Cells[2].Value.ToString();
                frm.txtFeatures.Text = dr.Cells[3].Value.ToString();
                frm.txtPrice.Text = dr.Cells[4].Value.ToString();
                frm.txtQty.Text = dr.Cells[5].Value.ToString();
                frm.txtTotalPrice.Text = dr.Cells[6].Value.ToString();
                frm.dtpStockDate.Text = dr.Cells[7].Value.ToString();
                frm.btnUpdate.Enabled = true;
                frm.btnDelete.Enabled = true;
                frm.btnSave.Enabled = false;
                frm.label8.Text = label1.Text;
               }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
 private void frmStockRecord_FormClosing(object sender, FormClosingEventArgs e)
 {
     this.Hide();
     frmStock frm = new frmStock();
     frm.label8.Text = label1.Text;
     frm.Show();
 }
Beispiel #3
0
 private void stockToolStripMenuItem_Click(object sender, EventArgs e)
 {
     this.Hide();
     frmStock frm = new frmStock();
     frm.label8.Text = lblUser.Text;
     frm.Show();
 }