Exemplo n.º 1
0
        public static List <Province> GetAllProvinces()
        {
            var returnListProvinces = new List <Province>();
            var dataTable           = new DataTable();
            var dao = new DaoCommonInfo();

            dataTable = dao.GetAllProvince();
            if (dataTable != null && dataTable.Rows.Count > 0)
            {
                for (int i = 0; i < dataTable.Rows.Count; i++)
                {
                    var province = new Province(dataTable.Rows[i]["ProvinceId"].ToString(), dataTable.Rows[i]["ProvinceName"].ToString());
                    returnListProvinces.Add(province);
                }
            }
            return(returnListProvinces);
        }
Exemplo n.º 2
0
        protected DataTable GetAllProvine()
        {
            var dao = new DaoCommonInfo();

            return(dao.GetAllProvince());
        }