private void ViewNewsLog(int newsGroupID)
    {
        commonBSO  commonBSO  = new commonBSO();
        NewsLogBSO newsLogBSO = new NewsLogBSO();
        DataTable  table      = new DataTable();


        _page = new PagingInfo(10, Convert.ToInt32(hdnPage.Value), true);
        table = newsLogBSO.GetNewsLogPaging(Language.language, newsGroupID, _page);


        if (table.Rows.Count > 0)
        {
            TotalRecord = Convert.ToInt32(table.Rows[0]["Total"].ToString());
            SetAttributeGvArticle(Convert.ToInt32(table.Rows[0]["Total"].ToString()));
            commonBSO.FillToGridView(grvNewsLog, table);

            Paging.DataLoad();
            if (TotalPage(Convert.ToInt32(table.Rows[0]["Total"].ToString())) <= 1)
            {
                Paging.Visible = false;
            }
            else
            {
                Paging.Visible = true;
            }
        }
        else
        {
            SetAttributeGvArticle(0);
            grvNewsLog.DataSource = null;
            grvNewsLog.DataBind();
            Paging.Visible = false;
        }
    }
Beispiel #2
0
    private void ViewContact()
    {
        ContactBSO contactBSO = new ContactBSO();
        DataTable  table      = contactBSO.GetContactAll();
        commonBSO  commonBSO  = new commonBSO();

        commonBSO.FillToGridView(grvContact, table);
    }
Beispiel #3
0
    public void ViewEmail()
    {
        EmailBSO  emailBSO  = new EmailBSO();
        DataTable table     = emailBSO.GetEmailAll();
        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToGridView(grvEmail, table);
    }
    private void ViewCateGroup()
    {
        CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO();
        DataTable        table            = catenewsGroupBSO.GetCateNewsGroupAll(Language.language, Session["Admin_UserName"].ToString());
        commonBSO        commonBSO        = new commonBSO();

        commonBSO.FillToGridView(grvCateNewsGroup, table);
    }
Beispiel #5
0
    private void ViewCateGroup(int group)
    {
        CateNewsBSO catenewsBSO = new CateNewsBSO();
        DataTable   table       = catenewsBSO.GetCateGroupRolesWithPage(Language.language, group, Session["Admin_UserName"].ToString());
        commonBSO   commonBSO   = new commonBSO();

        commonBSO.FillToGridView(grvCateNews, table);
    }
Beispiel #6
0
    private void ViewCateAll()
    {
        CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO();
        DataTable        table            = catenewsGroupBSO.GetCateNewsGroupAll(Language.language, Session["Admin_UserName"].ToString());
        commonBSO        commonBSO        = new commonBSO();

        commonBSO.FillToCheckBoxList(chkListCate, table, "CateNewsGroupName", "CateNewsGroupID");
    }
Beispiel #7
0
    public void ViewModules()
    {
        ModulesBSO modulesBSO = new ModulesBSO();
        DataTable  table      = modulesBSO.MixModules();
        commonBSO  commonBSO  = new commonBSO();

        commonBSO.FillToGridView(GridView1, table);
    }
    private void ViewCateGroup(int group)
    {
        ddlCateNews.Items.Clear();
        CateNewsBSO catenewsBSO = new CateNewsBSO();
        DataTable   table       = catenewsBSO.GetCateGroupRolesUrl(Language.language, group, Session["Admin_UserName"].ToString());
        commonBSO   commonBSO   = new commonBSO();

        commonBSO.FillToDropDown(ddlCateNews, table, "~~ Danh mục gốc ~~", "0", "CateNewsName", "CateNewsID", "");
    }
