// GET: MailServices/Edit/5 //public ActionResult Edit(int? id) //{ // if (id == null) // { // return new HttpStatusCodeResult(HttpStatusCode.BadRequest); // } // MailService mailService = _mailServiceManager.FindById((int) id); // if (mailService == null) // { // return HttpNotFound(); // } // MailServiceViewModel mailServiceViewModel = Mapper.Map<MailServiceViewModel>(mailService); // ViewBag.RequisitionId = new SelectList(_requisitionManager.GetAllWithEmployee(), "Id", "RequisitionNumber", mailServiceViewModel.RequisitionId); // return View(mailServiceViewModel); //} // POST: MailServices/Edit/5 // To protect from overposting attacks, please enable the specific properties you want to bind to, for // more details see http://go.microsoft.com/fwlink/?LinkId=317598. //[HttpPost] //[ValidateAntiForgeryToken] //public ActionResult Edit([Bind(Include = "Id,To,From,Subject,Body,MailSendingDateTime,RequisitionId")] MailServiceViewModel mailServiceViewModel) //{ // if (ModelState.IsValid) // { // MailService mailService = Mapper.Map<MailService>(mailServiceViewModel); // _mailServiceManager.Update(mailService); // return RedirectToAction("Index"); // } // ViewBag.RequisitionId = new SelectList(_requisitionManager.GetAllWithEmployee(), "Id", "RequisitionNumber", mailServiceViewModel.RequisitionId); // return View(mailServiceViewModel); //} // GET: MailServices/Delete/5 //public ActionResult Delete(int? id) //{ // if (id == null) // { // return new HttpStatusCodeResult(HttpStatusCode.BadRequest); // } // MailService mailService = _mailServiceManager.FindById((int) id); // if (mailService == null) // { // return HttpNotFound(); // } // MailServiceViewModel mailServiceViewMode = Mapper.Map<MailServiceViewModel>(mailService); // return View(mailServiceViewMode); //} // POST: MailServices/Delete/5 //[HttpPost, ActionName("Delete")] //[ValidateAntiForgeryToken] //public ActionResult DeleteConfirmed(int id) //{ // MailService mailService = _mailServiceManager.FindById(id); // _mailServiceManager.Remove(mailService); // return RedirectToAction("Index"); //} protected override void Dispose(bool disposing) { if (disposing) { _mailServiceManager.Dispose(); _requisitionManager.Dispose(); _assignRequisitionManager.Dispose(); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { _assignRequisitionManager.Dispose(); _employeeManager.Dispose(); _requisitionManager.Dispose(); _vehicleManager.Dispose(); _vehicleTypeManager.Dispose(); _requisitionStatusManager.Dispose(); _mailServiceManager.Dispose(); _notificationManager.Dispose(); } base.Dispose(disposing); }