Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["selectedID"] != null)
            {
                int selectedID = (int)Session["selectedID"];

                goods = new Goods();
                GoodsActions goodsActions = new GoodsActions();
                goods = goodsActions.FindSelectedGoods(selectedID);
                DataSourceAdapterBinding dataSourceAdapterBinding = new DataSourceAdapterBinding();
                GoodsPreview1.DataSource = dataSourceAdapterBinding.AdapterFill(goods);
            }
        }
Example #2
0
        protected void Page_Init(object sender, EventArgs e)
        {
            if (Session["SelectedGoodsID"] != null)
            {
                selectedGoodsID = int.Parse(Session["SelectedGoodsID"].ToString());
                GoodsEditControl1.GoodsID = selectedGoodsID;

                GoodsActions goodsActions = new GoodsActions();
                var goods = goodsActions.FindSelectedGoods(selectedGoodsID);

                DataSourceAdapterBinding dataSourceAdapterBinding = new DataSourceAdapterBinding();
                GoodsPreviewControl1.DataSource = dataSourceAdapterBinding.AdapterFill(goods);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                GoodsActions goodsActions = new GoodsActions();
                var goods = goodsActions.FindSelectedGoods(goodsID);
                TextBoxName.Text = goods.Name;
                TextBoxPrice.Text = goods.Price.ToString();
                TextBoxDiscount.Text = goods.Discount.ToString();
                CheckBox1.Checked = goods.IsDiscount;

                if (CheckBox1.Checked)
                {
                    TextBoxDiscount.Enabled = true;
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            TreeViewControl1.SelectedNodeChanged += new TestWork_Nix.Categoties.Controls.TreeViewCategoriesControl.TreeViewManageEventHandler(TreeViewControl1_SelectedNodeChanged);

            if (Session["SelectedGoodsID"] != null)
            {
                SelectedGoodsID = int.Parse(Session["SelectedGoodsID"].ToString());
                
                if (!Page.IsPostBack)
	            {
                    categoriesGoodsList = new List<Categories>();
                    RelationsCategoriesGoodsActions R_C_G_Actions = new RelationsCategoriesGoodsActions();
                    categoriesGoodsList = R_C_G_Actions.GetCategoriesForGoods(SelectedGoodsID);
                    ViewState["categoriesGoodsList"] = categoriesGoodsList;
                    RepeaterGoodsCategories.DataSource = categoriesGoodsList;
                    RepeaterGoodsCategories.DataBind();
                    GoodsActions goodsActions = new GoodsActions();		 
	                Label1.Text = "Manage categories for " + (goodsActions
                        .FindSelectedGoods(SelectedGoodsID)).Name + ":";
                }
            }
        }