Beispiel #9
0
    private void ViewWidgetType()
    {
        SYS_WidgetTypeBSO _widgetTypeBSO = new SYS_WidgetTypeBSO();
        DataTable         table          = _widgetTypeBSO.GetSYS_WidgetTypeAll();

        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToGridView(grvWidgetType, table);
    }
    private void ViewTemplate()
    {
        SYS_TemplatePageBSO templateBSO = new SYS_TemplatePageBSO();
        DataTable           table       = templateBSO.GetSYS_TemplatePageAll(Language.language);

        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToGridView(grvTemplate, table);
    }
    private void BindCateNews(int group)
    {
        ddlCateNewsSearch.Items.Clear();
        CateNewsBSO catenewsBSO = new CateNewsBSO();
        DataTable   table       = catenewsBSO.GetCateGroupRoles(Language.language, group, Session["Admin_Username"].ToString());
        commonBSO   commonBSO   = new commonBSO();

        commonBSO.FillToDropDown(ddlCateNewsSearch, table, "~~ Trong tất cả ~~", "0", "CateNewsName", "CateNewsID", "");
    }
Beispiel #12
0
    protected void BindDropDownList()
    {
        ModulesBSO modulesBSO = new ModulesBSO();
        DataTable  table      = modulesBSO.MixModules();
        commonBSO  commonBSO  = new commonBSO();

        ddlModules.Items.Clear();
        commonBSO.FillToDropDown(ddlModules, table, "~ Cấp độ modules ~", "0", "Modules_Name", "Modules_ID", "");
    }
    protected void Bind_ddlPageLayout()
    {
        SYS_PageLayoutBSO _pageLayoutBSO = new SYS_PageLayoutBSO();
        DataTable         table          = _pageLayoutBSO.GetSYS_PageLayoutAll(Language.language);
        commonBSO         commonBSO      = new commonBSO();

        ddlPageLayout.Items.Clear();
        commonBSO.FillToDropDown(ddlPageLayout, table, "", "", "PageName", "Id", "");
    }
    private void ViewPageLayout()
    {
        SYS_PageLayoutBSO _pageBSO = new SYS_PageLayoutBSO();
        DataTable         table    = _pageBSO.GetSYS_PageLayoutAllTemplate(Language.language);

        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToGridView(grvPageLayout, table);
    }
Beispiel #15
0
    //#region Bind_ddlPageLayout
    //protected void Bind_ddlPageLayout()
    //{
    //    SYS_PageLayoutBSO _pageLayoutBSO = new SYS_PageLayoutBSO();
    //    DataTable table = _pageLayoutBSO.GetSYS_PageLayoutAll(Language.language);
    //    commonBSO commonBSO = new commonBSO();
    //    ddlPageLayout.Items.Clear();
    //    commonBSO.FillToDropDown(ddlPageLayout, table, "~ Chọn trang ~", "0", "PageName", "Id", "");
    //}
    //#endregion

    #region Bind_ddlWidgetType
    protected void Bind_ddlWidgetType()
    {
        SYS_WidgetTypeBSO _widgetTypeBSO = new SYS_WidgetTypeBSO();
        DataTable         table          = _widgetTypeBSO.GetSYS_WidgetTypeAll();
        commonBSO         commonBSO      = new commonBSO();

        ddlWidgetType.Items.Clear();
        commonBSO.FillToDropDown(ddlWidgetType, table, "~ Tất cả ~", "0", "WidgetTypeName", "Id", "");
    }
    protected void BindDropDownList()
    {
        SYS_TemplatePageBSO _tempateBSO = new SYS_TemplatePageBSO();
        DataTable           table       = _tempateBSO.GetSYS_TemplatePageAll(Language.language);
        commonBSO           commonBSO   = new commonBSO();

        ddlTemplate.Items.Clear();
        commonBSO.FillToDropDown(ddlTemplate, table, "~ Chọn Template ~", "0", "TemplateName", "Id", "");
    }
