コード例 #1
0
ファイル: Login.cs プロジェクト: qdobyte/EbayII
        private void btnIngresar_Click(object sender, EventArgs e)
        {
            LoginController loginController = null;
            string          usuario         = null;
            string          contrasena      = null;

            loginController = new LoginController();
            usuario         = txbUsuarioByLogin.Text;
            contrasena      = txbContrasenaByLogin.Text;

            bool consultaExitosa = loginController.GetLogin(usuario, contrasena);

            if (consultaExitosa)
            {
                this.Hide();
                HomeView homeView = new HomeView(this);
                homeView.UserName = loginController.Nombre;
                homeView.Show();
            }
            else
            {
                MessageView messageView = new MessageView(loginController.Error);
                messageView.Show();
                txbUsuarioByLogin.Text    = "";
                txbContrasenaByLogin.Text = "";
            }
        }
コード例 #2
0
        public VehicleView(HomeView HomeView, string userName)
        {
            InitializeComponent();
            VehicleController vehicleController = new VehicleController();

            this.HomeView         = HomeView;
            this.UserName         = userName;
            this.txtVendedor.Text = this.UserName;
        }