예제 #1
0
 public CityZipCheckUserTask(Shipping_data sd, string email, string phone, string Order_Id )
 {
     this.email = email;
     this.phone = phone;
     this.sd = sd;
     this.Order_Id = Order_Id;
     this.Message = "Hibás irányítószám-Város adatok";
 }
 public ShippingDataCorrection(Shipping_data sd, string phone, string email, string Order_id)
 {
     InitializeComponent();
     this.sd = sd;
     tb_Name.Text = sd.Name;
     tb_Zip.Text = sd.Zip_code.ToString();
     tb_City.Text = sd.City;
     tb_Address.Text = sd.Address;
     tb_Phone.Text = phone;
     tb_Email.Text = email;
     this.Order_id=Order_id;
 }
예제 #3
0
        void wizz_Finished(object sender, RoutedEventArgs e)
        {
            Order o = new Order();
            o.Partner_site = selectedPartner;
            o.Deal = selectedDeal;
            o.Deleted = false;
            o.Email = tb_Email.Text;
            o.Phone = tb_Phone.Text;
            o.Products_in_order = _productsInOrder;
            o.Payment_mode = selectedPayment;
            o.Shipping_mode = selectedShipping;
            o.Shipping_price = int.Parse(tb_shippingPrice.Text);
            o.Ready_to_ship = false;
            o.Ready_to_labeling = false;
            o.Need_bill = true;
            o.Last_modified = DateTime.Now;
            o.Last_modified_by = Globals.ActualUser;
            o.Created_by = Globals.ActualUser;
            o.Date = DateTime.Now;

            Billing_data bd = new Billing_data();
            bd.Address = tb_BillingAddress.Text;
            bd.City = tb_BillingCity.Text;
            bd.Name = tb_BillingName.Text;
            bd.Zip_code = int.Parse(tb_BillingPostalCode.Text);
            bd.Tax_number = "";
            bd.Id = Globals.GetId("IBD");
            o.Billing_data = bd;

            Shipping_data sd = new Shipping_data();
            sd.Address = tb_ShippingAddress.Text;
            sd.City = tb_ShippingCity.Text;
            sd.Name = tb_ShippingName.Text;
            sd.Zip_code = int.Parse(tb_ShippingPostalCode.Text);
            sd.Id = Globals.GetId("ISD");
            o.Shipping_data = sd;
            int price = 0;
            foreach (Product_in_order pio in o.Products_in_order)
                price += pio.Price * pio.Quantity_in_order;
            o.Products_price = price;
            o.All_products_available = false;
            o.All_products_selected = true;
            o.Comment = "";
            o.External_Id = "";
            o.External_payment_mode = Databases.localModel.Payment_associationSet.Where(x => x.Partner_site.Name == o.Partner_site.Name && x.Payment_mode.Name == o.Payment_mode.Name).First().External_value;
            o.External_shipping_mode = Databases.localModel.Payment_associationSet.Where(x => x.Partner_site.Name == o.Partner_site.Name && x.Payment_mode.Name == o.Payment_mode.Name).First().External_value;
            o.Id = Globals.GetId("IRO");
            o.System_order_status = Databases.localModel.System_order_statusSet.Find("Feldolgozás alatt");
            o.Priority = (string)cb_Priority.SelectedItem;
            o.Properties = "";
            o.History = "";
            o.External_dealName = "";
            o.Quantity = 1;
            Globals.AddOrder(o,Databases.localModel);
        }