Beispiel #1
0
        public bool AddCustomFee(int contractId, AirtimeBilling.Core.Entities.CustomFee customFee)
        {
            using (var db = DbFactory.GetDataContext()) {

                if (db.ContractCustomFees.SingleOrDefault(f => f.ContractId == contractId && f.CustomFeeId == customFee.Id.Value) != null)
                    return true;

                var contractCustomFee = new ContractCustomFee
                                            {
                                                ContractId = contractId,
                                                CustomFeeId = customFee.Id.Value
                                            };

                db.ContractCustomFees.InsertOnSubmit(contractCustomFee);
                db.SubmitChanges();

                return true;
            }
        }
 partial void DeleteContractCustomFee(ContractCustomFee instance);
 partial void InsertContractCustomFee(ContractCustomFee instance);
 partial void UpdateContractCustomFee(ContractCustomFee instance);
		private void detach_ContractCustomFees(ContractCustomFee entity)
		{
			this.SendPropertyChanging();
			entity.CustomFee = null;
		}