private void GetCateParentNews(int cId, int group)
        {
            CateNewsBSO cateNewsBSO = new CateNewsBSO();
            DataTable table = cateNewsBSO.GetCateParentGroupAll(cId, Language.language, group);

            DataList1.DataSource = table;
            DataList1.DataBind();


        }
        private string CateParentIDArray(int Id)
        {
            string strArrayID = Convert.ToString(Id) + ",";
            CateNewsBSO catenewsBSO = new CateNewsBSO();
            DataTable table = catenewsBSO.GetCateParentGroupAll(Id, Language.language, 5);

            for (int i = 0; i < table.Rows.Count; i++)
            {
                strArrayID += table.Rows[i]["CateNewsID"].ToString() + ",";
            }

            return strArrayID;
        }
Ejemplo n.º 3
0
        private void ViewCateNews()
        {
            int group = 1;
            //lay thong tin cua user login
            AdminBSO adminBSO = new AdminBSO();
            ETO.Admin admin = new ETO.Admin();
            admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());
            lbFullName.Text = admin.AdminFullName.ToString();
            lbEmail.Text = admin.AdminEmail.ToString();


            ddlCateNews.Items.Clear();
            CateNewsBSO catenewsBSO = new CateNewsBSO();
            DataTable table = catenewsBSO.GetCateParentGroupAll(0, Language.language, group);

            commonBSO commonBSO = new commonBSO();
            commonBSO.FillToDropDown(ddlCateNews, table, "", "", "CateNewsName", "CateNewsID", "");
        }
        private void BindTabStrip(int group)
        {
            CateNewsBSO catenewsBSO = new CateNewsBSO();
            DataTable table = catenewsBSO.GetCateParentGroupAll(0, Language.language, group);
            DataView dataView = new DataView(table);

            dataView.Sort = "CateNewsOrder ASC";
            int j = 0;
            foreach (DataRowView Row in dataView)
            {
                if (j < 3)
                {
                    Tab rootTab = CreateRootTab(Row["CateNewsName"].ToString());
                    PageView pv = BuildPageViewContents(Convert.ToInt32(Row["CateNewsID"].ToString()), group);
                    RadMultiPage1.PageViews.Add(pv);
                }
                j++;
            }
        }
        private string GetCateParentIDArrayByID(int cID, int gID)
        {
            string strArrayID = Convert.ToString(cID) + ",";

            CateNewsBSO cateNewsBSO = new CateNewsBSO();
            DataTable table1 = cateNewsBSO.GetCateParentGroupAll(cID, Language.language, gID);

            if (table1.Rows.Count > 0)
            {
                foreach (DataRow subrow in table1.Rows)
                {
                    //    strArrayID += subrow["CateNewsID"].ToString() + ",";
                    strArrayID += GetCateParentIDArrayByID(Convert.ToInt32(subrow["CateNewsID"].ToString()), gID);
                }

            }

            return strArrayID;

        }