public FrmKelolaAdmin(string receiveIp, string receiveNama, string sendId, string sendNama,
                              Action setVisibleNotifikasiEditSucces, string sendJekel, string sendUser, string sendPassword,
                              Action setDataAdministrator, FrmMenu frmMenu, FrmAdministartor frmAdministartor)
        {
            InitializeComponent();
            InitializeFunction();

            this.receiveIp   = receiveIp;
            this.receiveNama = receiveNama;
            this.setVisibleNotifikasiEditSucces = setVisibleNotifikasiEditSucces;
            this.setDataAdministrator           = setDataAdministrator;
            this.frmMenu          = frmMenu;
            this.frmAdministartor = frmAdministartor;

            lblKeterangan.Text = "Ubah Administrator";
            receiveId          = sendId;
            txtNama.Text       = sendNama;

            if (sendJekel == "Pria")
            {
                cbPria.Checked = true;
            }
            if (sendJekel == "Wanita")
            {
                cbWanita.Checked = true;
            }

            txtNamaPengguna.Text = sendUser;
            txtPassword.Text     = sendPassword;
        }
Exemplo n.º 2
0
        static void Main()
        {
            BlockEngine.Main.platform = BlockEngine.Main.Platform.DesktopGL;
            var Frm = new FrmMenu();

            Frm.ShowDialog();
        }
Exemplo n.º 3
0
        public FrmKelolaPegawai(string sendProcess, string receiveIp, string receiveNama, string sendNip, string sendNama,
                                string sendPagolru, string sendUnitKerja, string sendJabatan, string sendKeterangan,
                                Action setVisibleNotifikasiEditSucces, Action setDataPegawai,
                                FrmMenu frmMenu, FrmPegawai frmPegawai)
        {
            InitializeComponent();
            InitializeFunction();

            this.receiveIp   = receiveIp;
            this.receiveNama = receiveNama;
            this.setVisibleNotifikasiEditSucces = setVisibleNotifikasiEditSucces;
            this.setDataPegawai = setDataPegawai;
            this.frmMenu        = frmMenu;
            this.frmPegawai     = frmPegawai;
            receiveProcess      = sendProcess;

            if (sendProcess == "INSERT")
            {
                lblKeterangan.Text = "Tambah Pegawai";
            }
            else
            {
                txtJabatan.Visible = false;
                labelX1.Visible    = false;

                lblKeterangan.Text         = "Ubah Pegawai";
                txtNip.Text                = sendNip;
                txtNama.Text               = sendNama;
                txtPangkat.Text            = sendPagolru;
                txtJabatan.Text            = sendJabatan;
                cmbKeterangan.SelectedItem = sendKeterangan;
                cmbUnitKerja.SelectedValue = sendUnitKerja;
            }
        }
Exemplo n.º 4
0
        private void btn_sair_Click(object sender, EventArgs e)
        {
            var frmMenu = new FrmMenu();

            frmMenu.Visible = true;
            this.Close();
        }
