private void Login_Click(object sender, RoutedEventArgs e)
        {
            ////HomePage hmg = new HomePage();
            ////this.Hide();
            ////hmg.ShowDialog();
            ////this.Show();
            //Registration reg = new Registration();
            //this.Hide();
            //reg.ShowDialog();
            //this.Show();
            string empUserName = txtUsername.Text;
            string empPassword = txtPassword.Password.ToString();
            bool   isSucess    = EmployeeBal.LoginSucessFull(empUserName, empPassword);

            MessageBox.Show(isSucess.ToString());
        }
        /// <summary>
        /// Author : Team Six
        /// Description : This method Is Used To inser new Employee After The Button Click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void btnRegister_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                bool           IsAddedEmployee = false;
                int            result;
                EmployeeMaster newEmp = new EmployeeMaster();
                newEmp.Designation = "Employee";
                if (int.TryParse(txtEmpId.Text, out result))
                {
                    newEmp.EmployeeID = result;
                }
                newEmp.FirstName = txtEmpName.Text;
                newEmp.LastName  = txtLastName.Text;

                newEmp.MiddleName         = txtMiddleName.Text;
                newEmp.Location           = txtLocation.Text;
                newEmp.ReimbursementAccNo = txtReimburse.Text;
                newEmp.UserName           = txtUserName.Text;
                newEmp.PasswordHASH       = EmployeeBal.createHash(txtPassword.Text);
                IsAddedEmployee           = EmployeeBal.RegNewEmployee(newEmp);
                if (!IsAddedEmployee)
                {
                    MessageBox.Show("Employee not added");
                }
                else
                {
                    MessageBox.Show("Employee Added Sucess Fully");
                    AdminHome newHome = new AdminHome();
                    this.Close();
                    newHome.ShowDialog();
                    this.Show();
                }
            }
            catch (EmpException ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Exemplo n.º 3
0
 // GET: Home
 public HomeController()
 {
     _bal = new EmployeeBal();
 }
Exemplo n.º 4
0
 public void setup()
 {
     _sut = new EmployeeBal();
 }
Exemplo n.º 5
0
 public LoginController()
 {
     _bal = new EmployeeBal();
 }