Beispiel #1
0
 public ActionResult Edit([Bind(Include = "OperatingCompanyId,OperatingCompanyName,OperatingCompanyDetails")] OperatingCompany operatingCompany)
 {
     if (ModelState.IsValid)
     {
         service.EditOperatingCompany(operatingCompany);
         return(RedirectToAction("Index"));
     }
     return(View(operatingCompany));
 }
Beispiel #2
0
        // GET: OperatingCompanies/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OperatingCompany operatingCompany = service.GetOperatingCompanyById(id.Value);

            if (operatingCompany == null)
            {
                return(HttpNotFound());
            }
            return(View(operatingCompany));
        }
Beispiel #3
0
 public void EditOperatingCompany(OperatingCompany operatingCompany)
 {
     utOfWork.OperatingCompanyRepository.Update(operatingCompany);
     utOfWork.Commit();
 }
Beispiel #4
0
 public void CreateOperatingCompany(OperatingCompany operatingCompany)
 {
     utOfWork.OperatingCompanyRepository.Add(operatingCompany);
     utOfWork.Commit();
 }