Esempio n. 1
0
		private void CreateEmptyDataSet(BEShippingCosts costs)
		{
			BPShippingMethods bp = new BPShippingMethods();
			DSShippingMethods = bp.SelectAllActive();
			foreach (BEShipping.tbl_ShippingMethodsRow methods in DSShippingMethods.tbl_ShippingMethods)
			{
				for (int j=1; j<=5; j++)
				{
					BEShippingCosts.tbl_ShippingCostsRow dr;
					dr = costs.tbl_ShippingCosts.Newtbl_ShippingCostsRow();
					dr.ShippingMethodID = methods.ShippingMethodID;
					dr.ShippingRegionID = j;
					dr.ShippingCostActive = true;
					dr.ShippingCost = 0;
					dr.DateCreated = DateTime.Now;
					dr.DateModified = DateTime.Now;
					dr.ModifiedByAdminID = Convert.ToInt32(CarrielUser.CarrielIdentity.MemberID);
					costs.tbl_ShippingCosts.Addtbl_ShippingCostsRow(dr);
				}
			}
			dlShippingCosts.DataSource = costs;
			dlShippingCosts.DataMember = "tbl_ShippingCosts";
			dlShippingCosts.DataBind();
		}
Esempio n. 2
0
		private void GetOrderInfo()
		{
			BPOrders bpCat = new BPOrders();
			BEOrders ds = bpCat.SelectOrdersByID(OrderID);
			BEOrders.tbl_OrdersRow order = ds.tbl_Orders.FindByOrderID(OrderID);
	
			lblTitle.Text = "View Order - " + order.OrderID + " - " + order.CustomerLastName + ", " + order.CustomerFirstName;
	
			lblOrderID.Text = order.OrderID.ToString();
			lblOrderDate.Text = order.OrderDate.ToString();

			lblCustomerFirstName.Text = order.CustomerFirstName;
			lblCustomerLastName.Text = order.CustomerLastName;
	
			if (!order.IsCustomerEmailNull())
			{
				lblCustomerEmail.Text = order.CustomerEmail;
			}

			BPShippingMethods bp = new BPShippingMethods();
			BEShipping.tbl_ShippingMethodsRow shipMethod = bp.SelectShippingMethodsByID(order.ShippingMethodID).tbl_ShippingMethods[0]; 

			lblShippingMethod.Text = shipMethod.ShippingMethodName;

			if (order.OrderApproved == true)
			{
				imgApproved.Visible = true;
				imgNotApproved.Visible = false;
			}else
			{
				imgApproved.Visible = false;
				imgNotApproved.Visible = true;
			}

			//Billing address info
			lblBillingFirstName.Text = order.BillingFirstName;
			lblBillingLastName.Text = order.BillingLastName;
			lblBillingLine1.Text = order.BillingLine1;
			if (!order.IsBillingLine2Null())
			{
				lblBillingLine2.Text = order.BillingLine2;
			}
			if (!order.IsBillingEmailNull())
			{
				lblBillingEmail.Text = order.BillingEmail;
			}
			lblBillingPhone.Text = order.BillingPhone;
			lblBillingCity.Text = order.BillingCity;

			lblBillingProvinceName.Text = order.BillingProvinceName;
			lblBillingCountryName.Text = order.BillingCountryName;
			lblBillingPostalCode.Text = order.BillingPostalCode;

			//shipping address info
			lblShippingFirstName.Text = order.ShippingFirstName;
			lblShippingLastName.Text = order.ShippingLastName;
			lblShippingLine1.Text = order.ShippingLine1;
			if (!order.IsShippingLine2Null())
			{
				lblShippingLine2.Text = order.ShippingLine2;
			}
			if (!order.IsShippingEmailNull())
			{
				lblShippingEmail.Text = order.ShippingEmail;
			}
			lblShippingPhone.Text = order.ShippingPhone;
			lblShippingCity.Text = order.ShippingCity;

			lblShippingProvinceName.Text = order.ShippingProvinceName;
			lblShippingCountryName.Text = order.ShippingCountryName;
			lblShippingPostalCode.Text = order.ShippingPostalCode;

			//Order Details
			DSOrders = bpCat.SelectOrderDetailsByOrderID(OrderID);
			rptOrderList.DataBind();

		}
Esempio n. 3
0
		public decimal GetShippingCost(int ShippingMethodID, int ShippingRegionID)
		{
			BPShippingMethods bp = new BPShippingMethods();
			DSShippingMethods = bp.SelectByShippingRegionIDAndShippingMethodID(ShippingRegionID, ShippingMethodID);
			if (DSShippingMethods.tbl_ShippingMethods.Count > 0)
			{
				return DSShippingMethods.tbl_ShippingMethods[0].ShippingCost;
			}else
			{
				return 0;
			}
		}
Esempio n. 4
0
		private void CreateCheckBoxes()
		{
			BEProducts products = new BEProducts();

			BPShippingMethods bp = new BPShippingMethods();
			DSShippingMethods = bp.SelectAllActive();
			foreach (BEShipping.tbl_ShippingMethodsRow methods in DSShippingMethods.tbl_ShippingMethods)
			{
				for (int j=1; j<=5; j++)
				{
					BEProducts.tbl_ProductShippingMethodsRow dr;
					dr = products.tbl_ProductShippingMethods.Newtbl_ProductShippingMethodsRow();
					dr.ProductID=ProductID;
					dr.ShippingMethodID = methods.ShippingMethodID;
					dr.ShippingRegionID = j;
					dr.ProductShippingMethodActive = true;
					products.tbl_ProductShippingMethods.Addtbl_ProductShippingMethodsRow(dr);
				}
			}
			dlCheckBoxes.DataSource = products;
			dlCheckBoxes.DataMember = "tbl_ProductShippingMethods";
			dlCheckBoxes.DataBind();
		}