protected void btnReport_Click(object sender, EventArgs e) { if (!ValidateInputData()) { return; } ReportParamCampersFJC param = new ReportParamCampersFJC() { CampYearID = Int32.Parse(ddlCampYear.SelectedValue), CampYear = Int32.Parse(ddlCampYear.SelectedItem.Text), ProgramTypeID = (ProgramType)Int32.Parse(ddlProgram.SelectedValue), FedID = -1, /* flag value*/ CamperOrg = CamperOrgType.EnrollmentConfirmationFJC }; foreach (ListItem li in chklistCamp.Items) { if (li.Selected) { param.Camp_Dict[Int32.Parse(li.Value)] = li.Text; } } foreach (ListItem li in chklistStatus.Items) { if (li.Selected) { param.Status_Dict[Int32.Parse(li.Value)] = li.Text; } } param.BuildStrings(); Session.Add("ReportParamCampersFJC", param); Response.Redirect("ReportFJCCampers.aspx"); }
protected void btnReport_Click(object sender, EventArgs e) { bool e_flag = true; foreach (ListItem li in chklistCamp.Items) { if (li.Selected) { e_flag = false; } } if (e_flag) { lblMsg.Text = "You must select at least one camp"; return; } e_flag = true; foreach (ListItem li in chklistStatus.Items) { if (li.Selected) { e_flag = false; } } if (e_flag) { lblMsg.Text = "You must select at least one status"; return; } ReportParamCampersFJC param = new ReportParamCampersFJC() { CampYearID = Int32.Parse(ddlCampYear.SelectedValue), ProgramTypeID = ProgramType.NoUse, CampYear = Int32.Parse(ddlCampYear.SelectedItem.Text), CamperOrg = CamperOrgType.EnrollmentConfirmationPartner }; if (UserRole == Role.CampDirector) { param.FedID = -1; // for camp director, Fed are JWest Federations only } else { param.FedID = Int32.Parse(ddlFed.SelectedValue); } foreach (ListItem li in chklistCamp.Items) { if (li.Selected) { param.Camp_Dict[Int32.Parse(li.Value)] = li.Text; } } foreach (ListItem li in chklistStatus.Items) { if (li.Selected) { param.Status_Dict[Int32.Parse(li.Value)] = li.Text; } } param.BuildStrings(); Session.Add("ReportParamCampersFJC", param); Response.Redirect("ReportFJCCAmpers.aspx"); }
protected void btnReport_Click(object sender, EventArgs e) { if (!ValidateInputData()) { return; } var param = new ReportParamCampersFJC() { CampYearID = Int32.Parse(ddlCampYear.SelectedValue), CampYear = Int32.Parse(ddlCampYear.SelectedItem.Text), FedID = -1, /* flag value*/ CamperOrg = CamperOrgType.CamperDetailReport }; foreach (ListItem li in chklistFed.Items) { if (li.Selected) { param.Fed_Dict[Int32.Parse(li.Value)] = li.Text; } } foreach (ListItem li in chklistCamp.Items) { if (li.Selected) { param.Camp_Dict[Int32.Parse(li.Value)] = li.Text; } } foreach (ListItem li in chklistStatus.Items) { if (li.Selected) { param.Status_Dict[Int32.Parse(li.Value)] = li.Text; } } param.BuildStrings(); int timesReceivedGrant = 0; if (chk1stTimers.Checked) { timesReceivedGrant += 2; } if (chk2ndTimers.Checked) { timesReceivedGrant += 4; } if (chk3rdTimers.Checked) { timesReceivedGrant += 8; } param.TimesReceivedGrant = timesReceivedGrant; Session.Add("ReportParamCampersFJC", param); Response.Redirect("ReportFJCCampers.aspx"); }
protected void btnReport_Click(object sender, EventArgs e) { bool e_flag = true; foreach (ListItem li in chklistSynag.Items) { if (li.Selected) { e_flag = false; } } if (e_flag) { lblMsg.Text = "You must select at least one synagogue"; return; } e_flag = true; foreach (ListItem li in chklistStatus.Items) { if (li.Selected) { e_flag = false; } } if (e_flag) { lblMsg.Text = "You must select at least one status"; return; } ReportParamCampersFJC param = new ReportParamCampersFJC() { CampYearID = Int32.Parse(ddlCampYear.SelectedValue), CampYear = Int32.Parse(ddlCampYear.SelectedItem.Text), ProgramTypeID = (ProgramType)(-1), FedID = Int32.Parse(ddlFed.SelectedValue), CamperOrg = CamperOrgType.Synagogue }; foreach (ListItem li in chklistSynag.Items) { if (li.Selected) { param.Camp_Dict[Int32.Parse(li.Value)] = li.Text; } } foreach (ListItem li in chklistStatus.Items) { if (li.Selected) { param.Status_Dict[Int32.Parse(li.Value)] = li.Text; } } param.BuildStrings(); Session.Add("ReportParamCampersFJC", param); Response.Redirect("ReportFJCCAmpers.aspx"); }
protected void btnReport_Click(object sender, EventArgs e) { bool e_flag = true; foreach (ListItem li in chklistFed.Items) { if (li.Selected) { e_flag = false; break; } } if (e_flag && UserRole != Role.CampDirector) { lblMsg.Text = "You must select at least one federation/camp"; return; } e_flag = true; foreach (ListItem li in chklistCamp.Items) { if (li.Selected) { e_flag = false; break; } } if (e_flag) { lblMsg.Text = "You must select at least one camp"; return; } e_flag = true; int status_count = 0; foreach (ListItem li in chklistStatus.Items) { if (li.Selected) { e_flag = false; status_count++; } } if (e_flag) { lblMsg.Text = "You must select at least one status"; return; } if (!chk1stTimers.Checked) { if (!chk2ndTimers.Checked) { if (!chk3rdTimers.Checked) { if (!chkAllTimers.Checked) { lblMsg.Text = "You must at least select one option from # of years in program "; return; } } } } ReportParamCampersFJC param = new ReportParamCampersFJC { CampYearID = Int32.Parse(ddlCampYear.SelectedValue), ProgramTypeID = ProgramType.NoUse, CampYear = Int32.Parse(ddlCampYear.SelectedItem.Text) }; if (UserRole == Role.CampDirector) { param.FedID = -1; // for camp director, Fed are JWest Federations only } else { param.FedID = Int32.Parse(chklistFed.SelectedValue); } foreach (ListItem li in chklistCamp.Items) { if (li.Selected) { param.Camp_Dict[Int32.Parse(li.Value)] = li.Text; } } foreach (ListItem li in chklistStatus.Items) { if (li.Selected) { param.Status_Dict[Int32.Parse(li.Value)] = li.Text; } } param.BuildStrings(); using (DataSet ds = GenerateDataSet()) { if (chkAllTimers.Checked) { gvAllTimers.DataSource = ds.Tables["AllCampers"]; gvAllTimers.DataBind(); divAllTimers.Visible = true; } else { divAllTimers.Visible = false; } if (chk1stTimers.Checked) { gv1stTimers.DataSource = ds.Tables["1stYearCampers"]; gv1stTimers.DataBind(); div1stTimers.Visible = true; } else { div1stTimers.Visible = false; } if (chk2ndTimers.Checked) { gv2ndTimers.DataSource = ds.Tables["2ndYearCampers"]; gv2ndTimers.DataBind(); div2ndTimers.Visible = true; } else { div2ndTimers.Visible = false; } if (chk3rdTimers.Checked) { if (ds.Tables["3rdYearCampers"] != null) { if (ds.Tables["3rdYearCampers"].Rows.Count > 0) { gv3rdTimers.DataSource = ds.Tables["3rdYearCampers"]; gv3rdTimers.DataBind(); div3rdTimers.Visible = true; } else { div3rdTimers.Visible = false; } } else { div3rdTimers.Visible = false; } } else { div3rdTimers.Visible = false; } } divMenu.Visible = false; divReport.Visible = true; }
protected void btnReport_Click(object sender, EventArgs e) { bool e_flag = true; foreach (ListItem li in chklistCamp.Items) { if (li.Selected) { e_flag = false; break; } } if (e_flag) { lblMsg.Text = "You must select at least one camp"; return; } e_flag = true; int status_count = 0; foreach (ListItem li in chklistStatus.Items) { if (li.Selected) { e_flag = false; status_count++; } } if (e_flag) { lblMsg.Text = "You must select at least one status"; return; } if (status_count != 1) { lblMsg.Text = "You can only select one status at a time"; return; } ReportParamCampersFJC param = new ReportParamCampersFJC(); param.CampYearID = Int32.Parse(ddlCampYear.SelectedValue); param.ProgramTypeID = ProgramType.NoUse; param.CampYear = Int32.Parse(ddlCampYear.SelectedItem.Text); if (UserRole == Role.CampDirector) { param.FedID = -1; // for camp director, Fed are JWest Federations only } else { param.FedID = Int32.Parse(ddlFed.SelectedValue); } foreach (ListItem li in chklistCamp.Items) { if (li.Selected) { param.Camp_Dict[Int32.Parse(li.Value)] = li.Text; } } foreach (ListItem li in chklistStatus.Items) { if (li.Selected) { param.Status_Dict[Int32.Parse(li.Value)] = li.Text; } } param.BuildStrings(); divMenu.Visible = false; divReport.Visible = true; gv.DataSource = GenerateDataTable(param); gv.DataBind(); }