VideoRentalService.SPayment.Createpayment C# (CSharp) Méthode

Createpayment() public méthode

public Createpayment ( global rental_id, global payment_id, global customer_id, global staff_id, global amount, global payment_date, global last_update, global inventory_id, global filmtitle ) : SPayment
rental_id global
payment_id global
customer_id global
staff_id global
amount global
payment_date global
last_update global
inventory_id global
filmtitle global
Résultat SPayment
        public SPayment Createpayment(global::System.Int32 rental_id, global::System.Int32 payment_id, global::System.Int32 customer_id, global::System.Byte staff_id, global::System.Decimal amount, global::System.DateTime payment_date, global::System.DateTime last_update,global::System.Int32 inventory_id, global::System.String filmtitle)
        {
            SPayment payment = new SPayment();
            payment.payment_id = payment_id;
            payment.rental_id = rental_id;
            payment.customer_id = customer_id;
            payment.staff_id = staff_id;
            payment.amount = amount;
            payment.payment_date = payment_date;
            payment.last_update = last_update;
            payment.inventory_id = inventory_id;
            payment.filmtitle = filmtitle;

            return payment;
        }

Usage Example

        public override SPayment GetPayment(int id)
        {
            SPayment spayment = new SPayment();

            using (SakilaEntities dc = new SakilaEntities())
            {
                var model = from p in dc.payments
                            where p.payment_id == id
                            //orderby (p.payment_date)
                            select p;
                List <payment> payments = model.ToList <payment>();
                spayment = spayment.Createpayment((payments[0].rental_id ?? 0), payments[0].payment_id, payments[0].customer_id,
                                                  payments[0].staff_id, payments[0].amount, payments[0].payment_date, payments[0].last_update,
                                                  payments[0].rental.inventory_id, payments[0].rental.inventory.film.title);
            }

            simulator.PerformanceSimulation();

            return(spayment);
        }
All Usage Examples Of VideoRentalService.SPayment::Createpayment