Пример #1
0
    protected void BindDropdownLists()
    {
        BindDropdownList.Countries(ddlCountryID);
        BindDropdownList.Countries(ddlCountryOfBirthID);
        BindDropdownList.Currencies(ddlDayRateCurrencyID);
        BindDropdownList.MaritalStatuses(ddlMaritalStatusID);

        OMMDataContext context = new OMMDataContext();
        var            roles   = from P in context.Roles select new { P.ID, P.Name };

        if (roles != null && roles.Count() > 0)
        {
            hdnRoles.Value = roles.ToList().ToJSON();
        }

        var telephoneTypes = from P in context.TelephoneNumberTypes select new { P.ID, P.Name };

        if (telephoneTypes != null && telephoneTypes.Count() > 0)
        {
            hdnTelephoneTypes.Value = telephoneTypes.ToList().ToJSON();
        }

        var commTypes = from P in context.ContactCommsTypes select new { P.ID, P.Name };

        if (commTypes != null && commTypes.Count() > 0)
        {
            hdnCommTypes.Value = commTypes.ToList().ToJSON();
        }
    }
Пример #2
0
 /// <summary>
 /// Binds Dropdownlists for the initial request.
 /// </summary>
 protected void BindDropDownLists()
 {
     //BindDropdownList.Contactses(ddlContactID);
     //BindDropdownList.Userses(ddlChangedByUserID);
     BindDropdownList.Countries(ddlCountry);
 }