Example #1
0
        public ActionResult Configurations(Configuration config)
        {
            if (ModelState.IsValid)
            {
                this.repository.Configuration = config;
                return RedirectToAction("Index", "Home");
            }
            else
                TempData["ErrorMessage"] = "Ocorreu um erro ao salvar os dados";

            return View("Configurations", config);
        }
Example #2
0
 /// <summary>
 /// Create a new Configuration object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="docNumber">Initial value of the DocNumber property.</param>
 /// <param name="stateRegistration">Initial value of the StateRegistration property.</param>
 /// <param name="telephone">Initial value of the Telephone property.</param>
 /// <param name="celPhone">Initial value of the CelPhone property.</param>
 /// <param name="radioPhone">Initial value of the RadioPhone property.</param>
 /// <param name="email">Initial value of the Email property.</param>
 public static Configuration CreateConfiguration(global::System.Int32 id, global::System.String name, global::System.String docNumber, global::System.String stateRegistration, global::System.String telephone, global::System.String celPhone, global::System.String radioPhone, global::System.String email)
 {
     Configuration configuration = new Configuration();
     configuration.Id = id;
     configuration.Name = name;
     configuration.DocNumber = docNumber;
     configuration.StateRegistration = stateRegistration;
     configuration.Telephone = telephone;
     configuration.CelPhone = celPhone;
     configuration.RadioPhone = radioPhone;
     configuration.Email = email;
     return configuration;
 }
Example #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Configurations EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToConfigurations(Configuration configuration)
 {
     base.AddObject("Configurations", configuration);
 }