Exemplo n.º 1
0
        /// <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)
        {
            DojoPromotionFlagManager    m = new DojoPromotionFlagManager();
            DojoPromotionFlagCollection dojoPromotionFlagCollection = m.GetCollection(string.Empty, string.Empty);

            // Render Header Row
            this.headerLockEnabled = true;
            RenderRow(this.HeaderRowCssClass, );

            bool   rowflag = false;
            string rowCssClass;

            //
            // Render Records
            //
            foreach (DojoPromotionFlag dojoPromotionFlag in dojoPromotionFlagCollection)
            {
                if (rowflag)
                {
                    rowCssClass = defaultRowCssClass;
                }
                else
                {
                    rowCssClass = alternateRowCssClass;
                }
                rowflag = !rowflag;
                output.WriteBeginTag("tr");
                output.WriteAttribute("i", dojoPromotionFlag.ID.ToString());
                output.WriteLine(HtmlTextWriter.TagRightChar);
                output.Indent++;

                output.Indent--;
                output.WriteEndTag("tr");
                output.WriteLine();
            }
        }
Exemplo n.º 2
0
        private void bindDropDownLists()
        {
            #region Bind General Child Data

            msMemberType.Items.Add(new ListItem("Null", "Null"));
            DojoMemberTypeManager    memberTypeManager    = new DojoMemberTypeManager();
            DojoMemberTypeCollection memberTypeCollection = memberTypeManager.GetCollection(string.Empty, string.Empty, null);
            foreach (DojoMemberType memberType in memberTypeCollection)
            {
                ListItem i = new ListItem(memberType.ToString(), memberType.ID.ToString());
                msMemberType.Items.Add(i);
            }

            msPublicContact.Items.Add(new ListItem("Null", "Null"));
            GreyFoxContactManager    publicContactManager    = new GreyFoxContactManager("kitTessen_Members_PublicContacts");
            GreyFoxContactCollection publicContactCollection = publicContactManager.GetCollection(string.Empty, string.Empty);
            foreach (GreyFoxContact publicContact in publicContactCollection)
            {
                ListItem i = new ListItem(publicContact.ToString(), publicContact.ID.ToString());
                msPublicContact.Items.Add(i);
            }

            msParentMember.Items.Add(new ListItem("Null", "Null"));
            DojoMemberManager    parentMemberManager    = new DojoMemberManager();
            DojoMemberCollection parentMemberCollection = parentMemberManager.GetCollection(string.Empty, string.Empty, null);
            foreach (DojoMember parentMember in parentMemberCollection)
            {
                ListItem i = new ListItem(parentMember.ToString(), parentMember.ID.ToString());
                msParentMember.Items.Add(i);
            }

            #endregion

            #region Bind Membership Child Data

            msPrimaryOrgMembership.Items.Add(new ListItem("Null", "Null"));
            DojoMembershipManager    primaryOrgMembershipManager    = new DojoMembershipManager();
            DojoMembershipCollection primaryOrgMembershipCollection = primaryOrgMembershipManager.GetCollection(string.Empty, string.Empty, null);
            foreach (DojoMembership primaryOrgMembership in primaryOrgMembershipCollection)
            {
                ListItem i = new ListItem(primaryOrgMembership.ToString(), primaryOrgMembership.ID.ToString());
                msPrimaryOrgMembership.Items.Add(i);
            }

            msParentOrgMembership.Items.Add(new ListItem("Null", "Null"));
            DojoMembershipManager    parentOrgMembershipManager    = new DojoMembershipManager();
            DojoMembershipCollection parentOrgMembershipCollection = parentOrgMembershipManager.GetCollection(string.Empty, string.Empty, null);
            foreach (DojoMembership parentOrgMembership in parentOrgMembershipCollection)
            {
                ListItem i = new ListItem(parentOrgMembership.ToString(), parentOrgMembership.ID.ToString());
                msParentOrgMembership.Items.Add(i);
            }

            #endregion

            #region Bind Attendance Child Data

            msInstructor1.Items.Add(new ListItem("Null", "Null"));
            DojoMemberManager    instructor1Manager    = new DojoMemberManager();
            DojoMemberCollection instructor1Collection = instructor1Manager.GetCollection(string.Empty, string.Empty, null);
            foreach (DojoMember instructor1 in instructor1Collection)
            {
                ListItem i = new ListItem(instructor1.ToString(), instructor1.ID.ToString());
                msInstructor1.Items.Add(i);
            }

            msInstructor2.Items.Add(new ListItem("Null", "Null"));
            DojoMemberManager    instructor2Manager    = new DojoMemberManager();
            DojoMemberCollection instructor2Collection = instructor2Manager.GetCollection(string.Empty, string.Empty, null);
            foreach (DojoMember instructor2 in instructor2Collection)
            {
                ListItem i = new ListItem(instructor2.ToString(), instructor2.ID.ToString());
                msInstructor2.Items.Add(i);
            }

            msInstructor3.Items.Add(new ListItem("Null", "Null"));
            DojoMemberManager    instructor3Manager    = new DojoMemberManager();
            DojoMemberCollection instructor3Collection = instructor3Manager.GetCollection(string.Empty, string.Empty, null);
            foreach (DojoMember instructor3 in instructor3Collection)
            {
                ListItem i = new ListItem(instructor3.ToString(), instructor3.ID.ToString());
                msInstructor3.Items.Add(i);
            }

            #endregion

            #region Bind Activity Child Data

            msPromotionFlags.Items.Add(new ListItem("Null", "Null"));
            DojoPromotionFlagManager    promotionFlagsManager    = new DojoPromotionFlagManager();
            DojoPromotionFlagCollection promotionFlagsCollection = promotionFlagsManager.GetCollection(string.Empty, string.Empty);
            foreach (DojoPromotionFlag promotionFlags in promotionFlagsCollection)
            {
                ListItem i = new ListItem(promotionFlags.ToString(), promotionFlags.ID.ToString());
                msPromotionFlags.Items.Add(i);
            }

            msRank.Items.Add(new ListItem("Null", "Null"));
            DojoRankManager    rankManager    = new DojoRankManager();
            DojoRankCollection rankCollection = rankManager.GetCollection(string.Empty, string.Empty, null);
            foreach (DojoRank rank in rankCollection)
            {
                ListItem i = new ListItem(rank.ToString(), rank.ID.ToString());
                msRank.Items.Add(i);
            }

            #endregion

            #region Bind Security Child Data

            #endregion

            #region Bind Rappahanock Child Data

            msCustomer.Items.Add(new ListItem("Null", "Null"));
            RHCustomerManager    customerManager    = new RHCustomerManager();
            RHCustomerCollection customerCollection = customerManager.GetCollection(string.Empty, string.Empty, null);
            foreach (RHCustomer customer in customerCollection)
            {
                ListItem i = new ListItem(customer.ToString(), customer.ID.ToString());
                msCustomer.Items.Add(i);
            }

            #endregion
        }