Ejemplo n.º 1
0
        private void btnAdd_Click_1(object sender, EventArgs e)
        {
            if (txtTitle.Text.Length > 3)
            {
                Note note = new Note();
                note.Title       = txtTitle.Text;
                note.Content     = txtContent.Text;
                note.CreatedDate = txtCreatedDate.Text;
                note.Status      = cmbStatus.Text;

                noteManager.Add(note);
                MessageBox.Show("Not Başarıyla Eklendi");
                this.Hide();
            }
        }
Ejemplo n.º 2
0
        private void workerAddNote_DoWork(object sender, DoWorkEventArgs e)
        {
            var textNote = "";

            Dispatcher.Invoke(() => { textNote = TextBox.Text; });

            var note = new Note
            {
                User  = _user,
                Value = textNote
            };

            _noteManager.Add(note);
            e.Result = note;
        }
        public JsonResult SaveNoteApi(NoteViewModel noteVm)
        {
            ModelState.Remove("Id");
            if (ModelState.IsValid)
            {
                var note = new Note()
                {
                    AssetEntryId = noteVm.AssetEntryId,
                    Notes        = noteVm.Notes
                };

                int count = _noteManager.Add(note);
                return(Json(count, JsonRequestBehavior.AllowGet));
            }
            return(Json(0, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 4
0
 void AddNote()
 {
     try
     {
         Note note = new Note
         {
             Tittle        = txtTittle.Text,
             Description   = rtbDescription.Text,
             FinishDate    = dtpFinishDate.Value,
             PaymentAmount = Convert.ToDecimal(txtPaymentAmount.Text),
         };
         noteManager.Add(note);
         MessageBox.Show("Notunuz Kaydedilmiştir");
         GetAll();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }