Beispiel #1
0
        public static Humor LoadByName(string tipo)
        {
            DataSet ds = ExecuteQuery("SELECT * FROM THumor WHERE Designacao='" + tipo + "'");
            Humor av = new Humor(ds.Tables[0].Rows[0]);

            return av;
        }
Beispiel #2
0
 public Perfil(int id, string uID, string Name, string Nick, DateTime dataNasc, string morada, int tlm, string lk, string fb, Humor humor, string avatar, int x, int y)
 {
     this.myID = id;
     this._userID = uID;
     this._name = Name;
     this._nick = Nick;
     this._datanasc = dataNasc;
     this._morada = morada;
     this._tlm = tlm;
     this._lk = lk;
     this._fb = fb;
     this._humor = humor;
     this._avatar = avatar;
     this._x = x;
     this._y = y;
 }
Beispiel #3
0
        public Perfil(string uid)
        {
            this._userID= uid;

            this._name = "";
            this._nick = "";
            this._datanasc = DateTime.Today.Date;
            this._morada = "";
            this._tlm = 0;
            this._lk = "";
            this._fb = "";
            this._humor = Rede.Humor.LoadById(2);
            this._avatar = "";
            this._x = 1;
            this._y = 2;
        }
Beispiel #4
0
        public Perfil(string uid, string nm)
        {
            this._userID = uid;

            this._name = nm;
            this._nick = "";
            string date = "01/08/1900";
            this._datanasc = Convert.ToDateTime(date);
            this._morada = "";
            this._tlm = 0;
            this._lk = "";
            this._fb = "";
            this._humor = Rede.Humor.LoadById(2);
            this._avatar = "";
            this._avatar3D = "";
            int[] v = new int[2];
            v = atribuirCoord();
            this._x = v[0];
            this._y = v[1];
            this._premium = false;
        }
Beispiel #5
0
        public static IList LoadAll()
        {
            try
            {
                DataSet ds = ExecuteQuery(GetConnection(false), "SELECT * from THumor");

                IList ret = new ArrayList();

                foreach (DataRow r in ds.Tables[0].Rows)
                {
                    Humor hm = new Humor(r);
                    ret.Add(hm);

                }

                return ret;
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Erro BD", ex);
            }
        }
Beispiel #6
0
 protected Perfil(DataRow row)
 {
     this.myID = (int)row["ProfileID"];
     this._userID = (string)row["UserID"];
     this._name = (string)row["Nome"];
     this._nick = (string)row["Nick"];
     this._morada = (string)row["Morada"];
     this._datanasc = (DateTime)row["DataNascimento"];
     this._tlm = (int)row["Telemovel"];
     this._fb = (string)row["Facebook"];
     this._lk = (string)row["Linkedin"];
     this._avatar3D = (string)row["Avatar3D"];
     this._avatar = (string)row["Avatar"];
     this._humor = Humor.LoadById((int)row["HumorID"]);
     this._x = (int)row["X"];
     this._y = (int)row["Y"];
     this._premium = (bool)row["Premium"];
 }