示例#1
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "Hesap", "Aktif ASC, KayitTarihi DESC", "1=1"))
     {
         if (!string.IsNullOrEmpty(Request.QueryString["tipi"]))
         {
             data.Where += " AND Tipi=@Tipi";
             data.Parameters.Add("Tipi", Request.QueryString["tipi"], BAYMYO.MultiSQLClient.MSqlDbType.TinyInt);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["aktivasyon"]))
         {
             data.Where += " AND Aktivasyon=@aktivasyon";
             data.Parameters.Add("Aktivasyon", Request.QueryString["aktivasyon"], BAYMYO.MultiSQLClient.MSqlDbType.TinyInt);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["aktif"]))
         {
             data.Where += " AND Aktif=@Aktif";
             data.Parameters.Add("Aktif", Request.QueryString["aktif"], BAYMYO.MultiSQLClient.MSqlDbType.TinyInt);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["adi"]))
         {
             data.Where += " AND Adi Like @Adi";
             data.Parameters.Add("Adi", Request.QueryString["adi"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.TinyInt);
         }
         data.ViewDataCount           = 25;
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
     }
 }
示例#2
0
    private void GetDataPaging()
    {
        using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(rptListe, "Mesaj", "GuncellemeTarihi DESC", "Aktif=1"))
        {
            if (!string.IsNullOrEmpty(Request.QueryString["hspid"]))
            {
                data.Where += " AND HesapID=@HesapID";
                data.Parameters.Add("HesapID", BAYMYO.UI.Converts.NullToGuid(Request.QueryString["hspid"].Replace(',', '-')), BAYMYO.MultiSQLClient.MSqlDbType.UniqueIdentifier);
            }
            if (!string.IsNullOrEmpty(Request.QueryString["q"]))
            {
                data.Where += " AND Konu Like @Konu";
                data.Parameters.Add("Konu", "%" + Request.QueryString["q"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.NVarChar);
            }
            data.ViewDataCount           = 25;
            data.PageNumberTargetControl = pageNumberLiteral;
            data.Binding();

            if (data.TotalDataCount < 1)
            {
                pageNumberLiteral.Visible = true;
                pageNumberLiteral.Text    = MessageBox.IsNotViews();
            }
            else
            {
                jobSet.Visible = (data.TotalPageCount > 1);
            }
        }
    }
示例#3
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "makale", "id desc", "1=1"))
     {
         if (!string.IsNullOrEmpty(Request.QueryString["kid"]))
         {
             ddlKategoriler.SelectedValue = Request.QueryString["kid"];
             data.Where += " and kategoriid=?kategoriid";
             data.Parameters.Add("kategoriid", ddlKategoriler.SelectedValue, BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["onay"]))
         {
             data.Where += " and yoneticionay=?yoneticionay";
             data.Parameters.Add("yoneticionay", Request.QueryString["onay"], BAYMYO.MultiSQLClient.MSqlDbType.Boolean);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["aktif"]))
         {
             data.Where += " or aktif=?aktif";
             data.Parameters.Add("aktif", Request.QueryString["aktif"], BAYMYO.MultiSQLClient.MSqlDbType.Boolean);
         }
         data.ViewDataCount           = 25;
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
         totalCount = string.Format("Toplam <b>{0}</b> makale.", data.TotalDataCount);
     }
 }