Beispiel #17
0
    protected void btn_add_Click(object sender, EventArgs e)
    {
        //DataTable datatable = CateNewsGroupID();

        //try
        //{
        //    CateNewsGroupPermissionBSO catenewPermissionBSO = new CateNewsGroupPermissionBSO();

        //    DataTable table1 = catenewPermissionBSO.GetCateNewsGroupPermissionByRoles(Convert.ToInt32(hddRoles.Value), Language.language);

        //    if (table1.Rows.Count > 0)
        //        catenewPermissionBSO.DeleteCateNewsGroupPermissionRoles(Convert.ToInt32(hddRoles.Value), Language.language);

        //    CateNewsGroupPermission _cateNewsGroupPermission = new CateNewsGroupPermission();

        //    if (datatable.Rows.Count > 0)
        //    {
        //        foreach (DataRow subrow in datatable.Rows)
        //        {
        //            _cateNewsGroupPermission.CateNewsGroupID = Convert.ToInt32(subrow["CateNewsGroupID"].ToString());
        //            _cateNewsGroupPermission.RolesID = Convert.ToInt32(hddRoles.Value);
        //            _cateNewsGroupPermission.Permission = "";
        //            _cateNewsGroupPermission.UserName = Session["Admin_UserName"].ToString();
        //            _cateNewsGroupPermission.Created = DateTime.Now;
        //            _cateNewsGroupPermission.Language = Language.language;

        //            catenewPermissionBSO.CreateCateNewsGroupPermission(_cateNewsGroupPermission);

        //            error.Text = "<div class='alert alert-sm alert-success bg-gradient'>Cập nhật thành công !</div>";
        //            ////  initControl(_cateNewsGroupPermission.RolesID);

        //        }


        //    }


        //}
        //catch (Exception ex)
        //{
        //    error.Text = ex.Message.ToString();
        //}
        commonBSO commonBSO = new commonBSO();

        commonBSO.CreateDataView("DELETE FROM tblRoleCate WHERE GroupId=" + hddRoles.Value);
        foreach (ListItem item in chklist.Items)
        {
            if (item.Selected && item.Text.Contains("---"))
            {
                RoleCate roleCate = new RoleCate();
                roleCate.CateId  = Convert.ToInt32(item.Value);
                roleCate.GroupId = Convert.ToInt32(hddRoles.Value);
                new RoleCateService().Insert(roleCate);
            }
        }
        error.Text = "<div class='alert alert-sm alert-success bg-gradient'>Cập nhật thành công !</div>";
    }
    protected void BindDropDownList()
    {
        MenuLinksBSO menuLinksBSO = new MenuLinksBSO();
        //  DataTable table = menuLinksBSO.GetAllMenuLinks();
        DataTable table     = menuLinksBSO.getCateClient(0, Language.language);
        commonBSO commonBSO = new commonBSO();

        ddlMenuLinks.Items.Clear();
        commonBSO.FillToDropDown(ddlMenuLinks, table, "~ Cấp độ menuLinks ~", "0", "MenuLinksName", "MenuLinksID", "");
    }
Beispiel #19
0
    protected void Bind_GroupCate()
    {
        DataTable        datatable         = new DataTable();
        CateNewsGroupBSO _catenewsgroupBSO = new CateNewsGroupBSO();

        datatable = _catenewsgroupBSO.GetCateNewsGroupNewAll(Language.language, Session["Admin_UserName"].ToString());

        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToCheckBoxList(chkCateNews, datatable, "CateNewsGroupName", "GroupCate");
    }
Beispiel #20
0
    protected void ViewRoles()
    {
        RolesBSO  rolesBSO = new RolesBSO();
        DataTable table    = rolesBSO.GetAllRoles();
        DataView  dataView = new DataView(table);

        dataView.RowFilter = "Roles_Name not in ('adminsys32','Administrators')";
        DataTable dataTable = dataView.ToTable();
        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToGridView(grvRoles, dataTable);
    }
