public Yetkili StaffLogin(string UserName, string Password)
 {
     try
     {
         using (IStaffDal _staffDal = new StaffRepository())
         {
             var _password = ToPassword.CreateMD5(Password);//parola şifre dönüştürme
             var staff     = _staffDal.StaffLogin(UserName, _password);
             if (staff == null)
             {
                 throw new Exception("Kullanıcı Adı veya Parola Hatalı. ");
             }
             else
             {
                 return(staff);
             }
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Giriş Hatası Oluştu. " + ex.Message);
     }
 }