示例#1
0
    public static List <TinhThanh> GetAllProvince()
    {
        var res = proRepo.All().ToList();

        foreach (var item in res)
        {
            item.QuanHuyens = new List <QuanHuyen>();
        }
        return(res);
    }
示例#2
0
    protected string LoadProvince()
    {
        ProvinceRepository prorepo = new ProvinceRepository();
        StringBuilder      str     = new StringBuilder("");

        foreach (var item in prorepo.All())
        {
            str.Append("<option value='" + item.MaTinh + "'>" + item.TenTinh + "</option>");
        }
        return(str.ToString());
    }