public void SaveTask(TaskX task)
        {
            Console.WriteLine("Save " + task.Name);
            var oldTask = tasks.Find(t => t.Id == task.Id);

            oldTask = task;
            NavigationController.PopViewControllerAnimated(true);
        }
        public void DeleteTask(TaskX task)
        {
            Console.WriteLine("Delete " + task.Name);
            var oldTask = tasks.Find(t => t.Id == task.Id);

            tasks.Remove(oldTask);
            NavigationController.PopViewControllerAnimated(true);
        }
示例#3
0
        public void SqList(string databaseFile, string opinion)
        {
            try
            {
                if (!File.Exists(databaseFile))
                {
                    return;
                }
                //end if

                // Connect to database
                using (SqliteConnection sqlCon = new SqliteConnection(String.Format("Data Source = {0}", databaseFile)))
                {
                    sqlCon.SetPassword("haluk");

                    sqlCon.Open();

                    using (SqliteCommand sqlCom = new SqliteCommand(sqlCon))
                    {
                        sqlCom.CommandText = "SELECT * FROM Personel";

//                       if(opinion=="Z")
//                     sqlCom.CommandText = "SELECT * FROM ZSUBE";
//
//                  else if(opinion=="Y")
//                     sqlCom.CommandText = "SELECT * FROM YSUBE";
//
                        // Execute the SELECT statement and retrieve the data
                        using (SqliteDataReader dbReader = sqlCom.ExecuteReader())
                        {
                            if (dbReader.HasRows)
                            {
                                int i;
                                // Advance through each row
                                tasks = new List <TaskX> ();
                                while (dbReader.Read())
                                {
                                    TaskX dtask = new TaskX()
                                    {
                                        Id    = Convert.ToInt16(dbReader["ID"]),
                                        Name  = String.Format(Convert.ToString(dbReader["UserName"])),
                                        Notes = String.Format(Convert.ToString(dbReader["Password"])),
                                        Done  = false
                                    };
                                    tasks.Add(dtask);
                                }
                                ;
                            }
                        };
                        TableView.Source = new RootTableSource(tasks.ToArray());
                    }
                    sqlCon.Close();
                }
            } catch (Exception ex)
            { }
        }
示例#4
0
      public void CreateTask () {
         var newId = tasks[tasks.Count - 1].Id + 1;
         var newTask = new TaskX(){Id=newId};
         tasks.Add (newTask);

         var detail = Storyboard.InstantiateViewController("subedetail") as SubeVerileriTaskControllerList;
         detail.CryptedSetTask (this, newTask);
         NavigationController.PushViewController (detail, true);


      }
示例#5
0
        public void CreateTask()
        {
            var newId   = tasks[tasks.Count - 1].Id + 1;
            var newTask = new TaskX()
            {
                Id = newId
            };

            tasks.Add(newTask);

            var detail = Storyboard.InstantiateViewController("subedetail") as SubeVerileriTaskControllerList;

            detail.CryptedSetTask(this, newTask);
            NavigationController.PushViewController(detail, true);
        }
        public void CreateTask()
        {
            var newId   = tasks[tasks.Count - 1].Id + 1;
            var newTask = new TaskX()
            {
                Id = newId
            };

            tasks.Add(newTask);

            var detail = Storyboard.InstantiateViewController("detail") as TaskDetailViewController;

            detail.SetTask(this, newTask);
            NavigationController.PushViewController(detail, true);
        }
示例#7
0
      public void SqList(string databaseFile,string opinion)
      {
         try 
         {
            if (!File.Exists (databaseFile)) 
            {

               return;

            }
            //end if

            // Connect to database
            using (SqliteConnection sqlCon = new SqliteConnection (String.Format ("Data Source = {0}", databaseFile))) 
            {
               sqlCon.SetPassword("haluk");

               sqlCon.Open ();

               using (SqliteCommand sqlCom = new SqliteCommand (sqlCon)) 
               {
                  sqlCom.CommandText="SELECT * FROM Personel";

//                       if(opinion=="Z")
//                     sqlCom.CommandText = "SELECT * FROM ZSUBE";
//
//                  else if(opinion=="Y")
//                     sqlCom.CommandText = "SELECT * FROM YSUBE";
//
                  // Execute the SELECT statement and retrieve the data
                  using (SqliteDataReader dbReader = sqlCom.ExecuteReader ())
                  {
                     if (dbReader.HasRows)
                     {
                        int i;
                        // Advance through each row
                        tasks = new List<TaskX> ();
                        while (dbReader.Read ())
                        {     
                           TaskX dtask= new TaskX() {Id = Convert.ToInt16( dbReader["ID"]), 
                              Name = String.Format (Convert.ToString (dbReader["UserName"])),
                              Notes=String.Format ( Convert.ToString (dbReader["Password"])),
                              Done=false};
                           tasks.Add(dtask);
                        };
                     }
                  };
                  TableView.Source = new RootTableSource(tasks.ToArray ());
               }
               sqlCon.Close ();
            }
         } catch (Exception ex) 
         { }
      }
示例#8
0
 // this will be called before the view is displayed
 public void SetTask(RootViewController d, TaskX task)
 {
     Delegate    = d;
     currentTask = task;
 }
 public void CryptedSetTask(cryptViewList d, TaskX task)
 {
     CryptDelegate = d;
      currentTask = task;
 }
 public void SetTask(SubeViewListController d, TaskX task)
 {
     Delegate = d;
      currentTask = task;
 }
 public void CryptedSetTask(cryptViewList d, TaskX task)
 {
     CryptDelegate = d;
      currentTask = task;
 }
        public void SqList(string databaseFile, string opinion)
        {
            try
            {
                if (!File.Exists(databaseFile))
                {
                    return;
                }
                //end if

                // Connect to database
                using (SqliteConnection sqlCon = new SqliteConnection(String.Format("Data Source = {0}", databaseFile)))
                {
                    sqlCon.Open();

                    using (SqliteCommand sqlCom = new SqliteCommand(sqlCon))
                    {
//                  if(opinion=="Z")
//                  sqlCom.CommandText = "SELECT * FROM ZSUBE";
//
//                  else if(opinion=="Y")
//                     sqlCom.CommandText = "SELECT * FROM YSUBE";
//
                        if (opinion == "Z")
                        {
                            sqlCom.CommandText = "SELECT * FROM EMIRLERZ";
                        }
                        else if (opinion == "Y")
                        {
                            sqlCom.CommandText = "SELECT * FROM EMIRLERY";
                        }
                        else if (opinion == "X")
                        {
                            sqlCom.CommandText = "SELECT * FROM EMIRLERX";
                        }

                        //"XEMIRLER";



                        // Execute the SELECT statement and retrieve the data
                        using (SqliteDataReader dbReader = sqlCom.ExecuteReader())
                        {
                            if (dbReader.HasRows)
                            {
                                int i;
                                // Advance through each row
                                tasks = new List <TaskX> ();
                                while (dbReader.Read())
                                {
                                    //  Task dtask= new Task();

                                    ///            dtask.Name=String.Format (Convert.ToString (dbReader["UserName"]));
                                    TaskX dtask = new TaskX()
                                    {
                                        Id = Convert.ToInt16(dbReader["ID"]),

                                        Name = String.Format(Convert.ToString(dbReader["Title"])),

                                        Notes = String.Format(Convert.ToString(dbReader["Subject"])),

                                        Date = String.Format(Convert.ToString(dbReader["PostDate"])),

                                        ImgUrl = String.Format(Convert.ToString(dbReader["ImgUrl"])),

                                        DocUrl = String.Format(Convert.ToString(dbReader["DocAdress"])),

                                        Sube = String.Format(Convert.ToString(dbReader["Sube"])),


                                        Done = false
                                    };
                                    tasks.Add(dtask);
                                }
                                ;
                            }
                        };
                        TableView.Source = new RootTableSource(tasks.ToArray());


                        //end while
                    }
                    //end if

                    //end using dbReader


                    //end using sqlCom

                    sqlCon.Close();
                }
                //end using sqlCon

                //  this.durumGostericiT.Text += "Customer data retrieved.\n";
            } catch (Exception ex)
            {
            }
        }
 public void SetTask(SubeViewListController d, TaskX task)
 {
     Delegate = d;
      currentTask = task;
 }
 // this will be called before the view is displayed
 public void SetTask(RootViewController d, TaskX task)
 {
     Delegate = d;
      currentTask = task;
 }
