Exemplo n.º 1
0
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     if (Request["id"] != null)
     {
         CurrentLead = Lead.Get(Request["id"].Trim());
         CurrentLeadInfo = CurrentLead.GetInfo();
     }
 }
Exemplo n.º 2
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            if (Request.PathInfo.Split('/').Length != 2)
            {
                Response.Redirect("/MarketingService/allCategories.aspx");
                Response.End();
            }

            guid = Request.PathInfo.Split('/')[1].Trim();

            if (guid.Length != 32)
            {
                Response.Redirect("/MarketingService/allCategories.aspx");
                Response.End();
            }

            CurrentLead = Lead.Get(guid);
            if (CurrentLead == null)
            {
                Response.Redirect("/MarketingService/allCategories.aspx");
                Response.End();
            }

            CurrentLeadInfo = CurrentLead.GetInfo();
            if (CurrentLeadInfo == null)
            {
                Response.Redirect("/MarketingService/allCategories.aspx");
                Response.End();
            }

            CurrentBuyer = Buyer.Get(CurrentLead.BuyerId);
            if (CurrentBuyer == null)
            {
                Response.Redirect("/MarketingService/allCategories.aspx");
                Response.End();
            }
        }