Exemplo n.º 1
0
        public ReceiptInfoModel Get(string id)
        {
            var result = ReceiptInfoRepository.Get(id);

            return(new ReceiptInfoModel
            {
                Id = result.Id,
                Title = result.Title,
                Tax = result.Tax
            });
        }
Exemplo n.º 2
0
 public void Save(ReceiptInfoEntity entity)
 {
     if (string.IsNullOrEmpty(entity.Id))
     {
         entity.Id = Guid.NewGuid().ToString();
         ReceiptInfoRepository.Add(entity);
     }
     else
     {
         ReceiptInfoRepository.Update(entity);
     }
 }
Exemplo n.º 3
0
        public IList <ReceiptInfoModel> GetByHospital(string hospitalId)
        {
            var result = ReceiptInfoRepository.GetByHospital(hospitalId);

            var list = new List <ReceiptInfoModel>();

            foreach (var item in result)
            {
                list.Add(new ReceiptInfoModel
                {
                    Id         = item.Id,
                    HospitalId = item.HospitalId,
                    Title      = item.Title,
                    Tax        = item.Tax
                });
            }

            return(list);
        }