Пример #1
0
        //
        // 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));
        }
Пример #2
0
        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));
        }
Пример #3
0
        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 }));
        }
Пример #4
0
        //
        // 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));
        }