Beispiel #1
0
        public invoiceService addService(int serviceID, decimal amount)
        {
            using (var ctx = new AccContexts())
            {
                var newInvoiceService = new AccountingLib.Models.invoiceService()
                {
                    invoiceID  = this.invoiceID,
                    serviceID  = serviceID,
                    currencyID = this.currencyID,
                    amount     = amount
                };
                ctx.invoiceService.AddObject(newInvoiceService);
                ctx.SaveChanges();

                return(newInvoiceService);
            }
        }
Beispiel #2
0
        public invoiceService addService(int serviceID,decimal amount)
        {
            using (var ctx = new AccContexts())
            {
                var newInvoiceService= new AccountingLib.Models.invoiceService()
                {
                    invoiceID=this.invoiceID,
                    serviceID=serviceID,
                    currencyID=this.currencyID,
                    amount=amount
                };
                ctx.invoiceService.AddObject(newInvoiceService);
                ctx.SaveChanges();

                return newInvoiceService;
            }
        }
 /// <summary>
 /// Create a new invoiceService object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 public static invoiceService CreateinvoiceService(global::System.Int32 id)
 {
     invoiceService invoiceService = new invoiceService();
     invoiceService.ID = id;
     return invoiceService;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the invoiceService EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToinvoiceService(invoiceService invoiceService)
 {
     base.AddObject("invoiceService", invoiceService);
 }