Exemplo n.º 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;
            }
        }
Exemplo n.º 2
0
 partial void DeleteContractCustomFee(ContractCustomFee instance);
Exemplo n.º 3
0
 partial void InsertContractCustomFee(ContractCustomFee instance);
Exemplo n.º 4
0
 partial void UpdateContractCustomFee(ContractCustomFee instance);
Exemplo n.º 5
0
		private void detach_ContractCustomFees(ContractCustomFee entity)
		{
			this.SendPropertyChanging();
			entity.CustomFee = null;
		}