private void GetCateParentNewsGroup(int cId) { CateNewsBSO cateNewsBSO = new CateNewsBSO(); DataTable table = cateNewsBSO.GetCateNewsParentAll(cId, Language.language); GridView1.DataSource = table; GridView1.DataBind(); }
private string GetCateParentIDArrayByID(int cID) { string strArrayID = Convert.ToString(cID) + ","; CateNewsBSO cateNewsBSO = new CateNewsBSO(); DataTable table1 = cateNewsBSO.GetCateNewsParentAll(cID, Language.language); if (table1.Rows.Count > 0) { foreach (DataRow subrow in table1.Rows) { // strArrayID += subrow["CateNewsID"].ToString() + ","; strArrayID += GetCateParentIDArrayByID(Convert.ToInt32(subrow["CateNewsID"].ToString())); } } return strArrayID; }
private string CateParentIDArray(int Id) { string strArrayID = Convert.ToString(Id) + ","; CateNewsBSO catenewsBSO = new CateNewsBSO(); DataTable table = catenewsBSO.GetCateNewsParentAll(Id, Language.language); for (int i = 0; i < table.Rows.Count; i++) { strArrayID += table.Rows[i]["CateNewsID"].ToString() + ","; } return strArrayID; }