Ejemplo n.º 1
0
        private void AddPayment_Click(object sender, RoutedEventArgs e)
        {
            PaymentStatus p = new PaymentStatus();

            if (p.ShowDialog().Value)
            {
               PaymentInfo objPaymentToEdit1 = new PaymentInfo();
                objPaymentToEdit1.UserID = userId;
                objPaymentToEdit1.PaymentMethod = p.tickPay.Text;
                objPaymentToEdit1.PurchaseDate = DateTime.Parse(p.tickPur.Text);

                infoContext.PaymentInfoes.AddObject(objPaymentToEdit1);
                saveMeToDataBase();
                fetchUserData(infoContext);

            }
        }
 /// <summary>
 /// Create a new PaymentInfo object.
 /// </summary>
 /// <param name="ticketNumber">Initial value of the TicketNumber property.</param>
 public static PaymentInfo CreatePaymentInfo(global::System.Int32 ticketNumber)
 {
     PaymentInfo paymentInfo = new PaymentInfo();
     paymentInfo.TicketNumber = ticketNumber;
     return paymentInfo;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the PaymentInfoes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPaymentInfoes(PaymentInfo paymentInfo)
 {
     base.AddObject("PaymentInfoes", paymentInfo);
 }