コード例 #1
0
        private void Control_Init()
        {
            ProductVariantMgr myProductVariantMgr = new ProductVariantMgr();

            List <Variant> myVariants = myProductVariantMgr.Get_Product_Variants();

            DataList_VariantList.DataSource = myVariants;
            DataList_VariantList.DataBind();


            if (DataEval.IsEmptyQuery(_product_variantid))
            {
                _product_variantid             = myVariants[0].Product_VariantID;
                ViewState["Product_VariantID"] = _product_variantid;
            }

            ProductAttributeMgr myProductAttributeMgr = new ProductAttributeMgr();

            GridView_Attributes.DataSource = myProductAttributeMgr.Get_Product_Attribute_Types(_product_variantid);
            GridView_Attributes.DataBind();

            lbl_Variant.Text = myProductVariantMgr.Get_Product_Variant(_product_variantid).Variant_Name;

            MultiView_Attribute.SetActiveView(View_VariantList);
        }
コード例 #2
0
        protected void lbtn_Variant_Select_Command(object sender, CommandEventArgs e)
        {
            if (!DataEval.IsEmptyQuery(e.CommandArgument.ToString()))
            {
                _product_variantid             = e.CommandArgument.ToString();
                ViewState["Product_VariantID"] = _product_variantid;

                ProductVariantMgr   myProductVariantMgr   = new ProductVariantMgr();
                ProductAttributeMgr myProductAttributeMgr = new ProductAttributeMgr();

                lbl_Variant.Text = myProductVariantMgr.Get_Product_Variant(_product_variantid).Variant_Name;

                GridView_Attributes.DataSource = myProductAttributeMgr.Get_Product_Attribute_Types(_product_variantid);
                GridView_Attributes.DataBind();
            }
        }