Ejemplo n.º 1
0
        //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

        public void reload()
        {
            Billingform bf = new Billingform(user_name, log);

            bf.Show();
            this.Close();
        }
Ejemplo n.º 2
0
        private void BtnLogin_Click(object sender, EventArgs e)
        {

            User UPName = new User();
            UPName.GetUsername = UserName.Text;
            UPName.GetPassword = maskedTextBox1.Text;

            if (UserName.Text != " ")
            {
                if (UPName.UsernameAuthenticaion())
                {
                    if (maskedTextBox1.Text != " ")
                    {
                        if (UPName.PasswordAuthenticaion())
                        {
                            if (UPName.UserCatagory() == "Admin")
                            {
                                Admin AdminForm = new Admin(this);
                                AdminForm.Show();
                                this.Hide();

                                UserName.Text = "UserName";
                                maskedTextBox1.Text = "Password";
                                UserName.ForeColor = Color.Gray;
                                maskedTextBox1.ForeColor = Color.Gray;
                                maskedTextBox1.PasswordChar = '\0';
                            }
                            else if (UPName.UserCatagory() == "User")
                            {
                                Billingform Bill = new Billingform(UPName.GetUsername, this);
                                Bill.Show();
                                this.Hide();

                                UserName.Text = "UserName";
                                maskedTextBox1.Text = "Password";
                            }
                        }
                        else
                        {
                            MessageBox.Show("Please Enter CORRECT Password");
                        }
                    }
                    else
                    {
                        MessageBox.Show("password is Empty");
                    }
                }
                else
                {
                    MessageBox.Show("Please Enter CORRECT Username");
                }
            }
            else
            {
                MessageBox.Show("Username is Empty");
            }


        }
Ejemplo n.º 3
0
        private void BtnLogin_Click(object sender, EventArgs e)
        {
            User UPName = new User();

            UPName.GetUsername = UserName.Text;
            UPName.GetPassword = maskedTextBox1.Text;

            if (UserName.Text != " ")
            {
                if (UPName.UsernameAuthenticaion())
                {
                    if (maskedTextBox1.Text != " ")
                    {
                        if (UPName.PasswordAuthenticaion())
                        {
                            if (UPName.UserCatagory() == "Admin")
                            {
                                Admin AdminForm = new Admin(this);
                                AdminForm.Show();
                                this.Hide();

                                UserName.Text               = "UserName";
                                maskedTextBox1.Text         = "Password";
                                UserName.ForeColor          = Color.Gray;
                                maskedTextBox1.ForeColor    = Color.Gray;
                                maskedTextBox1.PasswordChar = '\0';
                            }
                            else if (UPName.UserCatagory() == "User")
                            {
                                Billingform Bill = new Billingform(UPName.GetUsername, this);
                                Bill.Show();
                                this.Hide();

                                UserName.Text       = "UserName";
                                maskedTextBox1.Text = "Password";
                            }
                        }
                        else
                        {
                            MessageBox.Show("Please Enter CORRECT Password");
                        }
                    }
                    else
                    {
                        MessageBox.Show("password is Empty");
                    }
                }
                else
                {
                    MessageBox.Show("Please Enter CORRECT Username");
                }
            }
            else
            {
                MessageBox.Show("Username is Empty");
            }
        }
Ejemplo n.º 4
0
        //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

        public void reload()
        {
            Billingform bf = new Billingform(user_name,log);
            bf.Show();
            this.Close();
        }