Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["user"] != null)
     {
         myDAL  objmyDAl = new myDAL();
         String userId   = Session["user"].ToString();
         int    result   = 0;
         int    found    = 1;
         found = objmyDAl.getEventCount_DAL(userId, ref result);
         if (found != 1)
         {
             //execption
         }
         else
         {
             if (result > 0)
             {
                 notificcationBadge.Text = result.ToString();
             }
             else
             {
                 NumOfEvents.Text = "No event near you";
             }
             DataTable dt = new DataTable();
             found = objmyDAl.findNearbyEvent_DAL(userId, ref dt);
             if (found == 1)
             {
                 Notify.DataSource = dt;
                 Notify.DataBind();
             }
         }
     }
     if (Session["user"] != null)
     {
         myDAL     objmyDal1 = new myDAL();
         String    user      = Session["user"].ToString();
         int       f         = 1;
         DataTable DT        = new DataTable();
         f = objmyDal1.ShopingCart_DAL(user, ref DT);
         if (f == 1)
         {
             list.DataSource = DT;
             list.DataBind();
         }
     }
 }