public void Dispose() { if (this._access != null) { this._access.Dispose(); this._access = null; } }
private bool DoLogin() { try { using (Accessor access = new Accessor(Global.DataFileName)) { access.Connect(Global.Password); } return true; } catch (Exception ex) { return false; } }
public void Save() { switch (this.Status) { case DataStatus.NoChanged: break; case DataStatus.New: { var cmd = this.GenInsertString(); using (Accessor access = new Accessor(Global.DataFileName)) { access.Connect(Global.Password); access.ExecuteUID(cmd); } } break; case DataStatus.Changed: { var cmd = this.GenUpdateString(); using (Accessor access = new Accessor(Global.DataFileName)) { access.Connect(Global.Password); access.ExecuteUID(cmd); } } break; case DataStatus.Deleted: { var cmd = this.GenDeleteString(); using (Accessor access = new Accessor(Global.DataFileName)) { access.Connect(Global.Password); access.ExecuteUID(cmd); } } break; } }
public AccountListBiz() { this.View = new AccountList(this); this._access = new Accessor(Global.DataFileName); this._access.Connect(Global.Password); }