Beispiel #21
0
    public void ViewPermission()
    {
        PermissionBSO permissionBSO = new PermissionBSO();
        DataTable     table         = permissionBSO.GetPermissionAll();
        DataView      dataView      = new DataView(table);

        dataView.Sort = "PermissionID ASC";
        DataTable dataTable = dataView.ToTable();
        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToCheckBoxList(chklist, dataTable, "PermissionName", "Value");
    }
    protected void ddlCateNewsSearch_SelectedIndexChanged(object sender, EventArgs e)
    {
        commonBSO    commonBSO    = new commonBSO();
        NewsGroupBSO newsGroupBSO = new NewsGroupBSO();
        DataTable    table        = new DataTable();


        _page = new PagingInfo(20, Convert.ToInt32(hdnPage.Value), true);

        if (ddlCateNewsSearch.SelectedValue == "0")
        {
            if (!Session["Admin_UserName"].Equals("administrator"))
            {
                string strCate = GetCateParentIDArrayByID(Convert.ToInt32(ddlCateNewsGroup.SelectedValue));
                if (strCate != "")
                {
                    table = newsGroupBSO.GetNewsGroupPagingbyUser(Language.language, Convert.ToInt32(ddlCateNewsGroup.SelectedValue), strCate, _page, Session["Admin_UserName"].ToString(), 0, -1);
                }
            }
            else
            {
                table = newsGroupBSO.GetNewsGroupPagingApproved(Language.language, Convert.ToInt32(ddlCateNewsGroup.SelectedValue), "", _page, 0, -1);
            }
        }
        else
        {
            table = newsGroupBSO.GetNewsGroupPagingApproved(Language.language, Convert.ToInt32(ddlCateNewsGroup.SelectedValue), Convert.ToInt32(ddlCateNewsSearch.SelectedValue), _page, 0, -1);
        }

        if (table.Rows.Count > 0)
        {
            TotalRecord = Convert.ToInt32(table.Rows[0]["Total"].ToString());
            SetAttributeGvArticle(Convert.ToInt32(table.Rows[0]["Total"].ToString()));
            commonBSO.FillToGridView(grvNewsGroup, table);

            Paging.DataLoad();
            if (TotalPage(Convert.ToInt32(table.Rows[0]["Total"].ToString())) <= 1)
            {
                Paging.Visible = false;
            }
            else
            {
                Paging.Visible = true;
            }
        }
        else
        {
            SetAttributeGvArticle(0);
            grvNewsGroup.DataSource = null;
            grvNewsGroup.DataBind();
            Paging.Visible = false;
        }
    }
Beispiel #23
0
    public void ViewModules()
    {
        ModulesBSO modulesBSO = new ModulesBSO();
        DataTable  table      = modulesBSO.MixModules();
        DataView   dataView   = new DataView(table);

        // dataView.RowFilter = "Slug <> 'listmodules' and Slug <> 'editmodules' ";
        dataView.RowFilter = "Slug not in ('listmodules','editmodules')";
        DataTable dataTable = dataView.ToTable();
        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToCheckBoxList(chklist, dataTable, "Modules_Name", "Slug");
    }
Beispiel #24
0
    public void ViewRoles()
    {
        ddlRoles.Items.Clear();
        RolesBSO  rolesBSO = new RolesBSO();
        DataTable table    = rolesBSO.GetAllRoles();
        DataView  dataView = new DataView(table);

        dataView.RowFilter = "Roles_Name NOT IN ('adminsys32','Administrators')";
        DataTable dataTable = dataView.ToTable();

        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToDropDown(ddlRoles, dataTable, "~~ Trong tất cả các nhóm ~~", "0", "Roles_Name", "Roles_ID", "");
    }
Beispiel #25
0
    protected void ViewAdmin()
    {
        AdminBSO  adminBSO = new AdminBSO();
        DataTable table    = adminBSO.GetAllAdminRoles();
        DataView  dataView = new DataView(table);

        //dataView.RowFilter = "Admin_Username <> 'administrator' and Admin_Username <> 'Administrator'";
        dataView.RowFilter = "Admin_Username not in ('administrator','Administrator')";
        dataView.Sort      = "Admin_Username ASC";
        DataTable dataTable = dataView.ToTable();
        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToGridView(grvAdmin, dataTable);
    }
    private void BindControl()
    {
        ddlCateNewsSearch.Items.Clear();
        CateNewsGroupBSO categroupBSO = new CateNewsGroupBSO();
        DataTable        table        = categroupBSO.GetCateNewsGroupNewAll(Language.language, Session["Admin_Username"].ToString());
        commonBSO        commonBSO    = new commonBSO();

        commonBSO.FillToDropDown(ddlGroupCate, table, "~~ Trong tất cả ~~", "0", "CateNewsGroupName", "GroupCate", "");

        ddlType.Items.Clear();
        ddlType.Items.Add(new ListItem("--All--", "0"));
        ddlType.Items.Add(new ListItem("Tiêu đề", "1"));
        ddlType.Items.Add(new ListItem("Tin vắn", "2"));
        ddlType.SelectedValue = "1";
    }
Beispiel #27
0
    private void ViewNewsGroup(int group)
    {
        commonBSO    commonBSO    = new commonBSO();
        NewsGroupBSO newsGroupBSO = new NewsGroupBSO();
        DataTable    table        = new DataTable();


        _page = new PagingInfo(20, Convert.ToInt32(hdnPage.Value), true);

        if (!Session["Admin_UserName"].Equals("administrator"))
        {
            string strCate = GetCateParentIDArrayByID();
            if (strCate != "")
            {
                table = newsGroupBSO.GetNewsGroupPaging(Language.language, group, strCate, _page);
            }
        }
        else
        {
            table = newsGroupBSO.GetNewsGroupPaging(Language.language, group, _page);
        }

        if (table.Rows.Count > 0)
        {
            TotalRecord = Convert.ToInt32(table.Rows[0]["Total"].ToString());
            SetAttributeGvArticle(Convert.ToInt32(table.Rows[0]["Total"].ToString()));
            // commonBSO.FillToGridView(grvNewsGroup, table);
            grvNewsGroup.DataSource = table;
            grvNewsGroup.DataBind();

            Paging.DataLoad();
            if (TotalPage(Convert.ToInt32(table.Rows[0]["Total"].ToString())) <= 1)
            {
                Paging.Visible = false;
            }
            else
            {
                Paging.Visible = true;
            }
        }
        else
        {
            SetAttributeGvArticle(0);
            grvNewsGroup.DataSource = null;
            grvNewsGroup.DataBind();
            Paging.Visible = false;
        }
    }
    protected void NewsCommentView(int group)
    {
        NewsCommentBSO newsCommentBSO = new NewsCommentBSO();
        DataTable      table          = new DataTable();

        if (hddNewsID.Value != "-1")
        {
            table = newsCommentBSO.GetAllNewsGroupComment(Convert.ToInt32(hddNewsID.Value), group);
        }
        else
        {
            table = newsCommentBSO.GetAllNewsGroupComment(group);
        }
        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToGridView(grvNewsComment, table);
    }
    private void ViewFiles(int cId)
    {
        NewsGroupFileBSO newsgroupFileBSO = new NewsGroupFileBSO();
        DataTable        table            = new DataTable();

        if (cId != 0)
        {
            table = newsgroupFileBSO.GetNewsGroupFileByNewsGroup(cId);
        }
        else
        {
            table = newsgroupFileBSO.GetNewsGroupFileAll();
        }

        commonBSO commonBSO = new commonBSO();

        commonBSO.FillToGridView(grvFiles, table);
    }
    protected void ddlGroupCate_SelectedIndexChanged(object sender, EventArgs e)
    {
        commonBSO    commonBSO    = new commonBSO();
        NewsGroupBSO newsGroupBSO = new NewsGroupBSO();
        DataTable    table        = new DataTable();


        _page = new PagingInfo(20, Convert.ToInt32(hdnPage.Value), true);

        if (ddlGroupCate.SelectedValue == "0")
        {
            table = newsGroupBSO.GetNewsGroupPaging(Language.language, -1, _page);
        }
        else
        {
            table = newsGroupBSO.GetNewsGroupPaging(Language.language, Convert.ToInt32(ddlGroupCate.SelectedValue), _page);
        }

        if (table.Rows.Count > 0)
        {
            TotalRecord = Convert.ToInt32(table.Rows[0]["Total"].ToString());
            SetAttributeGvArticle(Convert.ToInt32(table.Rows[0]["Total"].ToString()));
            commonBSO.FillToGridView(grvNewsGroup, table);

            Paging.DataLoad();
            if (TotalPage(Convert.ToInt32(table.Rows[0]["Total"].ToString())) <= 1)
            {
                Paging.Visible = false;
            }
            else
            {
                Paging.Visible = true;
            }
        }
        else
        {
            SetAttributeGvArticle(0);
            grvNewsGroup.DataSource = null;
            grvNewsGroup.DataBind();
            Paging.Visible = false;
        }

        BindCateNews(Convert.ToInt32(ddlGroupCate.SelectedValue));
    }