public ActionResult Create(DocumentTypeViewModel model) { if (ModelState.IsValid) { var DocumentType = new DocumentType(); AutoMapper.Mapper.Map(model, DocumentType); DocumentType.IsDeleted = false; DocumentType.CreatedUserId = WebSecurity.CurrentUserId; DocumentType.ModifiedUserId = WebSecurity.CurrentUserId; DocumentType.AssignedUserId = WebSecurity.CurrentUserId; DocumentType.CreatedDate = DateTime.Now; DocumentType.ModifiedDate = DateTime.Now; DocumentTypeRepository.InsertDocumentType(DocumentType); TempData[Globals.SuccessMessageKey] = App_GlobalResources.Wording.InsertSuccess; return(RedirectToAction("Index")); } return(View(model)); }
public DocumentType InsertDocumentType(DocumentType entity) { return(_iDocumentTypeRepository.InsertDocumentType(entity)); }