public ActionResult CreateFactory(Factory11 factory) { int uId = Convert.ToInt32(Session["UserId"].ToString()); ObjectParameter statusCode = new ObjectParameter("StatusCode", typeof(int)); ObjectParameter statusMessage = new ObjectParameter("StatusMessage", typeof(string)); db.AddUpdateFactory(0, factory.Name, factory.Type, factory.ProductionCapacity, factory.DailyProductionRate, factory.NumberofMixers, factory.NumberofTrucks, factory.PhoneNumber, factory.FaxNumber, factory.MailBox, factory.Email, factory.Status, factory.Latitude, factory.Longitude, factory.Location, factory.OwnerName, factory.OwnerEmail, factory.OwnerPhoneNumber, factory.ManagerName, factory.ManagerEmail, factory.ManagerPhoneNumber, factory.ManagerExperience, factory.EngineerName, factory.EngineerEmail, factory.EngineerPhoneNumber, factory.EngineerExperience, factory.Comments, null, uId, null, uId, null, statusCode, statusMessage); TempData["AlertMessage"] = "Factory created successfully"; return(RedirectToAction("FactoriesList", "Factory", new { id = 1 })); }
public ActionResult CreateFactory(Factory11 factory) { ObjectParameter statusCode = new ObjectParameter("StatusCode", typeof(int)); ObjectParameter statusMessage = new ObjectParameter("StatusMessage", typeof(string)); db.AddUpdateFactory(0, factory.Name, factory.Type, factory.ProductionCapacity, factory.DailyProductionRate, factory.NumberofMixers, factory.NumberofTrucks, factory.PhoneNumber, factory.FaxNumber, factory.MailBox, factory.Email, factory.Status, factory.Latitude, factory.Longitude, factory.OwnerName, factory.OwnerEmail, factory.OwnerPhoneNumber, factory.ManagerName, factory.ManagerEmail, factory.ManagerPhoneNumber, factory.ManagerExperience, factory.EngineerName, factory.EngineerEmail, factory.EngineerPhoneNumber, factory.EngineerExperience, factory.Comments, null, null, null, null, null, statusCode, statusMessage); return(View("FactoriesList")); }