Пример #1
0
 private void SetLabels()
 {
     lbl_shoppersMonth.Text   = ShopperVisit.GetShopperVistsMonth(Session["Month"].ToString(), Session["Year"].ToString());
     lbl_childrenMonth.Text   = ShopperVisit.GetChildrenServedMonth(Session["Month"].ToString(), Session["Year"].ToString());
     lbl_volunteersMonth.Text = VolunteerTimepunch.GetVolunteersMonth(Session["Month"].ToString(), Session["Year"].ToString());
     lbl_volunteerHours.Text  = VolunteerTimepunch.GetVolunteerHoursMonth(Session["Month"].ToString(), Session["Year"].ToString());
 }
Пример #2
0
        protected void btn_clockin_Click(object sender, EventArgs e)
        {
            VolunteerTimepunch vtp = new VolunteerTimepunch(txt_name.Text.Trim(), txt_phone.Text, txt_email.Text);

            VolunteerTimepunch.ClockIn(vtp);

            //TODO: Redirect to clockin confirmation page or something
            Response.Redirect("~/Default.aspx");
        }
Пример #3
0
 protected void btn_clockout_Click(object sender, EventArgs e)
 {
     if (dd_clockedin.SelectedItem != null)
     {
         VolunteerTimepunch.ClockOut(Convert.ToInt32(dd_clockedin.SelectedValue));
         Session["VolunteerToThank"] = dd_clockedin.SelectedItem.ToString();
         /*Session["VolunteerToThank"] = dd_clockedin.SelectedValue.ToString();*/ // TODO: Add thank you page
         Response.Redirect("~/Default.aspx");                                     // Will redirect to thank you page
     }
 }
Пример #4
0
 protected void btn_clockout_Click(object sender, EventArgs e)
 {
     if (dd_clockedin.SelectedItem != null)
     {
         VolunteerTimepunch.ClockOut(Convert.ToInt32(dd_clockedin.SelectedValue));
         ClockedInDataSource.Select(new DataSourceSelectArguments());
         ClockedInGridview.DataBind();
         ClockedInDataSource.DataBind();
         dd_clockedin.SelectedValue = null;
     }
 }
Пример #5
0
        private void SetLabels()
        {
            if (Session["Year"] == null || Session["Year"].Equals(""))
            {
                lbl_error.Text   = "";
                Session["Year"]  = System.DateTime.Now.Year.ToString();
                Session["Month"] = System.DateTime.Now.Month.ToString();
                Session["Day"]   = System.DateTime.Now.Day.ToString();
            }
            DateTime dateTime = new DateTime(Convert.ToInt32((string)Session["Year"]), Convert.ToInt32((string)Session["Month"]), Convert.ToInt32((string)Session["Day"]));

            lbl_datetimeVolunteer.Text   = dateTime.ToString("D");
            lbl_volunteerHoursDay.Text   = VolunteerTimepunch.GetVolunteerHoursDay(Session["Day"].ToString(), Session["Month"].ToString(), Session["Year"].ToString());
            lbl_volunteerHoursMonth.Text = VolunteerTimepunch.GetVolunteerHoursMonth(Session["Month"].ToString(), Session["Year"].ToString());
        }