示例#1
0
        /// <summary>
        /// Retorna al login desde un form origen
        /// </summary>
        /// <param name="frm"></param>
        public static void ReturnToLogin(MaterialForm frm)
        {
            frm.Cursor = Cursors.WaitCursor;
            Thread.Sleep(500);
            frm.Hide();
            var mainLogin = new LoginForm();

            mainLogin.ShowDialog();
            frm.Close();
        }
示例#2
0
        /// <summary>
        /// LLeva desde un Form origen hasta un form destino
        /// </summary>
        /// <param name="frm"></param>
        /// <param name="FormTo"></param>
        public static void ReturnToPreviousForm(MaterialForm frm, MaterialForm FormTo)
        {
            frm.Cursor = Cursors.WaitCursor;
            Thread.Sleep(500);
            frm.Hide();
            var mainLogin = FormTo;

            mainLogin.ShowDialog();
            frm.Close();
        }
示例#3
0
        public void BtnLogin_Click(object sender, EventArgs e)
        {
            MenuFacturacion menu2 = new MenuFacturacion();



            string UserName = lblUserName.Text.Trim();
            string PassWord = lblPassWord.Text.Trim();

            var result = _loginservice.Find(UserName, PassWord);

            if (result.Count == 0)
            {
                MessageBox.Show("Usuario y/o contraseña incorrecta");
                menu.ShowDialog();
            }
            else
            {
                MessageBox.Show("Ingreso exitoso al sistema");
                menu.Show();
                login.Close();
            }
        }
示例#4
0
 public void Open(MaterialForm childForm)
 {
     if (activeForm != null)
     {
         activeForm.Close();
     }
     activeForm                = childForm;
     childForm.TopLevel        = false;
     childForm.FormBorderStyle = FormBorderStyle.None;
     childForm.Dock            = DockStyle.Fill;
     panel.Controls.Add(childForm);
     panel.Tag = childForm;
     childForm.BringToFront();
     childForm.Show();
 }