示例#4
0
        private void GetDataPaging()
        {
            string query      = "select p.resimurl,p.url,h.tipi,y.* from yorum y left join hesap h on h.mail=y.mail left join profil p on p.id=h.id where ",
                   queryCount = "select count(y.id) from yorum y left join hesap h on h.mail=y.mail left join profil p on p.id=h.id where ";

            switch (IsCommandActive)
            {
            case true:
                query      += "y.yoneticionay=1 and y.modulid=?modulid and y.icerikid=?icerikid order by y.kayittarihi desc";
                queryCount += "y.yoneticionay=1 and y.modulid=?modulid and y.icerikid=?icerikid";
                break;

            default:
                query      += "y.yoneticionay=1 and y.aktif=1 and y.modulid=?modulid and y.icerikid=?icerikid order by y.kayittarihi desc";
                queryCount += "y.yoneticionay=1 and y.aktif=1 and y.modulid=?modulid and y.icerikid=?icerikid";
                break;
            }
            using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(query, queryCount))
            {
                data.ViewDataCount           = 5;
                data.DataTargetControl       = rptComments;
                data.PageNumberTargetControl = pageNumberLiteral;
                data.Parameters.Add("modulid", ModulID, BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
                data.Parameters.Add("icerikid", IcerikID, BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
                data.Binding();
                //ltrOpenComment.Text = "<div class=\"modul-main-box\"><div id=\"comment-top\" class=\"job-set\"><span href=\"#\" class=\"writeOpen left\">" + string.Format("<div class=\"icon left\"></div><strong class=\"left\">Yorum Gönder</strong></span>&nbsp;<span class=\"count right\">{0}</span></div></div>", ((data.TotalDataCount > 0) ? "Toplam (" + data.TotalDataCount + ") adet yorum var." : "Bu içeriğe henüz yorum yapılmamış!"));
                CustomizeControl1.StatusText = ((data.TotalDataCount > 0) ? "Toplam (<b>" + data.TotalDataCount + "</b>) adet yorum var." : "<b>Bu içeriğe ilk siz yorum yapın!</b>");
            }
        }
示例#5
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "firma", "kayittarihi desc", "1=1", 25))
     {
         if (!string.IsNullOrEmpty(Request.QueryString["kid"]))
         {
             ddlKategoriler.SelectedValue = Request.QueryString["kid"];
             data.Where += " and kategoriid=?kategoriid";
             data.Parameters.Add("kategoriid", ddlKategoriler.SelectedValue, BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["onay"]))
         {
             data.Where += " and yoneticionay=?yoneticionay";
             data.Parameters.Add("yoneticionay", Request.QueryString["onay"], BAYMYO.MultiSQLClient.MSqlDbType.Boolean);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["aktif"]))
         {
             data.Where += " or aktif=?aktif";
             data.Parameters.Add("aktif", Request.QueryString["aktif"], BAYMYO.MultiSQLClient.MSqlDbType.Boolean);
         }
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
         totalCount = string.Format("Toplam <b>{0}</b> firma.", data.TotalDataCount);
         if (!string.IsNullOrEmpty(Request.QueryString["onay"]) || !string.IsNullOrEmpty(Request.QueryString["aktif"]))
         {
             if (dataGrid1.Rows.Count <= 0)
             {
                 Response.Redirect("/panel/?go=firmaliste", false);
             }
         }
     }
 }
示例#6
0
    private void GetDataPaging()
    {
        using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(rptListe, "Video", "ID DESC", "HesapID=@HesapID"))
        {
            data.Parameters.Add("HesapID", Settings.CurrentUser().ID, BAYMYO.MultiSQLClient.MSqlDbType.UniqueIdentifier);
            if (!string.IsNullOrEmpty(Request.QueryString["aktif"]))
            {
                data.Where += " AND Aktif=@Aktif";
                data.Parameters.Add("Aktif", Request.QueryString["aktif"], BAYMYO.MultiSQLClient.MSqlDbType.TinyInt);
            }
            data.ViewDataCount           = 25;
            data.PageNumberTargetControl = pageNumberLiteral;
            data.Binding();

            if (data.TotalDataCount < 1)
            {
                pageNumberLiteral.Visible = true;
                pageNumberLiteral.Text    = MessageBox.IsNotViews();
            }
            else
            {
                jobSet.Visible = (data.TotalPageCount > 1);
            }
        }
    }
