Exemplo n.º 1
0
 public void Dispose()
 {
     if (this._access != null)
     {
         this._access.Dispose();
         this._access = null;
     }
 }
Exemplo n.º 2
0
 private bool DoLogin()
 {
     try
     {
         using (Accessor access = new Accessor(Global.DataFileName))
         {
             access.Connect(Global.Password);
         }
         return true;
     }
     catch (Exception ex)
     {
         return false;
     }
 }
Exemplo n.º 3
0
 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;
     }
 }
Exemplo n.º 4
0
 public AccountListBiz()
 {
     this.View = new AccountList(this);
     this._access = new Accessor(Global.DataFileName);
     this._access.Connect(Global.Password);
 }