Example #1
0
 private void menuUsrCerrarS_Click(object sender, EventArgs e)
 {
     try
     {
         this.Close();
         f = new Login();
         f.Show();
     }
     catch (System.Web.Services.Protocols.SoapException ex)
     {
         if (ex.Detail.InnerText.Length > 100)
         {
             Form f = new FormErrores(ex.Detail.InnerText.Substring(0, 100));
             f.ShowDialog();
         }
         else
         {
             Form f = new FormErrores(ex.Detail.InnerText);
             f.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         Form f = new FormErrores(ex.Message);
         f.ShowDialog();
     }
 }
Example #2
0
 private void menuEmp_Click(object sender, EventArgs e)
 {
     try
     {
         if (f != null)
         {
             f.Close();
             f = null;
         }
         f               = new ABMEmpleado(_Emp);
         f.MdiParent     = this;
         f.StartPosition = FormStartPosition.Manual;
         f.Show();
     }
     catch (System.Web.Services.Protocols.SoapException ex)
     {
         if (ex.Detail.InnerText.Length > 100)
         {
             Form f = new FormErrores(ex.Detail.InnerText.Substring(0, 100));
             f.ShowDialog();
         }
         else
         {
             Form f = new FormErrores(ex.Detail.InnerText);
             f.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         Form f = new FormErrores(ex.Message);
         f.ShowDialog();
     }
 }
Example #3
0
        public FrmInicio(Empleado em)
        {
            InitializeComponent();
            _Emp = em;
            Empleado empLog = em;

            menuUsr.Text = em._NombreCompleto;

            try
            {
                if (f != null)
                {
                    f.Close();
                    f = null;
                }
                f               = new Estadisticas();
                f.MdiParent     = this;
                f.StartPosition = FormStartPosition.Manual;
                f.Show();
            }
            catch (System.Web.Services.Protocols.SoapException ex)
            {
                if (ex.Detail.InnerText.Length > 100)
                {
                    Form f = new FormErrores(ex.Detail.InnerText.Substring(0, 100));
                    f.ShowDialog();
                }
                else
                {
                    Form f = new FormErrores(ex.Detail.InnerText);
                    f.ShowDialog();
                }
            }
        }