Beispiel #1
0
 private void registroClienteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (EntEmpleado.Puesto == "Cajero" || EntEmpleado.Puesto == "Jefe")
     {
         frmCliente frm = new frmCliente();
         frm.ShowDialog();
         return;
     }
     MessageBox.Show("No tienes permisos para acceder a esta función", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
 }
 /*
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     frmCliente ofrmCliente = new frmCliente("Alta");
     ofrmCliente.Show();
 }
  * */
 private void btnAgregar_Click_1(object sender, EventArgs e)
 {
     frmCliente ofrmCliente = new frmCliente();
     ofrmCliente.Show();
 }
 private void btnModificar_Click(object sender, EventArgs e)
 {
     oCliente = (Modelo_Entidades.Cliente)bsClientes.Current;
     if (oCliente == null)
     {
         MessageBox.Show("Primero debe elegir un cliente.", "Error.", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         frmCliente ofrmCliente = new frmCliente(oCliente);
         ofrmCliente.Show();
     }
 }