Esempio n. 1
0
        private void InterestIdentityViewBags()
        {
            ///
            var interins = new InterestedIns();
            interins.GetAll();
            interins.Sort(delegate(InterestedIn p1, InterestedIn p2)
            {
                return p1.LocalizedName.CompareTo(p2.LocalizedName);
            });
            ViewBag.InterestedIns = interins.Select(x => new { InterestedInID = x.InterestedInID, LocalizedName = x.LocalizedName });

            ///
            var relationshipStatuses = new RelationshipStatuses();
            relationshipStatuses.GetAll();
            relationshipStatuses.Sort(delegate(RelationshipStatus p1, RelationshipStatus p2)
            {
                return p1.LocalizedName.CompareTo(p2.LocalizedName);
            });
            ViewBag.RelationshipStatuses = relationshipStatuses.Select(x => new { RelationshipStatusID = x.RelationshipStatusID, LocalizedName = x.LocalizedName });

            ///
            var youAres = new YouAres();
            youAres.GetAll();
            youAres.Sort(delegate(YouAre p1, YouAre p2)
            {
                return p1.LocalizedName.CompareTo(p2.LocalizedName);
            });
            ViewBag.YouAres = youAres.Select(x => new { YouAreID = x.YouAreID, LocalizedName = x.LocalizedName });
        }
Esempio n. 2
0
        private void InterestIdentityViewBags()
        {
            var interins = new InterestedIns();
            interins.GetAll();
            interins.Sort(
                (p1, p2) => String.Compare(p1.LocalizedName, p2.LocalizedName, StringComparison.Ordinal));
            ViewBag.InterestedIns = interins.Select(x => new {x.InterestedInID, x.LocalizedName});

            var relationshipStatuses = new RelationshipStatuses();
            relationshipStatuses.GetAll();
            relationshipStatuses.Sort(
                (p1, p2) => String.Compare(p1.LocalizedName, p2.LocalizedName, StringComparison.Ordinal));
            ViewBag.RelationshipStatuses =
                relationshipStatuses.Select(x => new {x.RelationshipStatusID, x.LocalizedName});

            var youAres = new YouAres();
            youAres.GetAll();
            youAres.Sort((p1, p2) => String.Compare(p1.LocalizedName, p2.LocalizedName, StringComparison.Ordinal));
            ViewBag.YouAres = youAres.Select(x => new {x.YouAreID, x.LocalizedName});
        }