示例#7
0
        private void GetDataPaging()
        {
            using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(rptListe, "firma", "kayittarihi desc", "yoneticionay=1 and aktif=1"))
            {
                if (!string.IsNullOrEmpty(Request.QueryString["kid"]))
                {
                    data.Where += " and kategoriid=?kategoriid";
                    data.Parameters.Add("kategoriid", Request.QueryString["kid"], BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
                }
                if (!string.IsNullOrEmpty(Request.QueryString["q"]))
                {
                    data.Where += " and baslik like ?baslik";
                    data.Parameters.Add("baslik", "%" + Request.QueryString["q"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
                }
                if (!string.IsNullOrEmpty(Request.QueryString["city"]))
                {
                    data.Where += " and sehir like ?city";
                    data.Parameters.Add("city", "%" + Request.QueryString["city"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
                }
                data.ViewDataCount           = 39;
                data.PageNumberTargetControl = pageNumberLiteral;
                data.Binding();

                if (data.TotalDataCount < 1)
                {
                    pageNumberLiteral.Visible = true;
                    pageNumberLiteral.Text    = MessageBox.IsNotViews();
                }
                else
                {
                    jobSet.Visible = (data.TotalPageCount > 1);
                }
            }
        }
示例#8
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(rptListe, "video", "guncellemetarihi desc", "1=1"))
     {
         if (!string.IsNullOrEmpty(Request.QueryString["kid"]))
         {
             data.Where += " and kategoriid like ?kategoriid";
             data.Parameters.Add("kategoriid", Request.QueryString["kid"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["q"]))
         {
             data.Where += " and baslik like ?baslik ";
             data.Parameters.Add("baslik", "%" + Request.QueryString["q"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.NVarChar);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["t"]))
         {
             data.Where += " and etiket like ?etiket";
             data.Parameters.Add("etiket", "%" + Request.QueryString["t"].Replace('-', '_').Replace('ğ', '_').Replace('ş', '_').Replace('ç', '_').Replace('ü', '_').Replace('ö', '_').Replace('ı', '_') + "%", BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         data.ViewDataCount           = 39;
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
         if (data.TotalDataCount < 1)
         {
             pageNumberLiteral.Visible = true;
             pageNumberLiteral.Text    = MessageBox.IsNotViews();
         }
         else
         {
             jobSet.Visible = (data.TotalPageCount > 1);
         }
     }
 }
示例#9
0
    private void GetDataPaging()
    {
        writeBox.Style.Value = "display: none";
        string query = "SELECT <%#TOP%> dbo.GetProfilResim(Y.Mail) AS ResimUrl, dbo.GetProfilUrl(Y.Mail) AS Url, dbo.GetHesapTipi(Y.Mail) Tipi, Y.* FROM Yorum Y WHERE ", queryCount = "SELECT COUNT(ID) FROM Yorum WHERE ";

        switch (IsCommandActive)
        {
        case true:
            query      += "YoneticiOnay=1 AND ModulID=@ModulID AND IcerikID=@IcerikID ORDER BY KayitTarihi DESC";
            queryCount += "YoneticiOnay=1 AND ModulID=@ModulID AND IcerikID=@IcerikID";
            break;

        default:
            query      += "YoneticiOnay=1 AND Aktif=1 AND ModulID=@ModulID AND IcerikID=@IcerikID ORDER BY KayitTarihi DESC";
            queryCount += "YoneticiOnay=1 AND Aktif=1 AND ModulID=@ModulID AND IcerikID=@IcerikID";
            break;
        }
        using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(query, queryCount))
        {
            data.ViewDataCount           = 5;
            data.DataTargetControl       = rptComments;
            data.PageNumberTargetControl = pageNumberLiteral;
            data.Parameters.Add("ModulID", ModulID, BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
            data.Parameters.Add("IcerikID", IcerikID, BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
            data.Binding();

            ltrOpenComment.Text = "<div id=\"comment-top\" class=\"job-set\"><span href=\"#\" class=\"writeOpen left\">" + string.Format("<div class=\"icon left\"></div><strong class=\"left\">Yorum Ekle</strong></span>&nbsp;<span class=\"count right\">{0}</span></div>", ((data.TotalDataCount > 0) ? "Toplam (" + data.TotalDataCount + ") adet yorum var." : "Bu içeriğe henüz yorum yapılmamış!"));
        }
    }
示例#10
0
    private void GetDataPaging()
    {
        string query = "SELECT <%#TOP%> dbo.GetProfilResim(Y.Mail) AS ResimUrl, dbo.GetProfilUrl(Y.Mail) AS Url, dbo.GetHesapTipi(Y.Mail) Tipi, Y.* FROM Yorum Y WHERE (YoneticiOnay=1%Aktif%) AND (EXISTS(SELECT ID FROM Makale WHERE HesapID=@HesapID) OR EXISTS(SELECT ID FROM Mesaj WHERE HesapID=@HesapID) OR EXISTS(SELECT ID FROM Video WHERE HesapID=@HesapID) OR IcerikID=@Url) ORDER BY Aktif ASC, KayitTarihi DESC", queryCount = "SELECT COUNT(ID) FROM Yorum WHERE (YoneticiOnay=1%Aktif%) AND (EXISTS(SELECT ID FROM Makale WHERE HesapID=@HesapID) OR EXISTS(SELECT ID FROM Mesaj WHERE HesapID=@HesapID) OR EXISTS(SELECT ID FROM Video WHERE HesapID=@HesapID) OR IcerikID=@Url)";

        using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(query, queryCount))
        {
            data.ViewDataCount           = 10;
            data.DataTargetControl       = rptComments;
            data.PageNumberTargetControl = pageNumberLiteral;
            data.Parameters.Add("HesapID", Settings.CurrentUser().ID, BAYMYO.MultiSQLClient.MSqlDbType.UniqueIdentifier);
            data.Parameters.Add("Url", Settings.CurrentUser().ProfilObject.Url, BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
            if (!string.IsNullOrEmpty(Request.QueryString["aktif"]))
            {
                data.CustomDataQuery      = data.CustomDataQuery.Replace("%Aktif%", " AND Aktif=@Aktif");
                data.CustomDataCountQuery = data.CustomDataCountQuery.Replace("%Aktif%", " AND Aktif=@Aktif");
                data.Parameters.Add("Aktif", Request.QueryString["aktif"], BAYMYO.MultiSQLClient.MSqlDbType.TinyInt);
            }
            else
            {
                data.CustomDataQuery      = data.CustomDataQuery.Replace("%Aktif%", "");
                data.CustomDataCountQuery = data.CustomDataCountQuery.Replace("%Aktif%", "");
            }
            data.Binding();

            ltrOpenComment.Text = "<div id=\"comment-top\" class=\"job-set\"><span href=\"#\" class=\"writeOpen left\">" + string.Format("<div class=\"icon left\"></div><strong class=\"left\">İçeriklerinize Yapılan Yorumlar</strong></span>&nbsp;<span class=\"count right\">{0}</span></div>", ((data.TotalDataCount > 0) ? "Toplam (" + data.TotalDataCount + ") adet yorumum var." : "Henüz içeriklerinize yorum yapılmamış!"));
        }
    }
示例#11
0
    private void GetDataPaging()
    {
        using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(
                   "SELECT <%#TOP%> Haber.ID, Haber.KategoriID, Kategori.Adi AS KategoriAdi, Haber.ResimUrl, Haber.Baslik, Haber.Ozet, Haber.KayitTarihi, Haber.Aktif FROM Haber INNER JOIN Kategori ON Haber.KategoriID = Kategori.ID",
                   "SELECT COUNT(Haber.ID) FROM Haber INNER JOIN Kategori ON Haber.KategoriID = Kategori.ID"))
        {
            data.CustomDataQuery      += " WHERE Kategori.ModulID='haber' AND Haber.Aktif=1";
            data.CustomDataCountQuery += " WHERE Kategori.ModulID='haber' AND Haber.Aktif=1";
            if (!string.IsNullOrEmpty(Request.QueryString["kid"]))
            {
                data.Where += " AND KategoriID Like @KategoriID";
                data.Parameters.Add("KategoriID", Request.QueryString["kid"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.Int32);
            }
            if (!string.IsNullOrEmpty(Request.QueryString["q"]))
            {
                data.Where += " AND Baslik Like @Baslik";
                data.Parameters.Add("Baslik", "%" + Request.QueryString["q"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.NVarChar);
            }
            data.ViewDataCount           = 25;
            data.PageNumberTargetControl = pageNumberLiteral;
            data.Binding();

            if (data.TotalDataCount < 1)
            {
                pageNumberLiteral.Visible = true;
                pageNumberLiteral.Text    = MessageBox.IsNotViews();
            }
            else
            {
                jobSet.Visible = (data.TotalPageCount > 1);
            }
        }
    }
示例#12
0
    private void GetDataPaging()
    {
        using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(rptListe, "Randevu", "TarihSaat DESC", "YoneticiOnay=1 AND HesapID=@HesapID"))
        {
            data.Parameters.Add("HesapID", BAYMYO.UI.Converts.NullToGuid(Settings.CurrentUser().ID), BAYMYO.MultiSQLClient.MSqlDbType.UniqueIdentifier);
            if (!string.IsNullOrEmpty(Request.QueryString["durum"]))
            {
                data.Where += " AND Durum=@Durum";
                data.Parameters.Add("Durum", BAYMYO.UI.Converts.NullToByte(Request.QueryString["durum"]), BAYMYO.MultiSQLClient.MSqlDbType.TinyInt);
            }
            data.PageNumberTargetControl = pageNumberLiteral;
            data.ViewDataCount           = 25;
            data.Binding();

            if (data.TotalDataCount < 1)
            {
                pageNumberLiteral.Visible = true;
                pageNumberLiteral.Text    = MessageBox.IsNotViews();
            }
            else
            {
                jobSet.Visible = (data.TotalPageCount > 1);
            }

            ltrOpenComment.Text = string.Format("<h1 class=\"mmb-Title\"><span class=\"left\">Randevu Talepleri</span>&nbsp;<span class=\"count right\">{0}</span></h1>", ((data.TotalDataCount > 0) ? "Toplam (" + data.TotalDataCount + ") adet randevu var." : ""));
        }
    }
示例#13
0
    private void GetDataPaging(string tableName)
    {
        using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(rptListe, tableName, "KayitTarihi DESC", "1=1"))
        {
            if (!string.IsNullOrEmpty(Request.QueryString["q"]))
            {
                data.Where += " AND AdiSoyadi Like @Adi";
                data.Parameters.Add("Adi", "%" + Request.QueryString["q"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.NVarChar);
            }
            if (!string.IsNullOrEmpty(Request.QueryString["city"]))
            {
                data.Where += " AND Sehir=@city";
                data.Parameters.Add("city", Request.QueryString["city"].ToUpper().Trim(), BAYMYO.MultiSQLClient.MSqlDbType.NVarChar);
            }
            data.ViewDataCount           = 26;
            data.PageNumberTargetControl = pageNumberLiteral;
            data.Binding();

            if (data.TotalDataCount < 1)
            {
                pageNumberLiteral.Visible = true;
                pageNumberLiteral.Text    = MessageBox.IsNotViews();
            }
            else
            {
                jobSet.Visible = (data.TotalPageCount > 1);
            }
        }
    }
示例#14
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "hesap", "aktif asc, kayittarihi desc", "1=1"))
     {
         if (!string.IsNullOrEmpty(Request.QueryString["tipi"]))
         {
             data.Where += " and tipi=?tipi";
             data.Parameters.Add("tipi", Request.QueryString["tipi"], BAYMYO.MultiSQLClient.MSqlDbType.TinyInt);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["aktivasyon"]))
         {
             data.Where += " or aktivasyon=?aktivasyon";
             data.Parameters.Add("aktivasyon", Request.QueryString["aktivasyon"], BAYMYO.MultiSQLClient.MSqlDbType.Boolean);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["aktif"]))
         {
             data.Where += " or aktif=?aktif";
             data.Parameters.Add("aktif", Request.QueryString["aktif"], BAYMYO.MultiSQLClient.MSqlDbType.Boolean);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["adi"]))
         {
             data.Where += " or adi like ?adi";
             data.Parameters.Add("adi", Request.QueryString["adi"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         data.ViewDataCount           = 26;
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
     }
 }
示例#15
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "sayfa", "id desc"))
     {
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
     }
 }
