public void Delete(FeeView feeView) { using (var repo = new FeeRepository()) { var bo = new Fee(); bo = repo.GetById(feeView.FeeId); repo.Delete(bo); } }
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; ; }
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); } }