예제 #1
0
        public void AddNote()
        {
            Note note = new Note();

            note.Title   = txtTitle.Text;
            note.Content = txtContent.Text;
            note.UserID  = _currentUser.UserID;

            bool result = _noteController.Add(note);

            try
            {
                if (result)
                {
                    MessageBox.Show("Notunuz başarıyla kaydedildi.");
                    txtContent.Clear();
                    txtTitle.Clear();
                    FillNote();
                }
                else
                {
                    MessageBox.Show("Notunuz kaydedilirken bir hata olustu");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (currentNote == null)
            {
                Note newNote = new Note();
                newNote.UserID  = currentUser.UserID;
                newNote.Title   = txtTitle.Text;
                newNote.Content = txtContent.Text;
                _noteController.Add(newNote);
            }
            else
            {
                currentNote.Title   = txtTitle.Text;
                currentNote.Content = txtContent.Text;
                _noteController.Update(currentNote);
            }

            this.Close();
        }
예제 #3
0
        private void AddNote()
        {
            Note note = new Note();

            note.Title   = txtTitle.Text;
            note.Content = txtContent.Text;
            note.UserID  = _user.UserID;

            bool result = _noteController.Add(note);

            if (result)
            {
                MessageBox.Show("Notunuz başarıyla eklendi!");
                txtTitle.Clear();
                txtContent.Clear();
                FillNotes();
            }
            else
            {
                MessageBox.Show("Notunuz kayıt edilemedi.");
            }
        }
예제 #4
0
        void AddNote()
        {
            Note note = new Note();

            note.Title   = txtBaslik.Text;
            note.Content = txtContent.Text;
            note.UserID  = _currentUser.UserID;

            bool result = _noteController.Add(note);

            if (result)
            {
                MessageBox.Show("Not Eklenmiştir");
                txtBaslik.Clear();
                txtContent.Clear();
                FillNotes();
            }
            else
            {
                MessageBox.Show("Not Eklenemedi !!!");
            }
        }
예제 #5
0
        private void AddNote()
        {
            Note note = new Note();

            note.Title   = txtTitle.Text;
            note.Content = txtContent.Text;
            note.UserID  = _user.UserID;

            bool result = _noteController.Add(note);

            if (result)
            {
                MessageBox.Show("Not eklenmiştir.");
                txtTitle.Clear();
                txtContent.Clear();
                FillNotes();
            }
            else
            {
                MessageBox.Show("Not eklenemedi");
            }
        }