示例#16
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "Makale", "ID DESC"))
     {
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
     }
 }
示例#17
0
 private void GetDataPaging(object id)
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "galeri", "kayittarihi asc", "albumid=?albumid", 5))
     {
         data.Parameters.Add("albumid", BAYMYO.UI.Converts.NullToInt64(id));
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
         jopSet.Visible = (dataGrid1.Rows.Count > 0);
     }
 }
示例#18
0
    private void GetDataPaging()
    {
        using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(rptComments, "Yorum", "KayitTarihi DESC", "Mail=@Mail"))
        {
            data.PageNumberTargetControl = pageNumberLiteral;
            data.Parameters.Add("Mail", Settings.CurrentUser().Mail, BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
            data.Binding();

            ltrOpenComment.Text = "<div id=\"comment-top\" class=\"job-set\"><span href=\"#\" class=\"writeOpen left\">" + string.Format("<div class=\"icon left\"></div><strong class=\"left\">Tüm Yorumlarım</strong></span>&nbsp;<span class=\"count right\">{0}</span></div>", ((data.TotalDataCount > 0) ? "Toplam (" + data.TotalDataCount + ") adet yorumum var." : "Henüz hiçbir içeriğe yorum yapmamışsınız!"));
        }
    }
示例#19
0
 private void GetDataPaging()
 {
     //new BAYMYO.UI.Web.DataPagers(rptListe, "Makale", "kayittarihi desc", "aktif=1"))
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(
                "select m.id, m.hesapid,p.url, m.kategoriid, m.resimurl, m.baslik, m.ozet, m.kayittarihi, m.aktif, h.adi, h.soyadi from makale m inner join hesap h on h.id=m.hesapid inner join profil p on p.id=h.id ",
                "select count(m.id) from makale m inner join hesap h on h.id=m.hesapid inner join profil p on p.id=h.id"))
     {
         data.CustomDataQuery      += " where m.yoneticionay=1 and m.aktif=1";
         data.CustomDataCountQuery += " where m.yoneticionay=1 and m.aktif=1";
         if (!string.IsNullOrEmpty(Request.QueryString["hspid"]))
         {
             data.CustomDataQuery      += " and m.hesapid=?hesapid";
             data.CustomDataCountQuery += " and m.hesapid=?hesapid";
             data.Parameters.Add("hesapid", BAYMYO.UI.Converts.NullToGuidString(Request.QueryString["hspid"]), BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["url"]))
         {
             data.CustomDataQuery      += " and p.url=?url";
             data.CustomDataCountQuery += " and p.url=?url";
             data.Parameters.Add("url", Request.QueryString["url"], BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["kid"]))
         {
             data.CustomDataQuery      += " and m.kategoriid Like ?kategoriid";
             data.CustomDataCountQuery += " and m.kategoriid Like ?kategoriid";
             data.Parameters.Add("kategoriid", Request.QueryString["kid"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["q"]))
         {
             data.CustomDataQuery      += " and m.baslik like ?baslik";
             data.CustomDataCountQuery += " and m.baslik like ?baslik";
             data.Parameters.Add("baslik", "%" + Request.QueryString["q"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["t"]))
         {
             data.CustomDataQuery      += " and m.etiket Like ?etiket";
             data.CustomDataCountQuery += " and m.etiket Like ?etiket";
             data.Parameters.Add("etiket", "%" + Request.QueryString["t"].Replace('-', '_').Replace('ğ', '_').Replace('ş', '_').Replace('ç', '_').Replace('ü', '_').Replace('ö', '_').Replace('ı', '_') + "%", BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         //<%#TOP%> Limitler arası süzme yapılmasını sağlar...
         data.CustomDataQuery        += " order by m.guncellemetarihi desc";
         data.ViewDataCount           = 16;
         data.DataTargetControl       = dataGrid1;
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
         totalCount = string.Format("Toplam <b>{0}</b> makale.", data.TotalDataCount);
         if (data.TotalDataCount < 1)
         {
             pageNumberLiteral.Visible = true;
             pageNumberLiteral.Text    = MessageBox.IsNotViews();
         }
     }
 }
示例#20
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "haber", "kayittarihi desc", "aktif=1 and yoneticionay=1", 25))
     {
         if (!string.IsNullOrEmpty(Request.QueryString["kid"]))
         {
             ddlKategoriler.SelectedValue = Request.QueryString["kid"];
             data.Where += " and kategoriid=?kategoriid";
             data.Parameters.Add("kategoriid", ddlKategoriler.SelectedValue, BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
         totalCount = string.Format("Toplam <b>{0}</b> haber.", data.TotalDataCount);
     }
 }
示例#21
0
        private void View(Album m)
        {
            CommentControl1.IsCommandActive = BAYMYO.UI.Converts.NullToGuidString(Core.CurrentUser.ID).Equals(m.HesapID);
            CommentControl1.Visible         = m.Yorum;
            CommentControl1.ModulID         = "galeri";
            CommentControl1.IcerikID        = m.ID.ToString();
            //Icerik Bilgisi
            if (!BAYMYO.UI.Converts.NullToString(KategoriBilgi.ModulID).Equals("galeri") || !BAYMYO.UI.Converts.NullToString(KategoriBilgi.ID).Equals(m.KategoriID))
            {
                KategoriBilgi = KategoriMethods.GetKategori("galeri", m.KategoriID);
            }
            if (KategoriBilgi.Aktif)
            {
                this.Page.Title += " | " + KategoriBilgi.Adi.ToUpper(); //+ " | " + Settings.Site.Title + " | " + m.Etiket;
            }
            Etiketler = "";
            string etiketQuery = string.Empty;

            foreach (string item in m.Etiket.Split(','))
            {
                Etiketler   += string.Format("<a href=\"{0}{1}\" target=\"_blank\"><strong>{2}</strong></a>, ", Settings.SiteUrl.Replace("http:", ""), Core.CreateLink("galerietiket", "", item), item.Trim());
                etiketQuery += " or i.yoneticionay=1 and i.aktif=1 and i.etiket like <%USTENTIRNAK%>%" + item.Trim() + ",%<%USTENTIRNAK%>";
            }
            if (!BAYMYO.UI.Converts.NullToString(Session["etiketSession"]).Equals(etiketQuery))
            {
                Session["etiketSession"] = etiketQuery;
            }

            using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(rptListe, "galeri", "kayittarihi asc", "albumid=?albumid", 1))
            {
                data.Parameters.Add("albumid", m.ID, BAYMYO.MultiSQLClient.MSqlDbType.BigInt);
                data.PageNumberTargetControl = pageNumberLiteral;
                data.Binding();
                SayfaURL = (data.CurrentPage >= data.LastPage) ? "/galeriler" : "/?go=galerigoster&mdl=galeri&raid=" + m.ID + "&pno=" + data.NextPage + "#titleBox";
                if (data.TotalDataCount < 1)
                {
                    pageNumberLiteral.Visible = true;
                    pageNumberLiteral.Text    = MessageBox.IsNotViews();
                }
                else
                {
                    jobSet.Visible = (data.TotalPageCount > 1);
                }
            }
        }
示例#22
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "mesaj", "kayittarihi desc", "1=1"))
     {
         if (!string.IsNullOrEmpty(Request.QueryString["onay"]))
         {
             data.Where += " and yoneticionay=?yoneticionay";
             data.Parameters.Add("yoneticionay", Request.QueryString["onay"], BAYMYO.MultiSQLClient.MSqlDbType.Boolean);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["aktif"]))
         {
             data.Where += " and aktif=?aktif";
             data.Parameters.Add("aktif", Request.QueryString["aktif"], BAYMYO.MultiSQLClient.MSqlDbType.Boolean);
         }
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
     }
 }
示例#23
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "Mesaj", "KayitTarihi DESC", "1=1"))
     {
         if (!string.IsNullOrEmpty(Request.QueryString["onay"]))
         {
             data.Where += " AND YoneticiOnay=@YoneticiOnay";
             data.Parameters.Add("YoneticiOnay", Request.QueryString["onay"], BAYMYO.MultiSQLClient.MSqlDbType.TinyInt);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["aktif"]))
         {
             data.Where += " AND Aktif=@Aktif";
             data.Parameters.Add("Aktif", Request.QueryString["aktif"], BAYMYO.MultiSQLClient.MSqlDbType.TinyInt);
         }
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
     }
 }
示例#24
0
    private void GetDataPaging()
    {
        //new BAYMYO.UI.Web.DataPagers(rptListe, "Makale", "KayitTarihi DESC", "Aktif=1"))
        using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(
                   "SELECT <%#TOP%> Makale.ID, Makale.HesapID, Makale.KategoriID, Makale.ResimUrl, Makale.Baslik, Makale.Ozet, Makale.KayitTarihi, Makale.Aktif, Hesap.Adi, Hesap.Soyadi FROM Makale INNER JOIN Hesap ON Makale.HesapID = Hesap.ID",
                   "SELECT COUNT(Makale.ID) FROM Makale INNER JOIN Hesap ON Makale.HesapID = Hesap.ID"))
        {
            data.CustomDataQuery      += " WHERE Makale.Aktif=1";
            data.CustomDataCountQuery += " WHERE Makale.Aktif=1";
            if (!string.IsNullOrEmpty(Request.QueryString["hspid"]))
            {
                data.CustomDataQuery      += " AND Makale.HesapID=@HesapID";
                data.CustomDataCountQuery += " AND Makale.HesapID=@HesapID";
                data.Parameters.Add("HesapID", BAYMYO.UI.Converts.NullToGuid(Request.QueryString["hspid"]), BAYMYO.MultiSQLClient.MSqlDbType.UniqueIdentifier);
            }
            if (!string.IsNullOrEmpty(Request.QueryString["kid"]))
            {
                data.CustomDataQuery      += " AND Makale.KategoriID Like @KategoriID";
                data.CustomDataCountQuery += " AND Makale.KategoriID Like @KategoriID";
                data.Parameters.Add("KategoriID", Request.QueryString["kid"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.Int32);
            }
            if (!string.IsNullOrEmpty(Request.QueryString["q"]))
            {
                data.CustomDataQuery      += " AND Makale.Baslik Like @Baslik";
                data.CustomDataCountQuery += " AND Makale.Baslik Like @Baslik";
                data.Parameters.Add("Baslik", "%" + Request.QueryString["q"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.NVarChar);
            }
            data.CustomDataQuery        += " ORDER BY KayitTarihi DESC";
            data.DataTargetControl       = rptListe;
            data.PageNumberTargetControl = pageNumberLiteral;
            data.ViewDataCount           = 25;
            data.Binding();

            if (data.TotalDataCount < 1)
            {
                pageNumberLiteral.Visible = true;
                pageNumberLiteral.Text    = MessageBox.IsNotViews();
            }
            else
            {
                jobSet.Visible = (data.TotalPageCount > 1);
            }
        }
    }
示例#25
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "Randevu", "TarihSaat DESC", "1=1"))
     {
         if (!string.IsNullOrEmpty(Request.QueryString["durum"]))
         {
             data.Where += " AND Durum=@Durum";
             data.Parameters.Add("Durum", BAYMYO.UI.Converts.NullToByte(Request.QueryString["durum"]), BAYMYO.MultiSQLClient.MSqlDbType.TinyInt);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["onay"]))
         {
             data.Where += " AND YoneticiOnay=@YoneticiOnay";
             data.Parameters.Add("YoneticiOnay", BAYMYO.UI.Converts.NullToBool(Request.QueryString["onay"]), BAYMYO.MultiSQLClient.MSqlDbType.Bit);
         }
         data.PageNumberTargetControl = pageNumberLiteral;
         data.ViewDataCount           = 25;
         data.Binding();
     }
 }
示例#26
0
        private void GetDataPaging()
        {
            using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(
                       "select g.id as resimid,g.resimurl,a.id,a.adi,a.kayittarihi from album a inner join galeri g on g.albumid=a.id and g.kapak=1 where a.yoneticionay=1 and a.aktif=1"
                       , "select count(a.id) from album a inner join galeri g on g.albumid=a.id and g.kapak=1 where a.yoneticionay=1 and a.aktif=1"))
            {
                if (!string.IsNullOrEmpty(Request.QueryString["kid"]))
                {
                    data.CustomDataQuery      += " and a.kategoriid like ?kategoriid";
                    data.CustomDataCountQuery += " and a.kategoriid like ?kategoriid";
                    data.Parameters.Add("kategoriid", Request.QueryString["kid"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
                }
                if (!string.IsNullOrEmpty(Request.QueryString["q"]))
                {
                    data.CustomDataQuery      += " and a.adi like ?adi ";
                    data.CustomDataCountQuery += " and a.adi like ?adi ";
                    data.Parameters.Add("adi", "%" + Request.QueryString["q"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.NVarChar);
                }
                if (!string.IsNullOrEmpty(Request.QueryString["t"]))
                {
                    data.CustomDataQuery      += " and a.etiket like ?etiket";
                    data.CustomDataCountQuery += " and a.etiket like ?etiket";
                    data.Parameters.Add("etiket", "%" + Request.QueryString["t"].Replace('-', '_').Replace('ğ', '_').Replace('ş', '_').Replace('ç', '_').Replace('ü', '_').Replace('ö', '_').Replace('ı', '_') + "%", BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
                }

                data.CustomDataQuery        += " order by a.guncellemetarihi desc";
                data.ViewDataCount           = 39;
                data.DataTargetControl       = rptListe;
                data.PageNumberTargetControl = pageNumberLiteral;
                data.Binding();

                if (data.TotalDataCount < 1)
                {
                    pageNumberLiteral.Visible = true;
                    pageNumberLiteral.Text    = MessageBox.IsNotViews();
                }
                else
                {
                    jobSet.Visible = (data.TotalPageCount > 1);
                }
            }
        }
示例#27
0
 void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(dataGrid1, "manset", "guncellemetarihi desc", "1=1", 20))
     {
         if (!string.IsNullOrEmpty(Request.QueryString["mdl"]))
         {
             ddlKategoriler.SelectedValue = Request.QueryString["mdl"];
             data.Where += " and modulid=?modulid";
             data.Parameters.Add("modulid", Request.QueryString["mdl"], BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["y"]))
         {
             data.Where += " and yerlesim=?yerlesim";
             data.Parameters.Add("yerlesim", Request.QueryString["y"], BAYMYO.MultiSQLClient.MSqlDbType.Byte);
         }
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
         totalCount = string.Format("Toplam <b>{0}</b> haber.", data.TotalDataCount);
     }
 }
示例#28
0
    private void GetDataPaging()
    {
        using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(rptListe, "Makale", "KayitTarihi DESC", "HesapID=@HesapID"))
        {
            data.Parameters.Add("HesapID", Settings.CurrentUser().ID, BAYMYO.MultiSQLClient.MSqlDbType.UniqueIdentifier);
            data.ViewDataCount           = 25;
            data.PageNumberTargetControl = pageNumberLiteral;
            data.Binding();

            if (data.TotalDataCount < 1)
            {
                pageNumberLiteral.Visible = true;
                pageNumberLiteral.Text    = MessageBox.IsNotViews();
            }
            else
            {
                jobSet.Visible = (data.TotalPageCount > 1);
            }
        }
    }
