Example #1
0
		// This method is invoked when the application has loaded its UI and its ready to run
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{

		dataSource = new EmployeeDataSource(this);
		@delegate = new EmployeeListDelegate(this);
		tableviewEmployee.DataSource = dataSource;
		tableviewEmployee.Delegate = @delegate;
		alertDelegate = new CallAlert (this);

			//System.MissingMethodException: Method not found: 'Default constructor not found...ctor() of CorporateDirectory1.Employee'.
			var e = new Employee();
			e.Firstname = "a"; e.Work=1; e.Mobile=2; e.Lastname="b";e.Department="c";e.Email="@";
			var f = e.Firstname; var g = e.Work; var h=e.Mobile; var i=e.Lastname; var j=e.Department; var k=e.Email;
			
			using (var db = new SQLiteClient.SQLiteConnection("phonebook")) {
				// Perform strongly typed queries
			    var users = db.Query<Employee>("SELECT Firstname, Lastname, Work, Mobile, Department, Email FROM Phonebook ORDER BY Lastname", 1000);
			    
				listData = users.ToList();
			}
			
			
			window.MakeKeyAndVisible ();
			return true;
		}
Example #2
0
        // This method is invoked when the application has loaded its UI and its ready to run
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            dataSource = new EmployeeDataSource(this);
            @delegate  = new EmployeeListDelegate(this);
            tableviewEmployee.DataSource = dataSource;
            tableviewEmployee.Delegate   = @delegate;
            alertDelegate = new CallAlert(this);

            //System.MissingMethodException: Method not found: 'Default constructor not found...ctor() of CorporateDirectory1.Employee'.
            var e = new Employee();

            e.Firstname = "a"; e.Work = 1; e.Mobile = 2; e.Lastname = "b"; e.Department = "c"; e.Email = "@";
            var f = e.Firstname; var g = e.Work; var h = e.Mobile; var i = e.Lastname; var j = e.Department; var k = e.Email;

            using (var db = new SQLiteClient.SQLiteConnection("phonebook")) {
                // Perform strongly typed queries
                var users = db.Query <Employee>("SELECT Firstname, Lastname, Work, Mobile, Department, Email FROM Phonebook ORDER BY Lastname", 1000);

                listData = users.ToList();
            }


            window.MakeKeyAndVisible();
            return(true);
        }