Exemplo n.º 1
0
        private void DataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                this.Hide();
                DataGridViewRow dr  = DataGridView1.SelectedRows[0];
                FrmSupplier     frm = new FrmSupplier();
                frm.Show();
                frm.txtSupplierName.Text = dr.Cells[0].Value.ToString();
                frm.txtAddress.Text      = dr.Cells[1].Value.ToString();
                frm.txtContactNo.Text    = dr.Cells[2].Value.ToString();
                frm.txtEmail.Text        = dr.Cells[3].Value.ToString();
                frm.ID.Text                  = dr.Cells[4].Value.ToString();
                frm.lblUser.Text             = lblUser.Text;
                frm.lblUserType.Text         = lblUserType.Text;
                frm.btnUpdate_record.Enabled = true;
                frm.btnSave.Enabled          = false;
                frm.btnDelete.Enabled        = true;
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 2
0
        private void FrmBookSuppliers_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            FrmSupplier frm = new FrmSupplier();

            frm.lblUserType.Text = lblUserType.Text;
            frm.lblUser.Text     = lblUser.Text;
            frm.Show();
        }
        private void eventToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            this.Hide();
            FrmSupplier frm = new FrmSupplier();

            frm.lblUserType.Text = UserType.Text;
            frm.lblUser.Text     = User.Text;
            frm.Show();
        }