// // GET: /Site/Edit/5 public ActionResult Edit(int id) { SiteMonitoring e = repo.Get(id); ContractDetailRepository cdrepo = new ContractDetailRepository(); ContractDetail cd = cdrepo.Get(e.ContractDetailID.ToInt()); e.Site = cd.Site; return(View(e)); }
public static MvcHtmlString DropDownListForSiteMonitoringOrder <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, SiteMonitoring siteMonitoring) { SiteMonitoringRepository repo = new SiteMonitoringRepository(); return(htmlHelper.DropDownListFor(expression, repo.FilterOrder(siteMonitoring), OAMSSetting.messageL.SelectNone)); }
public ActionResult Edit(int id, FormCollection collection, IEnumerable <HttpPostedFileBase> files, List <int> DeletePhotoList, SiteMonitoring siteMonitoring, IEnumerable <HttpPostedFileBase> filesOfFixed, string[] noteList, string[] noteOfFixedList) { SiteMonitoring e = repo.Update(id, UpdateModel, files, DeletePhotoList, filesOfFixed, noteList, noteOfFixedList); return(RedirectToAction("Edit", "Contract", new { id = e.ContractDetail.ContractID })); }
// // GET: /Site/Details/5 //public ActionResult Details(int id) //{ // return View(); //} // // GET: /Site/Create public ActionResult Create(int?contractDetailID) { SiteMonitoring e = repo.InitWithDefaultValue(contractDetailID); return(View(e)); }