Exemplo n.º 5
0
        private void btnEntrar_Click(object sender, EventArgs e)
        {
            Controle controle = new Controle();

            controle.acessar(txtLogin.Text, txtSenha.Text);

            if (controle.mensagem.Equals(""))
            {
                if (controle.tem)
                {
                    this.Hide();
                    FrmMenu frmMenu = new FrmMenu();
                    frmMenu.Closed += (s, args) => this.Close();
                    frmMenu.Show();
                }
                else
                {
                    MessageBox.Show("Login não encontrado, verifique login e senha!", "Erro!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                MessageBox.Show(controle.mensagem);
            }
        }
Exemplo n.º 6
0
        private void btnmenu_Click(object sender, EventArgs e)
        {
            FrmMenu menu = new FrmMenu();

            menu.Show();
            this.Hide();
        }
Exemplo n.º 7
0
        private void btnEntrar_Click(object sender, EventArgs e)
        {
            Login log = new Login();

            log.Usuario  = txtUser.Text;
            log.Password = txtPass.Text;

            ClsLogin clslog = new ClsLogin();
            FrmMenu  menu   = new FrmMenu();

            int variabledeevaluacion = clslog.accesoBidimecional(log);


            if (variabledeevaluacion == 1)
            {
                MessageBox.Show("Enter");
                FrmMenu frm = new FrmMenu();
                frm.usuarioEstado = txtUser.Text;
                frm.Show();

                this.Hide();
            }
            else
            {
                MessageBox.Show("Datos incorrectos");
            }
        }
Exemplo n.º 8
0
        public FrmKelolaUnitKerja(Action setVisibleNotifikasiEditSucces, string receiveIp, string receiveNama, string sendProcess,
                                  string sendUnitKerja, string sendIdUnit, string sendAlamatUnit, Action setDataUnitKerja,
                                  FrmMenu frmMenu, FrmUnitKerja frmUnitKerja)
        {
            InitializeComponent();
            InitializeFunction();

            this.receiveIp      = receiveIp;
            this.receiveNama    = receiveNama;
            this.receiveProcess = sendProcess;;
            this.setVisibleNotifikasiEditSucces = setVisibleNotifikasiEditSucces;
            this.setDataUnitKerja = setDataUnitKerja;
            this.frmMenu          = frmMenu;
            this.frmUnitKerja     = frmUnitKerja;

            if (sendProcess == "INSERT")
            {
                lblKeterangan.Text = "Kelola Unit Kerja";
            }
            else
            {
                lblKeterangan.Text = "Ubah Unit Kerja";
                receiveId          = sendIdUnit;
                txtUnitKerja.Text  = sendUnitKerja;
                txtAlamat.Text     = sendAlamatUnit;
            }
        }
Exemplo n.º 9
0
        /// <summary>
        /// Login button click
        /// Check Operator Code & password
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnLogin_Click(object sender, EventArgs e)
        {
            //Base_BL bbl = new Base_BL();
            //bbl.ShowMessage("I001", "テスト", "テスト1");
            if (ErrorCheck())
            {
                //共通処理 受取パラメータ、接続情報
                //コマンドライン引数より情報取得
                //Iniファイルより情報取得
                if (loginbl.ReadConfig() == false)
                {
                    //起動時エラー    DB接続不可能
                    this.Close();
                    System.Environment.Exit(0);
                }

                mse = loginbl.M_Staff_LoginSelect(GetInfo());
                if (mse != null)
                {
                    FrmMenu menuForm = new FrmMenu(mse);
                    this.Hide();
                    menuForm.ShowDialog();
                    this.Close();
                }
                else
                {
                    loginbl.ShowMessage("");
                    txtOperatorCD.Select();
                }
            }
        }
Exemplo n.º 10
0
 public AddBookForm(Employee e, FrmMenu menuForm)
 {
     this.EMPLOYEE = e;
     this.menuForm = menuForm;
     InitializeComponent();
     publishers = PublisherDAO.SelectAllPublishers();
     categories = CategoryDAO.SelectAllCategories();
 }
Exemplo n.º 11
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            this.Hide();
            var frmMenu = new FrmMenu();

            frmMenu.Closed += (s, args) => this.Close();
            frmMenu.Show();
        }
Exemplo n.º 12
0
 public ViewBookForm(Employee e, FrmMenu menuForm)
 {
     this.EMPLOYEE = e;
     this.menuForm = menuForm;
     InitializeComponent();
     this.searchBookPanel = new SearchBookPanel(this);
     panel1.Controls.Add(searchBookPanel);
 }
Exemplo n.º 13
0
        private void button1_Click(object sender, EventArgs e)
        {
            Mode = ApplicationMode.Mode.OFFLINE;
            var menyn = new FrmMenu(Mode);

            menyn.Visible = true;
            Visible       = false;
        }
Exemplo n.º 14
0
 public CreateBillForm(Employee e, FrmMenu container)
 {
     EMPLOYEE       = e;
     this.container = container;
     InitializeComponent();
     searchBookPanel = new SearchBookPanel(this);
     Controls.Add(searchBookPanel);
 }
Exemplo n.º 15
0
        static void Main()
        {
            //BlockEngine.Main.Game = new BlockEngine.Game1();
            //BlockEngine.Main.Game.Run();
            BlockEngine.Main.platform = BlockEngine.Main.Platform.DirectX;
            var Frm = new FrmMenu();

            Frm.ShowDialog();
        }
Exemplo n.º 16
0
        private void btnACEPTA_Click_1(object sender, EventArgs e)
        {
            contraseña_actual = cSeguridad.USUARIOS.EncriptarClave(txtCLAVE_ACTUAL.Text);


            if (oUsuario.Contraseña != contraseña_actual)
            {
                MessageBox.Show("Contraseña actual invalida");
                return;
            }
            if (oUsuario.Contraseña == contraseña_actual)
            {
                if (txtCLAVE_NUEVA.Text != txtCLAVE_NUEVA_CONFIRM.Text)
                {
                    MessageBox.Show("Contraseña nueva invalida");
                    txtCLAVE_NUEVA.Text         = "";
                    txtCLAVE_NUEVA_CONFIRM.Text = "";
                    return;
                }
                else
                {
                    oUsuario.Contraseña = cSeguridad.USUARIOS.EncriptarClave(txtCLAVE_NUEVA.Text);
                    System.Net.Mail.SmtpClient cliente = new System.Net.Mail.SmtpClient();
                    cliente.Credentials = new System.Net.NetworkCredential("*****@*****.**", "uaiseguridad");

                    cliente.Port      = 587;
                    cliente.EnableSsl = true;
                    cliente.Host      = "smtp.gmail.com";
                    try
                    {
                        cliente.Send(cSeguridad.USUARIOS.Enviar_Mail(oUsuario, txtCLAVE_NUEVA.Text, false));
                        oUsuario.EstadoContraseña = "registrada";
                        MessageBox.Show("Mail enviado con los datos!");
                    }
                    catch (Exception)
                    {
                        MessageBox.Show("Error al enviar el mail con los datos, contactarse con administracion!");
                        return;
                    }
                    cSeguridad.USUARIOS.MODIFICAR_USUARIO(oUsuario);

                    if (menu == "menu")
                    {
                        this.Hide();
                        FrmMenu frm = new FrmMenu(oUsuario);
                        frm.ShowDialog();
                    }
                    else
                    {
                        this.Hide();
                        FRM_LOGIN frm = new FRM_LOGIN();
                        frm.ShowDialog();
                    }
                }
            }
        }
Exemplo n.º 17
0
 public EditBookForm(int bookID, FrmMenu frmMenu, Employee e)
 {
     InitializeComponent();
     this.bookID  = bookID;
     this.frmMenu = frmMenu;
     EMPLOYEE     = e;
     authors      = AuthorDAO.SelectAllAuthors();
     publishers   = PublisherDAO.SelectAllPublishers();
     categories   = CategoryDAO.SelectAllCategories();
 }
Exemplo n.º 18
0
        private void btnIngresar_Click(object sender, EventArgs e)
        {
            if (this.verifica_usuario_password())
            {
                this.Hide();

                MessageBox.Show("Felicidades ya vaz a ir al menu principal");

                FrmMenu Ventana = new FrmMenu();

                Ventana.Show();
            }
        }
Exemplo n.º 19
0
 private void Btn_Ingresar_Click(object sender, EventArgs e)
 {
     us = _controller.Login(txtPassword.Text, txtUser.Text);
     if (us != null)
     {
         FrmMenu menu = new FrmMenu(us);
         menu.ShowDialog();
         this.Hide();
     }
     else
     {
         MessageBox.Show("Error!!!!");
     }
 }
Exemplo n.º 20
0
 private void btnNOACEPTA_Click_1(object sender, EventArgs e)
 {
     if (menu == "menu")
     {
         this.Hide();
         FrmMenu frm = new FrmMenu(oUsuario);
         frm.ShowDialog();
     }
     else
     {
         this.Hide();
         FRM_LOGIN frm = new FRM_LOGIN();
         frm.ShowDialog();
     }
 }
Exemplo n.º 21
0
        private void btningreso_Click(object sender, EventArgs e)
        {
            if (this.VERIFICA_USUARIO_PASSWORD())
            {
                MessageBox.Show("Ingreso correcto ");

                this.Hide();



                FrmMenu miVentana = new FrmMenu();

                miVentana.ShowDialog();
            }
        }
Exemplo n.º 22
0
        public FrmMenu Start()
        {
            _frm = new FrmMenu(null, "FrmMenu");
            _frm.Show(_dockPanel, DockState.DockLeft);
            //frm.MdiParent = _main;
            _startItem = _formsCache.CreateFormItem <FrmSenseNodes>("Sense Nodes", ApplicationMenuIcon.BaseMenuNodes, null);
            var menuItems = new List <MenuItemWrapper>();

            //menuItems.Add(_formsCache.CreateFormItem<FrmSenseLogViewer>("Log"));
            menuItems.Add(_formsCache.CreateFormItem <FrmWindowsLogViewer>("Windows Logs", ApplicationMenuIcon.BaseMenuLogs, null));
            menuItems.Add(_formsCache.CreateFormItem <FrmLogCollectorLog>("LogCollector Log", ApplicationMenuIcon.BaseMenuLogs, null));
            menuItems.Add(_formsCache.CreateFormItem <FrmSenseLogs>("Log files", ApplicationMenuIcon.BaseMenuLogs, null));
            menuItems.Add(_startItem);
            _frm.ShowMenu(menuItems);
            return(_frm);
        }
Exemplo n.º 23
0
        private void BtnEntrar_Click(object sender, EventArgs e)
        {
            var usuario = txtUsuario.Text;
            var senha   = txtSenha.Text;

            if ("usuario".Equals(usuario) && "1234".Equals(senha))
            {
                Hide();
                var principal = new FrmMenu();
                principal.Closed += (s, args) => Close();
                principal.Show();
            }
            else
            {
                MessageBox.Show(@"Usuário e/ou senha inválido(s)!");
            }
        }
Exemplo n.º 24
0
        private void btnEntrar_Click(object sender, EventArgs e)
        {
            FrmMenu      menu    = new FrmMenu();
            ConexaoLogin conexao = new ConexaoLogin(txtUsuario.Text, txtSenha.Text);

            if (conexao.ValideLogin())
            {
                MessageBox.Show("Logado com sucesso");
                this.Hide();
                menu.Show();
                menu.lblNome.Text = conexao.NomeUsuario;
            }
            else
            {
                MessageBox.Show("Erro ao logar ", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 25
0
        public void IniciarSesion()
        {
            string result = usuariosCat.IniciarSesion(txtUsuario.Text, txtContraseña.Text);

            //si iniciar sesión no nos devuelve ningun mensaje, dejamos que el usuario entre al sistema.
            if (string.IsNullOrEmpty(result))
            {
                //inicializamos el menú,
                FrmMenu menu = new FrmMenu();
                menu.Show();
                this.Visible = false;
            }
            else
            {
                //si devuelve mensaje, se lo mostramos al usuario.
                MessageBox.Show(result);
            }
        }
Exemplo n.º 26
0
        private void button1_Click(object sender, EventArgs e)
        {
            ClsAcceso acce = new ClsAcceso();


            int valor = acce.acceso(txtUsuario.Text, txtPass.Text);

            if (valor == 1)
            {
                FrmMenu venta = new FrmMenu();
                venta.Show();
                //MessageBox.Show("Welcome");
            }
            else
            {
                MessageBox.Show("Error");
            }
        }
Exemplo n.º 27
0
        private void btnEntrar_Click(object sender, EventArgs e)
        {
            ClsAcceso acce  = new ClsAcceso();
            int       valor = acce.acceso(txtEmail.Text, txtPassword.Text);


            if (valor == 1)
            {
                MessageBox.Show("Bienvenido");

                FrmMenu menu = new FrmMenu();
                //ventas.MdiParent = this;
                menu.Show();
            }
            else
            {
                MessageBox.Show(" Email o contraseña incorrecto");
            }
        }
Exemplo n.º 28
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            Employee emp = Employee.getEmployeeByLogin(txtUsername.Text, txtPassword.Text);

            if (emp == null)
            {
                MessageBox.Show("Login Failed!");
            }
            else
            {
                txtPassword.Text = "";
                txtUsername.Text = "";
                EMPLOYEE         = emp;

                FrmMenu a = new FrmMenu(emp, this);
                a.Show();
                this.Visible = false;
            }
        }
Exemplo n.º 29
0
        private void btnEntrar_Click(object sender, EventArgs e)
        {
            using (sistema_ventasEntities2 db = new sistema_ventasEntities2())
            {
                var lista = from usuario in db.tb_usuarios
                            where usuario.Email == txtUsuario.Text &&
                            usuario.Contrasena == txtPass.Text
                            select usuario;

                if (lista.Count() > 0)
                {
                    FrmMenu menu = new FrmMenu();
                    menu.Show();
                }
                else
                {
                    MessageBox.Show("El Usuario no existe");
                }
            }
        }
Exemplo n.º 30
0
        private void BtnIngresar_Click(object sender, EventArgs e)
        {
            using (Models.inventarioEntities db = new Models.inventarioEntities())
            {
                var lst = from d in db.usuarios
                          where d.usuario == txtUser.Text.Trim() &&
                          d.contrasena == txtPassword.Text.Trim()
                          select d;

                if (lst.Count() > 0)
                {
                    FrmMenu form = new FrmMenu();
                    form.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Usuario o Contraseña invalida");
                }
            }
        }
        private void btnUsuario_Click(object sender, EventArgs e)
        {

            try
            {
                if (ClsUtil.IsNumeric(txtUsuario.Text))
                {
                    FormLogin loginDao = new FormLogin();
                    Usuario usuario = loginDao.fazerLogin(int.Parse(txtUsuario.Text));

                    if (usuario != null)
                    {
                        FrmMenu frmMenu = new FrmMenu();
                        FrmMenu.usuario = usuario;
                        this.Hide();
                        frmMenu.Show();
                    }
                    else
                    {
                        MessageBox.Show("Usuario ou senha incorreto.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
                else
                {
                    MessageBox.Show("RA é um campo numerico.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }



            }
            catch (Exception ex)
            {
                MessageBox.Show("Houve erro: " + ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

        }