private void bindDropDownLists() { #region Bind General Child Data DojoSeminarManager parentSeminarManager = new DojoSeminarManager(); DojoSeminarCollection parentSeminarCollection = parentSeminarManager.GetCollection(string.Empty, "Name", null); foreach (DojoSeminar parentSeminar in parentSeminarCollection) { ListItem i = new ListItem(parentSeminar.Name, parentSeminar.ID.ToString()); msParentSeminar.Items.Add(i); } if (msStatus.Items.Count == 0) { msStatus.Items.Add(new ListItem("Unverified", "0")); msStatus.Items.Add(new ListItem("Verified", "10")); msStatus.Items.Add(new ListItem("Paid", "15")); } #endregion #region Bind Contact Child Data #endregion }
/// <summary> /// Render this control to the output parameter specified. /// </summary> /// <param name="output"> The HTML writer to write out to </param> protected override void RenderContent(HtmlTextWriter output) { EnsureChildControls(); string whereQuery = string.Empty; if (minDate != DateTime.MinValue) { whereQuery = "EndDate>=#" + minDate.ToString() + "#"; } if (maxDate != DateTime.MaxValue) { if (whereQuery.Length != 0) { whereQuery += " AND "; } whereQuery += "EndDate<=#" + maxDate.ToString() + "#"; } if (localOnly) { if (whereQuery.Length != 0) { whereQuery += " AND "; } whereQuery += "IsLocal=true"; } DojoSeminarManager m = new DojoSeminarManager(); DojoSeminarCollection seminars; switch (displayStyle) { case DojoSeminarGridStyle.Stacked: seminars = m.GetCollection(whereQuery, "StartDate", DojoSeminarFlags.Location); renderStackedGrid(output, seminars); break; case DojoSeminarGridStyle.Default: seminars = m.GetCollection(whereQuery, "StartDate DESC", DojoSeminarFlags.Location); renderDefaultGrid(output, seminars); break; default: goto case DojoSeminarGridStyle.Default; } }
private void bindDropDownLists() { #region Bind Default Child Data msInstructor.Items.Add(new ListItem("Null", "Null")); DojoMemberManager instructorManager = new DojoMemberManager(); DojoMemberCollection instructorCollection = instructorManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember instructor in instructorCollection) { ListItem i = new ListItem(instructor.ToString(), instructor.ID.ToString()); msInstructor.Items.Add(i); } msParentSeminar.Items.Add(new ListItem("Null", "Null")); DojoSeminarManager parentSeminarManager = new DojoSeminarManager(); DojoSeminarCollection parentSeminarCollection = parentSeminarManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoSeminar parentSeminar in parentSeminarCollection) { ListItem i = new ListItem(parentSeminar.ToString(), parentSeminar.ID.ToString()); msParentSeminar.Items.Add(i); } msParentDefinition.Items.Add(new ListItem("Null", "Null")); DojoClassDefinitionManager parentDefinitionManager = new DojoClassDefinitionManager(); DojoClassDefinitionCollection parentDefinitionCollection = parentDefinitionManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoClassDefinition parentDefinition in parentDefinitionCollection) { ListItem i = new ListItem(parentDefinition.ToString(), parentDefinition.ID.ToString()); msParentDefinition.Items.Add(i); } msLocation.Items.Add(new ListItem("Null", "Null")); GreyFoxContactManager locationManager = new GreyFoxContactManager("kitTessen_Locations"); GreyFoxContactCollection locationCollection = locationManager.GetCollection(string.Empty, string.Empty); foreach (GreyFoxContact location in locationCollection) { ListItem i = new ListItem(location.ToString(), location.ID.ToString()); msLocation.Items.Add(i); } msAccessControlGroup.Items.Add(new ListItem("Null", "Null")); DojoAccessControlGroupManager accessControlGroupManager = new DojoAccessControlGroupManager(); DojoAccessControlGroupCollection accessControlGroupCollection = accessControlGroupManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoAccessControlGroup accessControlGroup in accessControlGroupCollection) { ListItem i = new ListItem(accessControlGroup.ToString(), accessControlGroup.ID.ToString()); msAccessControlGroup.Items.Add(i); } #endregion }
private void bindDropDownLists() { ddParentSeminar.Items.Clear(); DojoSeminarManager m = new DojoSeminarManager(); DojoSeminarCollection seminars = m.GetCollection(string.Empty, "Name", DojoSeminarFlags.Location); foreach (DojoSeminar seminar in seminars) { ListItem i = new ListItem(seminar.Name, seminar.ID.ToString()); ddParentSeminar.Items.Add(i); } // Bind the seminar ID to the drop down box and clear the value if (defaultSeminarID != -1) { foreach (ListItem i in ddParentSeminar.Items) { i.Selected = i.Value == defaultSeminarID.ToString(); } defaultSeminarID = -1; } }
/// <summary> /// Render this control to the output parameter specified. /// </summary> /// <param name="output"> The HTML writer to write out to </param> protected override void RenderContent(HtmlTextWriter output) { DojoSeminarManager m = new DojoSeminarManager(); DojoSeminarCollection dojoSeminarCollection = m.GetCollection(string.Empty, string.Empty, null); // Render Header Row this.headerLockEnabled = true; RenderRow(this.HeaderRowCssClass, ); bool rowflag = false; string rowCssClass; // // Render Records // foreach (DojoSeminar dojoSeminar in dojoSeminarCollection) { if (rowflag) { rowCssClass = defaultRowCssClass; } else { rowCssClass = alternateRowCssClass; } rowflag = !rowflag; output.WriteBeginTag("tr"); output.WriteAttribute("i", dojoSeminar.ID.ToString()); output.WriteLine(HtmlTextWriter.TagRightChar); output.Indent++; output.Indent--; output.WriteEndTag("tr"); output.WriteLine(); } }
private void bind() { #region Bind Default Child Data DojoMemberManager instructorManager = new DojoMemberManager(); DojoMemberCollection instructorCollection = instructorManager.GetCollection(string.Empty, string.Empty, null); ComponentArt.Web.UI.ComboBoxItem InstructorNullItem = new ComponentArt.Web.UI.ComboBoxItem(); InstructorNullItem.Text = "Null"; InstructorNullItem.Value = "Null"; comboInstructor.Items.Add(InstructorNullItem); foreach (DojoMember instructor in instructorCollection) { ComponentArt.Web.UI.ComboBoxItem i = new ComponentArt.Web.UI.ComboBoxItem(); i.Text = instructor.ToString(); i.Value = instructor.ID.ToString(); comboInstructor.Items.Add(i); } DojoSeminarManager parentSeminarManager = new DojoSeminarManager(); DojoSeminarCollection parentSeminarCollection = parentSeminarManager.GetCollection(string.Empty, string.Empty, null); ComponentArt.Web.UI.ComboBoxItem ParentSeminarNullItem = new ComponentArt.Web.UI.ComboBoxItem(); ParentSeminarNullItem.Text = "Null"; ParentSeminarNullItem.Value = "Null"; comboParentSeminar.Items.Add(ParentSeminarNullItem); foreach (DojoSeminar parentSeminar in parentSeminarCollection) { ComponentArt.Web.UI.ComboBoxItem i = new ComponentArt.Web.UI.ComboBoxItem(); i.Text = parentSeminar.ToString(); i.Value = parentSeminar.ID.ToString(); comboParentSeminar.Items.Add(i); } DojoClassDefinitionManager parentDefinitionManager = new DojoClassDefinitionManager(); DojoClassDefinitionCollection parentDefinitionCollection = parentDefinitionManager.GetCollection(string.Empty, string.Empty, null); ComponentArt.Web.UI.ComboBoxItem ParentDefinitionNullItem = new ComponentArt.Web.UI.ComboBoxItem(); ParentDefinitionNullItem.Text = "Null"; ParentDefinitionNullItem.Value = "Null"; comboParentDefinition.Items.Add(ParentDefinitionNullItem); foreach (DojoClassDefinition parentDefinition in parentDefinitionCollection) { ComponentArt.Web.UI.ComboBoxItem i = new ComponentArt.Web.UI.ComboBoxItem(); i.Text = parentDefinition.ToString(); i.Value = parentDefinition.ID.ToString(); comboParentDefinition.Items.Add(i); } GreyFoxContactManager locationManager = new GreyFoxContactManager("kitTessen_Locations"); GreyFoxContactCollection locationCollection = locationManager.GetCollection(string.Empty, string.Empty); ComponentArt.Web.UI.ComboBoxItem LocationNullItem = new ComponentArt.Web.UI.ComboBoxItem(); LocationNullItem.Text = "Null"; LocationNullItem.Value = "Null"; comboLocation.Items.Add(LocationNullItem); foreach (GreyFoxContact location in locationCollection) { ComponentArt.Web.UI.ComboBoxItem i = new ComponentArt.Web.UI.ComboBoxItem(); i.Text = location.ToString(); i.Value = location.ID.ToString(); comboLocation.Items.Add(i); } DojoAccessControlGroupManager accessControlGroupManager = new DojoAccessControlGroupManager(); DojoAccessControlGroupCollection accessControlGroupCollection = accessControlGroupManager.GetCollection(string.Empty, string.Empty, null); ComponentArt.Web.UI.ComboBoxItem AccessControlGroupNullItem = new ComponentArt.Web.UI.ComboBoxItem(); AccessControlGroupNullItem.Text = "Null"; AccessControlGroupNullItem.Value = "Null"; comboAccessControlGroup.Items.Add(AccessControlGroupNullItem); foreach (DojoAccessControlGroup accessControlGroup in accessControlGroupCollection) { ComponentArt.Web.UI.ComboBoxItem i = new ComponentArt.Web.UI.ComboBoxItem(); i.Text = accessControlGroup.ToString(); i.Value = accessControlGroup.ID.ToString(); comboAccessControlGroup.Items.Add(i); } #endregion }