Esempio n. 1
0
        public static Hesap GetHesap(string pUrl)
        {
            Hesap  rvHesap    = new Hesap();
            Profil tempProfil = ProfilMethods.GetProfil(pUrl);

            if (tempProfil != null)
            {
                using (MConnection conneciton = new MConnection(MClientProvider.MSSQL))
                {
                    switch (conneciton.State)
                    {
                    case System.Data.ConnectionState.Closed:
                        conneciton.Open();
                        break;
                    }
                    using (MCommand cmd = new MCommand(CommandType.Text, "SELECT TOP(1) * FROM Hesap WHERE ID=@ID", conneciton))
                    {
                        cmd.Parameters.Add("ID", tempProfil.ID, MSqlDbType.UniqueIdentifier);
                        using (IDataReader IDR = cmd.ExecuteReader())
                        {
                            while (IDR.Read())
                            {
                                rvHesap = new Hesap(MConvert.NullToGuid(IDR["ID"]), MConvert.NullToString(IDR["IP"]), MConvert.NullToString(IDR["Adi"]), MConvert.NullToString(IDR["Soyadi"]), MConvert.NullToString(IDR["Mail"]), MConvert.NullToString(IDR["Sifre"]), MConvert.NullToString(IDR["Roller"]), MConvert.NullToString(IDR["OnayKodu"]), MConvert.NullToDateTime(IDR["DogumTarihi"]), MConvert.NullToDateTime(IDR["KayitTarihi"]), MConvert.NullToByte(IDR["Cinsiyet"]), MConvert.NullToByte(IDR["Tipi"]), MConvert.NullToBool(IDR["Yorum"]), MConvert.NullToBool(IDR["Abonelik"]), MConvert.NullToBool(IDR["Aktivasyon"]), MConvert.NullToBool(IDR["Aktif"]));
                            }
                            IDR.Close();
                        }
                    }
                    switch (conneciton.State)
                    {
                    case System.Data.ConnectionState.Open:
                        conneciton.Close();
                        break;
                    }
                }
            }
            rvHesap.ProfilObject = tempProfil;
            return(rvHesap);
        }
Esempio n. 2
0
 public void Remove(Profil obj)
 {
     this.List.Remove(obj);
 }
Esempio n. 3
0
 public int IndexOf(Profil obj)
 {
     return(this.List.IndexOf(obj));
 }
Esempio n. 4
0
 public bool Contains(Profil obj)
 {
     return(this.List.Contains(obj));
 }
Esempio n. 5
0
 public void Insert(int index, Profil obj)
 {
     this.List.Insert(index, obj);
 }
Esempio n. 6
0
 public int Add(Profil obj)
 {
     return(this.List.Add(obj));
 }