public IList <ConfigModel> GetListConfig(string code, string status) { try { var datas = new List <ConfigModel>(); var configStore = new ConfigStore(); var dt = configStore.GetListConfig(code, status); for (int i = 0; i < dt.Rows.Count; i++) { var model = new ConfigModel() { Code = dt.Rows[i]["CONFIG_CODE"].ToString(), Value = dt.Rows[i]["CONFIG_VALUE"].ToString(), Desc = dt.Rows[i]["CONFIG_DESC"].ToString(), Status = dt.Rows[i]["CONFIG_STATUS"].ToString().Trim() == "1" }; datas.Add(model); } return(datas); } catch (Exception) { return(null); } }