public bool CreateNewPartner(AccountServiceContract accountRole) { try { var data = new AccountService() { Name = accountRole.Name, Password = accountRole.Password, IDASR = accountRole.IDASR, Token = accountRole.Token, Active = true }; db.AccountServices.Add(data); if (db.SaveChanges() > 0) { return(true); } else { return(false); } return(false); } catch (Exception e) { Console.WriteLine(e); return(false); } }
public AccountServiceContract GetPartnerLogin(AccountServiceContract account) { var data = db.AccountServices.Where(x => x.Name == account.Name && x.Password == account.Password) .SingleOrDefault(); var res = new AccountServiceContract() { ID = data.ID, Name = data.Name, Token = data.Token, Link = "http://localhost:60198/AuthService.svc" }; return(res); }
public bool CreaterNewPartner(AccountServiceContract account) { account.Token = TokenGenerator.Generate(64); return(new PartnerDao().CreateNewPartner(account)); }
public bool CreateNewPartner(AccountServiceContract account) { return(new PartnerBus().CreaterNewPartner(account)); }
public AccountServiceContract PartnerLogin(AccountServiceContract account) { return(new PartnerDao().GetPartnerLogin(account)); }
public bool CreatePartner(AccountServiceContract account) { return(new Responsetory().CreateNewPartner(account)); }