private void frmMenu_Produccion_Closing(object sender, CancelEventArgs e)
        {
            this.Dispose();
            frmMenu_Principal fmp = new frmMenu_Principal(user);

            fmp.Show();
        }
示例#2
0
        private void frmMenu_Embarques_Closing(object sender, CancelEventArgs e)
        {
            this.Dispose();
            GC.Collect();
            frmMenu_Principal fmp = new frmMenu_Principal(user);

            fmp.Show();
        }
示例#3
0
        private void menuItem1_Click(object sender, EventArgs e)
        {
            this.Dispose();
            GC.Collect();
            frmMenu_Principal fmp = new frmMenu_Principal(user);

            fmp.Show();
        }
        private void frmMenu_Almacen_Closing(object sender, CancelEventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            this.Dispose();
            frmMenu_Principal fmp = new frmMenu_Principal(user);

            fmp.Show();
            Cursor.Current = Cursors.Default;
        }
        private void menuItem1_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            this.Dispose();
            GC.Collect();
            frmMenu_Principal fmp = new frmMenu_Principal(user);

            fmp.Show();
            Cursor.Current = Cursors.Default;
        }
示例#6
0
        private void mi_Login_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            string[] res = { "", "", "", "" };
            label4.Text = "Cargando ...";
            string user = txtUsuario.Text;
            //string pass = txtContrasena.Text;
            string pass = getMd5Hash(txtContrasena.Text.Trim());

            if (user.Length <= 0 || pass.Length <= 0)
            {
                label4.Refresh();
                txtUsuario.Text = "";
                txtUsuario.Focus();
                txtContrasena.Text = "";
                MessageBox.Show("Favor introducir el Usuario y Contraseña");
                Cursor.Current = Cursors.Default;
            }
            else
            {
                label4.Refresh();
                try
                {
                    res     = c.ingresoUsuario(user, pass);
                    usuario = res;
                    if (res[0].Equals("0") && res[1].Equals("0") && res[2].Equals("0") && res[3].Equals("0"))
                    {
                        Cursor.Current = Cursors.Default;
                        MessageBox.Show("Usuario o contraseña incorrecto", "SESION");
                        label4.Text = "";
                        label4.Refresh();
                    }
                    else
                    {
                        label4.Text = "";
                        label4.Refresh();
                        txtUsuario.Text    = "";
                        txtContrasena.Text = "";
                        txtUsuario.Focus();
                        frmMenu_Principal men = new frmMenu_Principal(usuario);
                        men.Visible = true;
                    }
                }
                catch (WebException ex)
                {
                    if (ex.Status == WebExceptionStatus.ProtocolError)
                    {
                        Console.WriteLine("Status Code : {0}", ((HttpWebResponse)ex.Response).StatusCode);
                        Console.ReadLine();
                        Console.WriteLine("Status Description : {0}", ((HttpWebResponse)ex.Response).StatusDescription);
                        Console.ReadLine();
                    }
                    Cursor.Current = Cursors.Default;
                    MessageBox.Show("Error de comunicación con el web service");
                    label4.Text = "";
                    label4.Refresh();
                    Cursor.Current = Cursors.Default;
                    return;
                }
                catch (Exception ex)
                {
                    Cursor.Current = Cursors.Default;
                    //MessageBox.Show(ex.Message);
                    MessageBox.Show("Servidor no visible, intente de nuevo", "Informacion");
                    label4.Text = "";
                    label4.Refresh();
                }
            }
        }
        private void menuItem1_Click(object sender, EventArgs e)
        {
            frmMenu_Principal fmp = new frmMenu_Principal(user);

            fmp.Show();
        }
示例#8
0
 private void btnFinalizar_Click(object sender, EventArgs e)
 {
     if (res == 1)
     {
         if (dataGrid1.VisibleRowCount > 0)
         {
             DialogResult dr = MessageBox.Show("Aún falta Mercancía por Recoger\n¿Seguro que desea salir?", "Advertencia", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
             if (dr == DialogResult.OK)
             {
                 frmMenu_Principal fmp = new frmMenu_Principal(user);
                 fmp.Show();
                 this.Dispose();
                 dataGrid1.Dispose();
             }
             else
             {
             }
         }
         else
         {
             frmMenu_Principal fmp = new frmMenu_Principal(user);
             fmp.Show();
             this.Dispose();
             dataGrid1.Dispose();
             RFID = false;
         }
     }
     else if (res == 2)
     {
         if (dataGrid1.VisibleRowCount > 0)
         {
             DialogResult dr = MessageBox.Show("Aún falta Mercancía por Embarcar\n¿Seguro que desea salir?", "Advertencia", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
             if (dr == DialogResult.OK)
             {
                 frmMenu_Principal fmp = new frmMenu_Principal(user);
                 fmp.Show();
                 this.Dispose();
                 dataGrid1.Dispose();
                 RFID = false;
             }
             else
             {
             }
         }
         else
         {
             frmMenu_Principal fmp = new frmMenu_Principal(user);
             fmp.Show();
             this.Dispose();
             dataGrid1.Dispose();
             RFID = false;
         }
     }
     else if (res == 3)
     {
         if (dataGrid1.VisibleRowCount > 0)
         {
             DialogResult dr = MessageBox.Show("Aún falta Mercancía por Verificar\n¿Seguro que desea salir?", "Advertencia", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
             if (dr == DialogResult.OK)
             {
                 RFID = false;
                 this.Close();
             }
             else
             {
             }
         }
         else
         {
             RFID = false;
             this.Close();
         }
     }
     else
     {
         RFID = false;
     }
 }