Exemplo n.º 1
0
        public int InsertContractPlanVariance(AirtimeBilling.Core.Entities.Contract contract, AirtimeBilling.Core.Entities.Plan newPlan, DateTime startDate, DateTime endDate, 
            string user, decimal cost)
        {
            using (var db = DbFactory.GetDataContext())
            {
                var variance = new ContractPlanVariance
                {
                    CreatedOn = DateTime.Now,
                    Username = user,
                    StartDate = startDate,
                    EndDate = endDate,
                    Cost = cost,
                    PlanId = newPlan.Id.Value,
                    ContractId = contract.Id.Value
                };

                db.ContractPlanVariances.InsertOnSubmit(variance);
                db.SubmitChanges();
                return variance.ContractPlanVarianceId;
            }
        }
Exemplo n.º 2
0
 partial void DeleteContractPlanVariance(ContractPlanVariance instance);
Exemplo n.º 3
0
 partial void UpdateContractPlanVariance(ContractPlanVariance instance);
Exemplo n.º 4
0
 partial void InsertContractPlanVariance(ContractPlanVariance instance);
Exemplo n.º 5
0
		private void detach_ContractPlanVariances(ContractPlanVariance entity)
		{
			this.SendPropertyChanging();
			entity.Plan = null;
		}
Exemplo n.º 6
0
		private void attach_ContractPlanVariances(ContractPlanVariance entity)
		{
			this.SendPropertyChanging();
			entity.Contract = this;
		}