예제 #1
0
 public ActionResult Edit([Bind(Include = "ID,Email_ApplcationType,Pin,GrossYearlyDebitSalesVolume,AverageTicket,HighestTicketAmount,PinDebitVolumeDiscount,PinDebitTrans,AmountofSurcharge,EBTVolumeDiscount,EBTTransFee,MonthlyComplianceFee,MonthlyStatementFee,MonthlyMinimum,ChargeBack,dbaName,legalName,legalAddress,LocstreetAddress,corporatePhone,merchantEmail,merchantname_taxreturn,federalTaxID,merchantwebsite,corporateFax,dbaPhone,dbaFax,warrantyName,warrantyAddress,streetAddress2")] Merchant merchant)
 {
     if (ModelState.IsValid)
     {
         db.Entry(merchant).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(merchant));
 }
        public IHttpActionResult PutPagelet(string id, Pagelet pagelet)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != pagelet.id)
            {
                return(BadRequest());
            }

            db.Entry(pagelet).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!PageletExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }