public ActionResult CreateOwner(NewOwner no) { if (ModelState.IsValid) { try { MembershipUser mu = Membership.CreateUser(no.Email, no.Password, no.Email); if (mu != null) { System.Web.Security.Roles.AddUserToRole(no.Email, "owner"); user_owner newOwner = new user_owner { first_name = no.FirstName, last_name = no.LastName, email = no.Email, telephone = no.Phone, franchaser_id = no.FranchizerId, user_id = (string)mu.ProviderUserKey }; DataManager.CreateOwner(newOwner); } } catch (MembershipCreateUserException muex) { TempData["Error"] = Helper.GetMembershipUserCreateStatus(muex.StatusCode); } catch (Exception ex) { TempData["Error"] = ex.Message; } } return(RedirectToAction("CreateOwner")); }
public override IEmailRecipients GetRecipients() { return(new EmailRecipientsWithPermission( ReceivingOwner, ActionsRequiringPermissions.HandlePackageOwnershipRequest, replyTo: new[] { NewOwner.ToMailAddress() })); }
public override IEmailRecipients GetRecipients() { return(new EmailRecipients( to: RequestingOwner.EmailAllowed ? GalleryEmailRecipientsUtility.GetAddressesWithPermission( RequestingOwner, ActionsRequiringPermissions.HandlePackageOwnershipRequest) : new MailAddress[0], replyTo: new[] { NewOwner.ToMailAddress() })); }
public override IEmailRecipients GetRecipients() { if (!RequestingOwner.EmailAllowed) { // This will prevent the email from being sent. return(EmailRecipients.None); } return(new EmailRecipientsWithPermission( RequestingOwner, ActionsRequiringPermissions.HandlePackageOwnershipRequest, replyTo: new[] { NewOwner.ToMailAddress() })); }
static void Main(string[] args) { Animal animal = new Animal(); animal.Name = "Jackie"; animal.Spicie = "labrador"; animal.Color = "fawn"; animal.FavoriteFood = "Meat and Snacks"; animal.Eat("Meat and Snacks"); animal.Sleep("6", "8"); Owner owner = new Owner(); owner.FirstName = "Jack"; owner.LastName = "Doe"; owner.Age = 38; owner.Address = "Ridge St"; owner.City = "New York City"; for (int i = 0; i < owner.ArrPets.Length; i++) { Console.WriteLine(owner.ArrPets[i]); } owner.FullInfo(); #region Shelter Shelter user = new Shelter(); NewOwner theBoss = new NewOwner(); user.User(); theBoss.Owner(); //shelter.Pets[0] = shelter.Pets[ask]; #endregion Console.ReadLine(); }