Пример #1
0
    private void LoadData()
    {
        gridHelper.ClearDataTable();
        string query = "select Forums.*, Symbol, Communities.Name as CommunityName from Forums left join Statuses on Statuses.Id=Status left join Communities on Communities.Id=CommunityId";

        using (GmConnection conn = Global.CreateConnection())
        {
            conn.Fill(gridHelper.DataTable, query);
        }
        gridHelper.DataTable.DefaultView.Sort = "CommunityId, Id";
    }
    private void LoadData()
    {
        gridHelper.ClearDataTable();
        string query = "select Galleries.*, Symbol from Galleries left join Statuses on Statuses.Id=Status";

        using (GmConnection conn = Global.CreateConnection())
        {
            conn.Fill(gridHelper.DataTable, query);
        }
        gridHelper.DataTable.DefaultView.Sort = "Name";
    }
    private void LoadData()
    {
        gridHelper.ClearDataTable();
        string query = "select * from LinkExchange";

        using (GmConnection conn = Global.CreateConnection())
        {
            conn.Fill(gridHelper.DataTable, query);
        }
        gridHelper.DataTable.DefaultView.Sort = "Id";
    }
Пример #4
0
    private void UpdateGrid()
    {
        gridHelper.ClearDataTable();
        int    communityId = RequestUtils.GetCommunityId(this);
        string query       = "select Polls.*, Symbol from Polls left join Statuses on Statuses.Id=Status";

        using (GmConnection conn = Global.CreateConnection())
        {
            conn.Fill(gridHelper.DataTable, query);
        }
        gridHelper.DataTable.DefaultView.Sort = "Id";
    }
Пример #5
0
    private void UpdateGrid()
    {
        gridHelper.ClearDataTable();

        LogType lt    = (LogType)int.Parse(ddlLogType.SelectedValue);
        string  query = string.Format("select * from [Log] where LogTypeId={0}", (int)lt);

        using (GmConnection conn = Global.CreateConnection())
        {
            conn.Fill(gridHelper.DataTable, query);
        }
        gridHelper.DataTable.DefaultView.Sort = "Time desc";
    }
Пример #6
0
    private void LoadData()
    {
        int forumId = RequestUtils.GetForumId(this);

        hlAdd.NavigateUrl += "?fr=" + forumId;
        gridHelper.ClearDataTable();
        string query = "select ForumTopics.*, Symbol from ForumTopics left join Statuses on Statuses.Id=Status where ForumId=" + forumId;

        using (GmConnection conn = Global.CreateConnection())
        {
            conn.Fill(gridHelper.DataTable, query);
        }
        gridHelper.DataTable.DefaultView.Sort = "Id desc";
    }
    private void LoadData()
    {
        gridHelper.ClearDataTable();
        int gl = RequestUtils.GetGalleryId(this);

        hlAdd.NavigateUrl += "?gl=" + gl;
        string query = "select GalleryImages.*, Symbol from GalleryImages left join Statuses on Statuses.Id=Status";

        query += " where GalleryId=" + gl.ToString();
        using (GmConnection conn = Global.CreateConnection())
        {
            conn.Fill(gridHelper.DataTable, query);
        }
        gridHelper.DataTable.DefaultView.Sort = "Name";
    }