public List<DocumentInfoEntity> GetDocumentInfoEntity(string docCode, object documentStatus, int day) { DocumentGateway documentGateway = new DocumentGateway(); return documentGateway.GetDocumentInfoEntity(docCode, documentStatus, day); }
/// <summary> /// Saves or updates the entities having reference to <see cref="IDocumentEntity"/> interface. /// </summary> /// <param name="iDocumentEntity"><see cref="IDocumentEntity"/> interface</param> /// <param name="isCopy">If set to <c>true</c> SaveOrUpdateCopy will be used, else SaveOrUpdate.</param> public void SaveOrUpdateDocumentEntity(IDocumentEntity iDocumentEntity, bool isCopy) { try { DocumentGateway documentGateway = new DocumentGateway(); if (iDocumentEntity.GetType().Equals(typeof(DocumentInfoEntity))) { documentGateway.SaveOrUpdateDocumentInfoSP(iDocumentEntity); } else if (isCopy) documentGateway.SaveOrUpdateInMemoryEntity<IDocument>(AllInOne.Legal.DataMapper.BackEnd.DomainToNHibernate.ObjectMapper.DocumentMapper.GetDocumentEntity<IDocumentEntity>(iDocumentEntity)); else documentGateway.SaveOrUpdateEntity<IDocument>(AllInOne.Legal.DataMapper.BackEnd.DomainToNHibernate.ObjectMapper.DocumentMapper.GetDocumentEntity<IDocumentEntity>(iDocumentEntity)); } catch (Exception ex) { Logger.Error("Error at SaveOrUpdateDocumentEntity", ex); Logger.Error("Error in SaveOrUpdateDocumentEntity: Message - " + ex.Message + " StackTrace - " + ex.StackTrace); throw; } }