Exemplo n.º 1
0
        private void back_btn_Click(object sender, RoutedEventArgs e)
        {
            adminPanel a = new adminPanel();

            this.Hide();
            a.Show();
        }
Exemplo n.º 2
0
        private void loginHandler_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(this.txt_username.Text) || string.IsNullOrWhiteSpace(this.txt_password.Password.ToString()))
            {
                if (string.IsNullOrWhiteSpace(this.txt_username.Text))
                {
                    txt_username.Background = Brushes.Red;
                }
                if (string.IsNullOrWhiteSpace(this.txt_password.Password.ToString()))
                {
                    txt_password.Background = Brushes.Red;
                }
                MessageBox.Show("Validate");

                return;
            }
            loginBLL aBLL = new loginBLL();
            loginBO  lBO  = new loginBO();

            lBO.Username = this.txt_username.Text;
            lBO.Password = this.txt_password.Password.ToString();
            int rv;

            rv = aBLL.login(lBO);

            if (rv == 1)
            {
                //MessageBox.Show("Loged in");
                //this.Show(adminPanel.x);
                adminPanel a = new adminPanel();
                this.Hide();
                a.Show();
            }
            else if (rv == 2)
            {
                //MessageBox.Show("User Panael");
                global.user = this.txt_username.Text;
                userPanel u = new userPanel();
                this.Hide();
                u.Show();
            }
            else if (rv == 3)
            {
                MessageBox.Show("User Do Not Exist");
            }
            else if (rv == 4)
            {
                MessageBox.Show("Invalid Username/Password");
            }
        }
Exemplo n.º 3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.window = ((Assingment_1.adminPanel)(target));
                return;

            case 2:
                this.logout_button = ((System.Windows.Controls.Button)(target));

            #line 25 "..\..\..\Admin\adminPanel.xaml"
                this.logout_button.Click += new System.Windows.RoutedEventHandler(this.logout_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.label2 = ((System.Windows.Controls.Label)(target));
                return;

            case 4:

            #line 34 "..\..\..\Admin\adminPanel.xaml"
                ((System.Windows.Controls.Border)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.manageStock_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 5:
                this.image1 = ((System.Windows.Controls.Image)(target));
                return;

            case 6:
                this.label = ((System.Windows.Controls.Label)(target));
                return;

            case 7:

            #line 74 "..\..\..\Admin\adminPanel.xaml"
                ((System.Windows.Controls.Border)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.salesReport_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 8:
                this.image2 = ((System.Windows.Controls.Image)(target));
                return;

            case 9:
                this.label3 = ((System.Windows.Controls.Label)(target));
                return;

            case 10:

            #line 113 "..\..\..\Admin\adminPanel.xaml"
                ((System.Windows.Controls.Border)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.services_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 11:
                this.image3 = ((System.Windows.Controls.Image)(target));
                return;

            case 12:
                this.label4 = ((System.Windows.Controls.Label)(target));
                return;

            case 13:

            #line 152 "..\..\..\Admin\adminPanel.xaml"
                ((System.Windows.Controls.Border)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.updatePassword_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 14:
                this.image4 = ((System.Windows.Controls.Image)(target));
                return;

            case 15:
                this.label5 = ((System.Windows.Controls.Label)(target));
                return;

            case 16:

            #line 191 "..\..\..\Admin\adminPanel.xaml"
                ((System.Windows.Controls.Border)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.staffReg_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 17:
                this.image5 = ((System.Windows.Controls.Image)(target));
                return;

            case 18:
                this.label6 = ((System.Windows.Controls.Label)(target));
                return;

            case 19:

            #line 229 "..\..\..\Admin\adminPanel.xaml"
                ((System.Windows.Controls.Border)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.about_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 20:
                this.image6 = ((System.Windows.Controls.Image)(target));
                return;

            case 21:
                this.label7 = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }