Пример #1
0
        partial void ExecutarPerguntaSimples(Foundation.NSObject sender)
        {
            using (var conn = new SQLite.SQLiteConnection(ConstroiCaminho()))
            {
                var q = from r in conn.Table <Agenda>()
                        select r;

                var DataSource = new AgendaTableDataSource();
                //DataSource.Agendas.Add ( new Agenda("Primeiro","Primeiro","8888888"));

                foreach (Agenda ag in q)
                {
                    //Console.WriteLine("Encontrei "+ag.Nome+" no endereço "+ag.Endereco+" ou pelo telefone "+ag.Telefone);
                    DataSource.Agendas.Add(new Agenda(ag.Nome, ag.Endereco, ag.Telefone, ag.Datanascimento));
                }
                AgendaTableDelegate agD = new AgendaTableDelegate(DataSource);
                MinhaTabelaTV.DataSource = DataSource;
                MinhaTabelaTV.Delegate   = agD;
                //MinhaNovaTabelaAgendaTV.ReloadData ();
            }
        }
Пример #2
0
        partial void ExecutaCBT(Foundation.NSObject sender)
        {
            using (var conn = new SQLite.SQLiteConnection(ConstroiCaminho()))
            {
                var q = from r in conn.Table <Agenda>()
                        select r;

                var DataSource = new AgendaTableDataSource();

                var retornoTab = MinhaTabelaTV.SelectedRow;

                var ret = q.ToList();
                NomeTF.StringValue     = ret[Convert.ToInt32(retornoTab)].Nome;
                EnderecoTF.StringValue = ret[Convert.ToInt32(retornoTab)].Endereco;
            }

            /*
             *
             * NovoValorTB.StringValue = ConstroiCaminho();
             *
             */
            //var recebe = NovoValorTB.StringValue;
            //NovoValorTB.StringValue = String.Format("Foi digitado no campo "+recebe.ToString());
        }
 public AgendaTableDelegate(AgendaTableDataSource datasource)
 {
     this.DataSource = datasource;
 }