示例#1
0
文件: Humor.cs 项目: Dyox/LAPRV
        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;
        }
示例#2
0
文件: Perfil.cs 项目: Dyox/LAPRV
 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;
 }
示例#3
0
文件: Perfil.cs 项目: Dyox/LAPRV
        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;
        }
示例#4
0
文件: Perfil.cs 项目: Dyox/LAPRV
        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;
        }
示例#5
0
文件: Humor.cs 项目: Dyox/LAPRV
        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);
            }
        }
示例#6
0
文件: Perfil.cs 项目: Dyox/LAPRV
 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"];
 }