public ActionResult Edit([Bind(Include = "idQuotation,DateCompleted,Quantity,State,TypeQuotation,incidentals,Transport,TotalLabor,CustomerValue,TotalProduction")] Quotation quotation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(quotation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(quotation));
 }
Пример #2
0
 public ActionResult Edit([Bind(Include = "idPublication,PublicationName,Cost,PublicationDate,State,Height,Width,Depth")] Publication publication)
 {
     if (ModelState.IsValid)
     {
         db.Entry(publication).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(publication));
 }
Пример #3
0
 public ActionResult Edit([Bind(Include = "IDMEDIDATIPO,Nombre")] MedidaTipo medidaTipo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(medidaTipo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(medidaTipo));
 }
Пример #4
0
 public ActionResult Edit([Bind(Include = "IDDocumentType,DocumentTypeName")] DocumentType documentType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(documentType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(documentType));
 }
Пример #5
0
 public ActionResult Edit([Bind(Include = "idSuplier,SuplierName,IdCity")] Supplier supplier)
 {
     if (ModelState.IsValid)
     {
         db.Entry(supplier).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.IdCity = new SelectList(db.Cities, "IdCity", "CityName", supplier.IdCity);
     return(View(supplier));
 }
 public ActionResult Edit([Bind(Include = "idSupplie,SupplieName,idSuplier,IDMEDIDATIPO")] Supplie supplie)
 {
     if (ModelState.IsValid)
     {
         db.Entry(supplie).State = EntityState.Modified;
         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));
 }
Пример #7
0
        public ActionResult Edit(DetailViews view)
        {
            if (ModelState.IsValid)
            {
                var pic    = view.Image;
                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.Entry(detail).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(view));
        }