示例#29
0
 private void GetDataPaging()
 {
     using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(
                "select g.id as resimid, g.resimurl,a.id,a.adi,a.kayittarihi,a.aktif from album a left join galeri g on g.albumid=a.id and g.kapak=1"
                , "select count(a.id) from album a left join galeri g on g.albumid=a.id and g.kapak=1"))
     {
         if (!string.IsNullOrEmpty(Request.QueryString["kid"]))
         {
             ddlKategoriler.SelectedValue = Request.QueryString["kid"];
             data.CustomDataQuery        += " where kategoriid=?kategoriid";
             data.CustomDataCountQuery   += " where kategoriid=?kategoriid";
             data.Parameters.Add("kategoriid", ddlKategoriler.SelectedValue, BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
         }
         data.CustomDataQuery        += " order by a.guncellemetarihi desc";
         data.ViewDataCount           = 25;
         data.DataTargetControl       = dataGrid1;
         data.PageNumberTargetControl = pageNumberLiteral;
         data.Binding();
         totalCount = string.Format("Toplam <b>{0}</b> albüm.", data.TotalDataCount);
     }
 }
示例#30
0
        void GetDataPaging()
        {
            using (BAYMYO.UI.Web.DataPagers data = new BAYMYO.UI.Web.DataPagers(
                       "select p.url as url,p.resimurl as resimurl,p.sehir as sehir,mk.adi as meslek,h.id,h.adi as adi,h.soyadi as soyadi,h.kayittarihi as kayittarihi from hesap h inner join profil p on h.id=p.id inner join kategori mk on mk.modulid='meslek' and mk.id=p.meslek where h.tipi=2 and h.aktif=1 and h.aktivasyon=1 and p.resimurl<>'' "
                       , "select count(h.id) As totalcount from hesap h inner join profil p on h.id=p.id inner join kategori mk on mk.modulid='meslek' and mk.id=p.meslek where h.aktif=1 and h.aktivasyon=1 and p.resimurl<>'' "))
            {
                if (!string.IsNullOrEmpty(Request.QueryString["q"]))
                {
                    data.CustomDataQuery      += " and h.adi like ?adi";
                    data.CustomDataCountQuery += " and h.adi like ?adi";
                    data.Parameters.Add("adi", "%" + Request.QueryString["q"] + "%", BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
                }
                if (!string.IsNullOrEmpty(Request.QueryString["city"]))
                {
                    data.CustomDataQuery      += " and p.sehir=?city";
                    data.CustomDataCountQuery += " and p.sehir=?city";
                    data.Parameters.Add("city", Request.QueryString["city"].ToUpper().Trim(), BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
                }
                if (!string.IsNullOrEmpty(Request.QueryString["job"]))
                {
                    data.CustomDataQuery      += " and p.meslek=?job";
                    data.CustomDataCountQuery += " and p.meslek=?job";
                    data.Parameters.Add("job", Request.QueryString["job"].ToUpper().Trim(), BAYMYO.MultiSQLClient.MSqlDbType.VarChar);
                }

                //<%#TOP%> Limitler arası süzme yapılmasını sağlar...
                data.CustomDataQuery        += " order by h.kayittarihi desc";
                data.DataTargetControl       = rptListe;
                data.PageNumberTargetControl = pageNumberLiteral;
                data.ViewDataCount           = 40;
                data.Binding();

                if (data.TotalDataCount < 1)
                {
                    pageNumberLiteral.Visible = true;
                    pageNumberLiteral.Text    = MessageBox.IsNotViews();
                }
            }
        }