Exemple #1
0
        public static Category GetCategory(string pid)
        {
            Category rv = new Category();

            using (Kategori k = KategoriMethods.GetKategori("haber", pid))
            {
                if (!string.IsNullOrEmpty(k.ID))
                {
                    rv.ID       = k.ID;
                    rv.Color    = k.Renk;
                    rv.Value    = k.Adi;
                    rv.IsActive = true;
                }
                else
                {
                    rv.ID       = "00000";
                    rv.Color    = rv.Value = string.Empty;
                    rv.IsActive = false;
                }
            }
            return(rv);
        }
Exemple #2
0
        public static List <jSonObject> GetDoktorlar(byte limit)
        {
            List <jSonObject> rv = new List <jSonObject>();

            if (limit > 40)
            {
                return(rv);
            }
            using (HesapCollection hesaplar = HesapMethods.GetSelect("select * from hesap h where h.tipi=2 and h.aktivasyon=1 and h.aktif=1 order by h.tipi asc limit " + limit, true))
            {
                foreach (Hesap h in hesaplar)
                {
                    rv.Add(new jSonObject {
                        ID = h.ID.ToString(), Resim = h.ProfilObject.ResimUrl, Link = h.ProfilObject.Url, Baslik = KategoriMethods.GetKategori("meslek", h.ProfilObject.Meslek).Adi + " " + h.Adi + " " + h.Soyadi, Tarih = h.KayitTarihi.ToShortDateString()
                    });
                }
                hesaplar.Clear();
            }
            return(rv);
        }