示例#15
0
 public void SaveTask (TaskX task) {
    Console.WriteLine("Save "+task.Name);
    var oldTask = tasks.Find(t => t.Id == task.Id);
    oldTask = task;
    NavigationController.PopViewControllerAnimated(true);
 }
      public void SqList(string databaseFile,string opinion)
      {
         try 
         {
            if (!File.Exists (databaseFile)) 
            {

               return;

            }
            //end if

            // Connect to database
            using (SqliteConnection sqlCon = new SqliteConnection (String.Format ("Data Source = {0}", databaseFile))) 
            {

               sqlCon.Open ();

               using (SqliteCommand sqlCom = new SqliteCommand (sqlCon)) 
               {
//                  if(opinion=="Z")
//                  sqlCom.CommandText = "SELECT * FROM ZSUBE";
//
//                  else if(opinion=="Y")
//                     sqlCom.CommandText = "SELECT * FROM YSUBE";
//
                  if(opinion=="Z")
                  sqlCom.CommandText = "SELECT * FROM EMIRLERZ";
                  else if(opinion=="Y")
                     sqlCom.CommandText = "SELECT * FROM EMIRLERY";
                  else if(opinion=="X")
                     sqlCom.CommandText = "SELECT * FROM EMIRLERX";

                  //"XEMIRLER";



                  // Execute the SELECT statement and retrieve the data
                  using (SqliteDataReader dbReader = sqlCom.ExecuteReader ())
                  {
                     if (dbReader.HasRows)
                     {
                        int i;
                        // Advance through each row
                        tasks = new List<TaskX> ();
                        while (dbReader.Read ())
                        {     
                           //  Task dtask= new Task();

                           ///            dtask.Name=String.Format (Convert.ToString (dbReader["UserName"]));
                           TaskX dtask= new TaskX() {Id = Convert.ToInt16( dbReader["ID"]), 

                              Name = String.Format (Convert.ToString (dbReader["Title"])),

                              Notes=String.Format ( Convert.ToString (dbReader["Subject"])),

                              Date = String.Format(Convert.ToString(dbReader["PostDate"])),

                              ImgUrl = String.Format(Convert.ToString(dbReader["ImgUrl"])),

                              DocUrl = String.Format(Convert.ToString(dbReader["DocAdress"])),

                              Sube =     String.Format(Convert.ToString(dbReader["Sube"])),


                              Done = false};
                           tasks.Add(dtask);
                        };
                     }





                  };
                  TableView.Source = new RootTableSource(tasks.ToArray ());


                  //end while

               }
               //end if

               //end using dbReader


               //end using sqlCom

               sqlCon.Close ();

            }
            //end using sqlCon

            //  this.durumGostericiT.Text += "Customer data retrieved.\n";

         } catch (Exception ex) 
         {


         }
      }
      public void CreateTask () {
         var newId = tasks[tasks.Count - 1].Id + 1;
         var newTask = new TaskX(){Id=newId};
         tasks.Add (newTask);

         var detail = Storyboard.InstantiateViewController("detail") as TaskDetailViewController;
         detail.SetTask (this, newTask);
         NavigationController.PushViewController (detail, true);


      }
示例#18
0
 public void DeleteTask (TaskX task) {
    Console.WriteLine("Delete "+task.Name);
    var oldTask = tasks.Find(t => t.Id == task.Id);
    tasks.Remove (oldTask);
    NavigationController.PopViewControllerAnimated(true);
 }
示例#19
0
 public RootTableSource(TaskX[] items)
 {
     tableItems = items;
 }