Esempio n. 1
0
        ///<summary>
        /// Hesap Data PrimaryKey
        ///</summary>
        public static Hesap GetHesap(System.String pid)
        {
            Hesap rvHesap = new Hesap();

            using (MConnection conneciton = new MConnection(MClientProvider.MySQL))
            {
                switch (conneciton.State)
                {
                case System.Data.ConnectionState.Closed:
                    conneciton.Open();
                    break;
                }
                using (MCommand cmd = new MCommand(CommandType.Text, "select * from hesap where id=?id limit 1", conneciton))
                {
                    cmd.Parameters.Add("id", pid, MSqlDbType.VarChar);
                    using (IDataReader IDR = cmd.ExecuteReader())
                    {
                        while (IDR.Read())
                        {
                            rvHesap = new Hesap(MConvert.NullToGuidString(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 = ProfilMethods.GetProfil(rvHesap.ID);
            }
            return(rvHesap);
        }
Esempio n. 2
0
 public Hesap(System.String pid, string pip, string padi, string psoyadi, string pmail, string psifre, string proller, string ponaykodu, DateTime pdogumtarihi, DateTime pkayittarihi, byte pcinsiyet, byte ptipi, bool pyorum, bool pabonelik, bool paktivasyon, bool paktif, bool isprofilobject)
 {
     this.m_ID          = pid;
     this.m_IP          = pip;
     this.m_Adi         = padi;
     this.m_Soyadi      = psoyadi;
     this.m_Mail        = pmail;
     this.m_Sifre       = psifre;
     this.m_Roller      = proller;
     this.m_OnayKodu    = ponaykodu;
     this.m_DogumTarihi = pdogumtarihi;
     this.m_KayitTarihi = pkayittarihi;
     this.m_Cinsiyet    = Core.GetSexType(pcinsiyet);
     this.m_Tipi        = Core.GetAccountType(ptipi);
     this.m_Yorum       = pyorum;
     this.m_Abonelik    = pabonelik;
     this.m_Aktivasyon  = paktivasyon;
     this.m_Aktif       = paktif;
     switch (isprofilobject)
     {
     case true:
         this.m_ProfilObject = ProfilMethods.GetProfil(this.m_ID);
         break;
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Hesap Getir
        /// </summary>
        public static Hesap GetHesap(CommandType cmdType, string sqlQuery, MParameterCollection parameters)
        {
            Hesap rvHesap = new Hesap();

            using (MConnection conneciton = new MConnection(MClientProvider.MySQL))
            {
                switch (conneciton.State)
                {
                case System.Data.ConnectionState.Closed:
                    conneciton.Open();
                    break;
                }
                using (MCommand cmd = new MCommand(cmdType, sqlQuery, conneciton))
                {
                    if (parameters != null)
                    {
                        foreach (MParameter item in parameters)
                        {
                            cmd.Parameters.Add(item);
                        }
                    }
                    using (IDataReader IDR = cmd.ExecuteReader())
                    {
                        while (IDR.Read())
                        {
                            rvHesap = new Hesap(MConvert.NullToGuidString(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 = ProfilMethods.GetProfil(rvHesap.ID);
            }
            return(rvHesap);
        }