Esempio n. 1
0
        protected void ddlTeacher_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (Session["volunteer"] != null)
            {
                ClsVolunteer objVolunteer = Session["volunteer"] as ClsVolunteer;
                //string name = Session["Name"].ToString();
                //name = objVolunteer.EmailAddress;
                //  Label8.Text = objVolunteer.Name;
            }
            string comments = objBusiness.getTeacherComments(ddlTeacher.SelectedValue.ToString());

            lblComments.Text = "Your teacher prefers " + comments;
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["volunteer"] != null)
                {
                    ClsVolunteer objVolunteer = Session["volunteer"] as ClsVolunteer;
                    //string name = Session["Name"].ToString();
                    //name = objVolunteer.EmailAddress;
                    //  Label8.Text = objVolunteer.Name;

                    txtName.Text = objVolunteer.Name;
                }
                populateTimelist();

                string volunteerId = Session["ID"].ToString();

                populateAssistantList(volunteerId);
            }
        }
Esempio n. 3
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            objVolunteer = new ClsVolunteer();
            if (objBusiness.validatePassword(txtUserName.Text, txtPassword.Text))
            {
                DataSet volunteerSet = objBusiness.loadUser(txtUserName.Text);

                Label2.Text               = "login successfull";
                objVolunteer.Name         = volunteerSet.Tables[0].Rows[0]["Name"].ToString();
                objVolunteer.Id           = volunteerSet.Tables[0].Rows[0]["id"].ToString();
                objVolunteer.EmailAddress = volunteerSet.Tables[0].Rows[0]["email"].ToString();
                string nam = objVolunteer.Name;

                Session["volunteer"] = objVolunteer;
                Session["ID"]        = objVolunteer.Id.ToString();
                Page.Response.Redirect("~/Scheduler.aspx", false);
            }
            else
            {
                Label2.Text = "Incorrect username and password";
            }
        }