Ejemplo n.º 1
0
        public virtual ActionResult Create(Franchise franchise)
        {
            franchise.AddedDate = DateTime.Now;
            hopeLingerieEntities.AddToFranchises(franchise);
            hopeLingerieEntities.SaveChanges();

            MailService.Send("*****@*****.**", "*****@*****.**", "Consulta de Franquicias", "Has recibido una nueva consulta por Franquicias en el sitio web. Podes revisar la misma desde el administrador.");

            return RedirectToAction("Index", "Home");
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Franchises EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToFranchises(Franchise franchise)
 {
     base.AddObject("Franchises", franchise);
 }
 /// <summary>
 /// Create a new Franchise object.
 /// </summary>
 /// <param name="franchiseId">Initial value of the FranchiseId property.</param>
 /// <param name="franchiseCityId">Initial value of the FranchiseCityId property.</param>
 /// <param name="firstName">Initial value of the FirstName property.</param>
 /// <param name="lastName">Initial value of the LastName property.</param>
 /// <param name="address">Initial value of the Address property.</param>
 /// <param name="stateId">Initial value of the StateId property.</param>
 /// <param name="zipCode">Initial value of the ZipCode property.</param>
 /// <param name="telephone1">Initial value of the Telephone1 property.</param>
 /// <param name="eMail">Initial value of the EMail property.</param>
 /// <param name="investmentMoney">Initial value of the InvestmentMoney property.</param>
 /// <param name="why">Initial value of the Why property.</param>
 /// <param name="how">Initial value of the How property.</param>
 /// <param name="when">Initial value of the When property.</param>
 /// <param name="addedDate">Initial value of the AddedDate property.</param>
 /// <param name="city">Initial value of the City property.</param>
 public static Franchise CreateFranchise(global::System.Int32 franchiseId, global::System.Int32 franchiseCityId, global::System.String firstName, global::System.String lastName, global::System.String address, global::System.Int32 stateId, global::System.String zipCode, global::System.String telephone1, global::System.String eMail, global::System.Decimal investmentMoney, global::System.String why, global::System.String how, global::System.String when, global::System.DateTime addedDate, global::System.String city)
 {
     Franchise franchise = new Franchise();
     franchise.FranchiseId = franchiseId;
     franchise.FranchiseCityId = franchiseCityId;
     franchise.FirstName = firstName;
     franchise.LastName = lastName;
     franchise.Address = address;
     franchise.StateId = stateId;
     franchise.ZipCode = zipCode;
     franchise.Telephone1 = telephone1;
     franchise.EMail = eMail;
     franchise.InvestmentMoney = investmentMoney;
     franchise.Why = why;
     franchise.How = how;
     franchise.When = when;
     franchise.AddedDate = addedDate;
     franchise.City = city;
     return franchise;
 }