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 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();
		}