コード例 #1
0
        public ActionResult Create([Bind(Include = "Id,CaseRef,PlatformRef,Address,Postcode,EstimatedVal,LoanAmount,OriginalLTV,PropertyType,PropertyStyle,Beds,Tenure,AppointmentDate,StatusId,SurveyorFK")] DesktopCases desktopCases)
        {
            if (ModelState.IsValid)
            {
                db.DesktopCases.Add(desktopCases);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(desktopCases));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "Id,CaseRef,PlatformRef,Address,Postcode,EstimatedVal,LoanAmount,OriginalLTV,PropertyType,PropertyStyle,Beds,Tenure,AppointmentDate,StatusId,SurveyorFK,CalculatedVal,SurveyorValuation,NewLTV,ComparablesLink")] DesktopCases desktopCases)
 {
     if (ModelState.IsValid)
     {
         db.Entry(desktopCases).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(desktopCases));
 }