public ActionResult Create([Bind(Include = "idQuotation,DateCompleted,Quantity,State,TypeQuotation,incidentals,Transport,TotalLabor,CustomerValue,TotalProduction")] Quotation quotation) { if (ModelState.IsValid) { db.Quotations.Add(quotation); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(quotation)); }
public ActionResult Create([Bind(Include = "idPublication,PublicationName,Cost,PublicationDate,State,Height,Width,Depth")] Publication publication) { if (ModelState.IsValid) { db.Publications.Add(publication); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(publication)); }
public ActionResult Create([Bind(Include = "IDMEDIDATIPO,Nombre")] MedidaTipo medidaTipo) { if (ModelState.IsValid) { db.MedidaTipoes.Add(medidaTipo); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(medidaTipo)); }
public ActionResult Create([Bind(Include = "IDDocumentType,DocumentTypeName")] DocumentType documentType) { if (ModelState.IsValid) { db.DocumentTypes.Add(documentType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(documentType)); }
public ActionResult Create([Bind(Include = "IDUserType,UserTypeName")] UserType userType) { if (ModelState.IsValid) { db.UserTypes.Add(userType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(userType)); }
public ActionResult Create([Bind(Include = "idSuplier,SuplierName,IdCity")] Supplier supplier) { if (ModelState.IsValid) { db.Suppliers.Add(supplier); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdCity = new SelectList(db.Cities, "IdCity", "CityName", supplier.IdCity); return(View(supplier)); }
public ActionResult Create([Bind(Include = "idSupplie,SupplieName,idSuplier,IDMEDIDATIPO")] Supplie supplie) { if (ModelState.IsValid) { db.Supplies.Add(supplie); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IDMEDIDATIPO = new SelectList(db.MedidaTipoes, "IDMEDIDATIPO", "Nombre", supplie.IDMEDIDATIPO); ViewBag.idSuplier = new SelectList(db.Suppliers, "idSuplier", "SuplierName", supplie.idSuplier); return(View(supplie)); }
public ActionResult Create(DetailViews view) { if (ModelState.IsValid) { var pic = string.Empty; var folder = "~/Content/Image"; if (view.ImageFile != null) { pic = FileHelper.uploadphoto(view.ImageFile, folder); pic = string.Format("{0}/{1}", folder, pic); } var detail = ToDetail(view); detail.Image = pic; db.Details.Add(detail); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(view)); }