Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            long id = Convert.ToInt64(Request.QueryString["id"]);

            if (id == 0)
            {
                Response.Redirect("/");
            }

            if (!IsPostBack)
            {
                AdvertItem = AdvertsDataHelper.GetAdvert(id);

                if (User != null)
                {
                    WatchedDataHelper.AddWatched(User.UserId, id);
                }
                else
                {
                    if (Request.Cookies["uid"] != null)
                    {
                        string value = Request.Cookies["uid"].Value;

                        WatchedDataHelper.AddWatchedByCookies(value, id);
                    }
                }
            }

            string tempId = Page.RouteData.Values["id"] as string;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = Request.QueryString["id"];

            ExchangeItem   = DataHelper.GetExchangeItem(Convert.ToInt64(id));
            ExchangeAdvert = AdvertsDataHelper.GetAdvert(ExchangeItem.AdvertId);
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string id       = Request.QueryString["id"];
            string advertId = Request.QueryString["advertId"];

            ItemRequests = DataHelper.GetExchangeItemRequests(Convert.ToInt64(id));

            Advert = AdvertsDataHelper.GetAdvert(Convert.ToInt64(advertId));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            long id = Convert.ToInt64(Request.QueryString["id"]);

            advId = (int)id;


            ItemLikes    = DataHelper.GetItemLikes(0, advId);
            ItemDislikes = DataHelper.GetItemDisLikes(0, advId);



            if (id == 0)
            {
                Response.Redirect("/");
            }


            AdvertItem  = AdvertsDataHelper.GetAdvert(id);
            AnotherUser = DataHelper.GetUser(AdvertItem.CreatedUserId);

            if (!IsPostBack)
            {
                ViewsCount = DataHelper.GetUserViewsCount((int)id, StructsHelper.ViewedType["product"]);

                if (User != null)
                {
                    // if user didnt authorised, it will be null
                    UserViews userViews = new UserViews()
                    {
                        Date     = DateTime.Now,
                        UserId   = User.UserId,
                        Type     = StructsHelper.ViewedType["product"],
                        ObjectId = (int)id
                    };

                    DataHelper.TryAddUserView(userViews);
                }



                if (User != null)
                {
                    WatchedDataHelper.AddWatched(User.UserId, id);
                }
                else
                {
                    if (Request.Cookies["uid"] != null)
                    {
                        string value = Request.Cookies["uid"].Value;

                        WatchedDataHelper.AddWatchedByCookies(value, id);
                    }
                }
            }
        }
Beispiel #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = Request.QueryString["id"];

            itemRequest = DataHelper.GetExchangeItemRequest(Convert.ToInt64(id));

            ExchangeProducts exchangeItem = DataHelper.GetExchangeItem(itemRequest.ExchangeItemId);

            wantedExchangeItem = DataHelper.GetExchangeItem(itemRequest.WantedExchangeItemId);

            ExchangeAdvert = AdvertsDataHelper.GetAdvert(exchangeItem.AdvertId);
            WantedAdvert   = AdvertsDataHelper.GetAdvert(wantedExchangeItem.AdvertId);
        }
Beispiel #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            long id = Convert.ToInt64(Request.QueryString["id"]);

            if (id == 0)
            {
                Response.Redirect("/");
            }

            if (!IsPostBack)
            {
                AdvertItem = AdvertsDataHelper.GetAdvert(id);
            }

            string tempId = Page.RouteData.Values["id"] as string;
        }
Beispiel #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CategoryId = Request.QueryString["cat"];


            if (string.IsNullOrEmpty(CategoryId))
            {
                Response.Redirect("/Account/Category");
            }

            bool isRedacting = Request.QueryString["redact"] == null ? false : true;

            if (isRedacting)
            {
                long advId = Convert.ToInt64(Request.QueryString["advId"]);
                Advert = AdvertsDataHelper.GetAdvert(advId);
            }


            var a = 5;
            //CategoryName = CategoryHelper.GetCategoryName(CategoryId);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = Request.QueryString["id"];

            AdvertItem = AdvertsDataHelper.GetAdvert(Convert.ToInt64(id));
        }