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; } } }
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(); }
public login() { // Assign default persister to instance persister _Persister = _DefaultPersister; }
static login() { // Assign default persister _DefaultPersister = new SqlServerloginPersister(); }