Пример #1
0
 public void Delete(FeeView feeView)
 {
     using (var repo = new FeeRepository())
     {
         var bo = new Fee();
         bo = repo.GetById(feeView.FeeId);
         repo.Delete(bo);
     }
 }
Пример #2
0
        public double CalTot()
        {
            double t = 0;
            using (var repo = new FeeRepository())
            {
                FeeView feeView = new FeeView();
                var op = new Fee();
                op = repo.GetById(1);
                if (true)
                {
                    t = (op.Price) + ((op.Price) * (op.Vat / 100));
                }

            }
            return t;
            ;
        }
Пример #3
0
        public void Update(FeeView feeView)
        {
            using (var repo = new FeeRepository())
            {
                var op = new Fee();
                op = repo.GetById(feeView.FeeId);
                if (true)
                {

                    op.Price = feeView.Price;
                    op.Vat = feeView.Vat;
                    op.Description = feeView.Description;
                }
                repo.Update(op);
            }
        }