Ejemplo n.º 1
0
        public login(DataRow row)
        {
            // Assign default persister to instance persister
            _Persister = _DefaultPersister;

            // Assign column values to private members
            for (int i = 0; i < row.Table.Columns.Count; i++)
            {
                switch (row.Table.Columns[i].ColumnName.ToUpper())
                {
                case "ID":
                    this.id = Convert.ToInt32(row[i, DataRowVersion.Current]);
                    break;

                case "NAME":
                    this.name = (string)row[i, DataRowVersion.Current];
                    break;

                case "EMAIL":
                    this.email = (string)row[i, DataRowVersion.Current];
                    break;

                case "PASSWORD":
                    this.password = (string)row[i, DataRowVersion.Current];
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        public login(int _id)
        {
            // Assign default persister to instance persister
            _Persister = _DefaultPersister;

            // Assign method parameter to private fields
            this._id = _id;

            // Call associated retrieve method
            Retrieve();
        }
Ejemplo n.º 3
0
 public login()
 {
     // Assign default persister to instance persister
     _Persister = _DefaultPersister;
 }
Ejemplo n.º 4
0
 static login()
 {
     // Assign default persister
     _DefaultPersister = new SqlServerloginPersister();
 }