public bool Delete(PaperReferenceDto dto)
 {
     try
     {
         var retVal = this.dal.Delete(dto.Id);
         return(retVal);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public PaperReferenceDto Save(PaperReferenceDto dto)
        {
            try
            {
                var retVal = this.dal.GetByName(dto.Name).ToBasic <DataAccess.Models.PaperReference, PaperReferenceDto>();

                if (retVal != null)
                {
                    retVal = this.dal.Save(retVal.Id, retVal.Name).ToBasic <DataAccess.Models.PaperReference, PaperReferenceDto>();
                }
                else
                {
                    retVal = this.dal.Create(dto.Name).ToBasic <DataAccess.Models.PaperReference, PaperReferenceDto>();
                }

                return(retVal);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #3
0
 public PaperReferenceDto SavePaperReference(PaperReferenceDto dto)
 {
     return(new PaperReferenceLogic().Save(dto));
 }
Beispiel #4
0
 public bool DeletePaperReference(PaperReferenceDto dto)
 {
     return(new PaperReferenceLogic().Delete(dto));
 }
Beispiel #5
0
 public PaperReferenceDto CreatePaperReference(PaperReferenceDto dto)
 {
     return(new PaperReferenceLogic().Create(dto));
 }