Example #1
0
        public void Add(TreatmentRatioTotalView model)
        {
            using (var ratio = new TreatmentRatioTotalRepository())
            {
                List <TreatmentRatio> total = _ratio.GetAll().ToList().FindAll(x => x.Tid == model.Tid);

                var treat = new TreatmentRatioTotal
                {
                    TreatmentRatioTotalId = model.TreatmentRatioTotalId,
                    Price = total.Sum(x => x.TreatPrice),
                    Tid   = model.Tid
                };
                ratio.Insert(treat);
            }
        }
Example #2
0
 public void Delete(TreatmentRatioTotal model)
 {
     _treatmentratioRepository.Delete(model);
 }
Example #3
0
 public void Update(TreatmentRatioTotal model)
 {
     _treatmentratioRepository.Update(model);
 }
Example #4
0
 public void Insert(TreatmentRatioTotal model)
 {
     _treatmentratioRepository.Insert(model);
 }