Ejemplo n.º 1
0
 internal void LoadOrder()
 {
     try {
         this.order = new Cart().GetByPayment(Convert.ToInt32(this.orderID));
     } catch {
         this.order = null;
     }
 }
Ejemplo n.º 2
0
 internal void LoadOrder() {
     try {
         Settings settings = new Settings();
         string EDIPOPreface = settings.Get("EDIPOPreface");
         string oid = this.orderID;
         if (EDIPOPreface != "") {
             oid = oid.Replace(EDIPOPreface, "");
         }
         this.order = new Cart().GetByPayment(Convert.ToInt32(oid));
     } catch {
         this.order = null;
     }
 }
		private void detach_Carts(Cart entity)
		{
			this.SendPropertyChanging();
			entity.Payment = null;
		}
 partial void DeleteCart(Cart instance);
		private void attach_Carts(Cart entity)
		{
			this.SendPropertyChanging();
			entity.Payment = this;
		}
 partial void UpdateCart(Cart instance);
 partial void InsertCart(Cart instance);
		private void detach_Carts(Cart entity)
		{
			this.SendPropertyChanging();
			entity.Customer = null;
		}
		private void attach_Carts(Cart entity)
		{
			this.SendPropertyChanging();
			entity.Customer = this;
		}
Ejemplo n.º 10
0
 public Cart Save(int cust_id = 0)
 {
     EcommercePlatformDataContext db = new EcommercePlatformDataContext();
     try {
         Customer cust = db.Customers.Where(x => x.ID == cust_id).First<Customer>();
         Cart c = new Cart {
             cust_id = cust_id,
             date_created = DateTime.Now,
             ship_to = cust.shippingID,
             bill_to = cust.billingID,
             shipping_price = 0
         };
         db.Carts.InsertOnSubmit(c);
         db.SubmitChanges();
         return c;
     } catch { };
     return this;
 }