Exemple #1
0
        private void saveBtn_Click(object sender, EventArgs e)

        {
            //add to todolist database
            ToDoList todolist = new ToDoList();

            todolist.Subject = textBox1.Text;
            todolist.Goal    = textBox2.Text;

            db.ToDoLists.InsertOnSubmit(todolist);

            //db.SubmitChanges();
            //db.Refresh(System.Data.Linq.RefreshMode.OverwriteCurrentValues, db.ToDoLists);

            textBox1.Focus();
            textBox1.Clear();
            textBox2.Focus();
            textBox2.Clear();
        }
 private void detach_ToDoLists(ToDoList entity)
 {
     this.SendPropertyChanging();
     entity.ProgressGoal = null;
 }
 partial void DeleteToDoList(ToDoList instance);
 partial void UpdateToDoList(ToDoList instance);
 partial void InsertToDoList(ToDoList instance);