Esempio n. 1
0
 public string ForgetPassword(string email, string Name)
 {
     if (PersonWork.ForgetPassword(email, Name) == true)
     {
         return("Your password send on email");
     }
     return("Wrong Name or Email");
 }
Esempio n. 2
0
 public string Authorization(string email, string password)
 {
     person = PersonWork.Authorization(email, password);
     if (person == null)
     {
         return("Wrong email or password");
     }
     return("Authorization");
 }
Esempio n. 3
0
 public string ChangeSecondName(string Name)
 {
     if (person == null)
     {
         return("Autorizat!!!");
     }
     if (Name.Length < 8)
     {
         return("Small name");
     }
     if (PersonWork.ChangeSecondName(person.Id, Name) == "Name is change")
     {
         person.SecondName = Name;
         return("Name is change");
     }
     return("Name is change");
 }
Esempio n. 4
0
 public string ChangePassword(string NewPassword)
 {
     if (person == null)
     {
         return("Autorizat!!!");
     }
     if (NewPassword.Length < 8)
     {
         return("Small password");
     }
     if (PersonWork.ChangePassword(person.Id, NewPassword) == "Password is change")
     {
         person.Password = NewPassword;
         return("Password is change");
     }
     return("Password is change");
 }
Esempio n. 5
0
 public string AddPerson(string FirstName, string SecondName, string Email, string Password, bool Gender = false, byte[] Img = null)
 {
     if (Email.Length < 8 || Email.Contains("@") == false || Email.Contains(".") == false)
     {
         return("Wrong email");
     }
     if (Password.Length < 8)
     {
         return("Password must have minimum 8 sumvols");
     }
     if (FirstName.Length == 0 || SecondName.Length == 0)
     {
         return("You need input FirstName and SecondName");
     }
     return(PersonWork.AddPerson(new Person()
     {
         Email = Email, Password = Password, FirstName = FirstName, SecondName = SecondName, Gender = Gender, Image = Img
     }));
 }
Esempio n. 6
0
 public string TellMeAboutStartLot(int LotId)
 {
     return(PersonWork.TellMeAboutStartLot(person, LotId));
 }
Esempio n. 7
0
 public void SendMessage(string Thema, string Message, Person to)
 {
     PersonWork.SendMessage(person, Thema, Message, to);
 }