Exemplo n.º 1
0
        private void estoquesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form estoque = new frmEstoque();

            estoque.MdiParent = this;
            estoque.Show();
        }
Exemplo n.º 2
0
 private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     try
     {
         DataGridViewRow dr = dataGridView1.SelectedRows[0];
         this.Hide();
         frmEstoque frm = new frmEstoque();
         frm.Show();
         frm.txtProdutoID.Text       = dr.Cells[0].Value.ToString();
         frm.txtNomeProduto.Text     = dr.Cells[1].Value.ToString();
         frm.txtCaracteristicas.Text = dr.Cells[6].Value.ToString();
         if (lblTipoUsuario.Text == "ADMIN")
         {
             frm.lblTipoUsuario.Text   = lblTipoUsuario.Text;
             frm.btnObterDados.Enabled = true;
         }
         if (lblTipoUsuario.Text == "SUPERVISOR")
         {
             frm.lblTipoUsuario.Text   = lblTipoUsuario.Text;
             frm.btnObterDados.Enabled = false;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void frmEstoqueRegistro_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmEstoque frm = new frmEstoque();

            frm.Show();
            if (lblTipoUsuario.Text == "ADMIN")
            {
                frm.lblTipoUsuario.Text   = lblTipoUsuario.Text;
                frm.btnObterDados.Enabled = true;
            }
            if (lblTipoUsuario.Text == "SUPERVIDORR")
            {
                frm.lblTipoUsuario.Text   = lblTipoUsuario.Text;
                frm.btnObterDados.Enabled = false;
            }
        }
Exemplo n.º 4
0
 private void estoqueToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (UsuarioTipo.Text == "ADMIN")
     {
         frmEstoque frm = new frmEstoque();
         frm.lblTipoUsuario.Text   = lblUsuario.Text;
         frm.btnObterDados.Enabled = true;
         frm.MdiParent             = this;
         frm.Show();
     }
     if (UsuarioTipo.Text == "SUPERVISOR")
     {
         frmEstoque frm = new frmEstoque();
         frm.lblTipoUsuario.Text   = lblUsuario.Text;
         frm.btnObterDados.Enabled = false;
         frm.MdiParent             = this;
         frm.Show();
     }
 }