public static void Update(BankAccount B)
 {
     using (var myCnn = Cnn.GetOpenConnection())
     {
         myCnn.Update(B);
     }
 }
 public void ChangeMode(string Mode)
 {
     ActiveMode = Mode;
     if (ActiveMode == Modes.ADD)
         SpecsBankAccount = new BankAccount();
        // SpecsBankAccount = null;
     if (ActiveMode == Modes.DEFAULT)
         SelectedIndex = -1;
 }
 public static void Save(BankAccount B)
 {
     using (var myCnn = Cnn.GetOpenConnection())
     {
         //myCnn.Insert<BankAccount>(B);
         myCnn.Execute("INSERT INTO BankAccount (Code, Wording,Description, Investment) VALUES(@Code, @Wording,@Description,@Investment)", new
         {
             B.Code,
             B.Wording,
             B.Description,
             B.Investment
         });
     }
 }
 public void SpecsPropertiesToObject()
 {
     SpecsBankAccount = new BankAccount
     {
         Code = this.Code,
         Wording = this.Wording,
         Description = this.Description,
         Investment = this.Investment
     };
 }