Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["role"] != null)
     {
         role = Session["role"].ToString();
         if (role == "Incharge" || role == "Teacher")
         {
             adminNo = null;
         }
         else if (role == "1" || role == "2" || role == "3")
         {
             adminNo = Session["AdminNo"].ToString();
         }
     }
     if (!IsPostBack)
     {
         tripType = Request.QueryString["tripType"];
         tripObj  = tripDao.getTrip(tripType);
         count    = tripDao.count;
         listId   = tripDao.getSignedUpTrip(adminNo);
         foreach (var i in listId)
         {
             System.Diagnostics.Debug.Write(i + "_");
         }
         List <String> countryList = tripDao.getCountry();
         ddlAddLocation.DataSource = countryList;
         ddlAddLocation.DataBind();
         ddlAddLocation.Items.Insert(0, new ListItem("--Select--", "-1"));
         if (role == "")
         {
             System.Diagnostics.Debug.WriteLine("its empty");
         }
         else if (role == null)
         {
             System.Diagnostics.Debug.WriteLine("its null");
         }
         else
         {
             System.Diagnostics.Debug.WriteLine(role);
         }
     }
 }