Example #1
0
        public void SetUp()
        {
            _call = new Call();
            _call.Contract = new Contract();
            _call.Contract.Plan = new Plan()
                                      {
                                          Tariffs = new EntitySet<Tariff>(),
                                          Flagfall = 0M,
                                          FreeCallAmount = 0M,
                                          UnitOfTime = 20
                                      };

            Tariff tariff = new Tariff();
            tariff.Calls.Add(_call);
            tariff.PlanId = _call.Contract.Plan.PlanId;
            tariff.Plan = _call.Contract.Plan;
            tariff.UnitCost = 1.20M;

            _call.Contract.Plan.Tariffs.Add(tariff);
            _call.Tariff = tariff;
            _call.VolumeUnit = 1;  // Voice Call
        }
 partial void DeleteTariff(Tariff instance);
 partial void UpdateTariff(Tariff instance);
 partial void InsertTariff(Tariff instance);
		private void detach_Tariffs(Tariff entity)
		{
			this.SendPropertyChanging();
			entity.NetworkTariff = null;
		}
		private void attach_Tariffs(Tariff entity)
		{
			this.SendPropertyChanging();
			entity.NetworkTariff = this;
		}