private bool deletePhotoDocument(long documentId, IDAL dal)
        {
            try
            {
                IUniParameter prmDocId = dal.CreateParameter("DocumentId", documentId);
                Document      doc      = dal.Read <Overtech.DataModels.Document.Document>("DOC_SEL_DOCUMENT_SP", prmDocId);

                var documentOp = new DocumentOperations(dal, _resolver);
                documentOp.DeleteDocument(doc);
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        public bool DeleteZetImageDocument(long documentId)
        {
            using (IDAL dal = this.DAL)
            {
                dal.BeginTransaction();
                try
                {
                    IUniParameter prmDocId = dal.CreateParameter("DocumentId", documentId);
                    Document      doc      = dal.Read <Overtech.DataModels.Document.Document>("DOC_SEL_DOCUMENT_SP", prmDocId);

                    var documentOp = new DocumentOperations(dal, _resolver);
                    documentOp.DeleteDocument(doc);

                    dal.CommitTransaction();
                    return(true);
                }
                catch
                {
                    dal.RollbackTransaction();
                    throw;
                }
            }
        }