public static byte[] createHash(string passWord)
 {
     byte[] res;
     try
     {
         if (string.IsNullOrWhiteSpace(passWord))
         {
             throw new EmpException("you should mention a password");
         }
         else
         {
             res = EmpDal.comPuteHash(passWord);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(res);
 }
        public static bool RegNewEmployee(EmployeeMaster regEmp)
        {
            bool isEmployeeAdded = false;

            try
            {
                if (ValidateEmpData(regEmp))
                {
                    isEmployeeAdded = EmpDal.AddEmployee(regEmp);
                }
            }

            catch (EmpException ex)
            {
                throw ex;
            }
            catch (Exception ex) {
                throw ex;
            }
            return(isEmployeeAdded);
        }
        public static bool LoginSucessFull(string userName, string passWord)
        {
            bool LoginSucessFull = false;

            try
            {
                LoginSucessFull = EmpDal.CheckEmployeeLogin(userName, passWord);
            }

            catch (EmpException ex) {
                throw ex;
            }

            catch (Exception ex)
            {
                throw ex;
            }
            if (!LoginSucessFull)
            {
                throw new EmpException("provide valid username and password");
            }

            return(LoginSucessFull);
        }