Saturday, April 3, 2010

CommonManager Class

this is a class that hosts static functions that is used by dropdowns or lists in the UI

public class CommonManager
{

    public static List ListGroups()
    {
        DataClassesDataContext db = new DataClassesDataContext();
        return db.Groups.ToList();
    }

    public static List ListCities()
    {
        DataClassesDataContext db = new DataClassesDataContext();
        return db.Cities.ToList();
    }

    public static List ListBloodGroups()
    {
        DataClassesDataContext db = new DataClassesDataContext();
        return db.BloodGroups.ToList();
    }
}

No comments:

Post a Comment