public ViewController(IntPtr handle) : base(handle) { authenticator = Application.getAutheticator(); addView = this.Storyboard.InstantiateViewController("AddViewController") as AddViewController; //loginView = this.Storyboard.InstantiateViewController("LoginViewController") as LoginViewController; //Core.GetPostGreSqlService().ConnectionStatus += SQLConnectionStatus; //var accounts = AccountStore.Create().FindAccountsForService(CREDENTIALS_NAME); //var account = accounts.FirstOrDefault(); //try //{ // Core.Connect(USERNAME, PASSWORD); //} //catch (Exception ex) //{ //} //ConsumeItem _item = new ConsumeItem //{ // Id = 5, // LineNumber = 3, // Date = DateTime.Now, // Amount = 203, // Store = "Verkkokauppa.com" //}; //try //{ // Core.updateData(_item); //} //catch (Exception ex) //{ //} //try //{ // Core.Disconnect(); //} //catch (Exception ex) //{ //} //var connection = Core.Connect(USERNAME, PASSWORD); //if (connection) //{ // if (account.Properties.Count == 0) // { // Account ac = new Account(DBNAME, Core.populateCredentials(USERNAME, PASSWORD)); // AccountStore.Create().Save(ac, CREDENTIALS_NAME); // } // try // { // consumeList = Core.getData(); // } // catch (Exception ex) // { // } // ConsumeItem _item = new ConsumeItem // { // Id = 3, // LineNumber = 2, // Date = DateTime.Now, // Amount = 400, // Store = "Karkkainen" // }; // try // { // Core.updateData(_item); // } // catch (Exception ex) // { // } //try //{ // Core.createData(_item); //} //catch (Exception ex) //{ //} //try //{ // Core.deleteData(_item); //} //catch (Exception ex) //{ //} //try //{ // consumeList = Core.getData(); //} //catch (Exception ex) //{ //} // try // { // Core.CloseConnection(); // } // catch (Exception ex) // { // } //} }
public StoreTableSource(List <StoreItem> items, AddViewController owner) { _storeList = items; _owner = owner; }