public FormNote AddForm(Tbl_Note note)
        {
            FormNote formNote = GetForm(note);

            AddForm(formNote);
            return(formNote);
        }
Exemple #2
0
        private void btnNewNote_Click(object sender, EventArgs e)
        {
            Tbl_Note note     = crud.Insert_Not();
            FormNote formNote = forms.AddForm(note);

            forms.ShowForm(formNote);
        }
Exemple #3
0
 public bool Update_Not2(Tbl_Note temp)
 {
     try
     {
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Exemple #4
0
 public bool Delete_Not(Tbl_Note temp)
 {
     try
     {
         db.Tbl_Note.Remove(temp);
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Exemple #5
0
 public bool Update_Not(Tbl_Note temp)
 {
     try
     {
         var urun = db.Tbl_Note.First(x => x.ID == temp.ID);
         urun.Note   = temp.Note;
         urun.KonumX = temp.KonumX;
         urun.KonumY = temp.KonumY;
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Exemple #6
0
        public Tbl_Note Insert_Not(string temp = "")
        {
            try
            {
                Tbl_Note notum = new Tbl_Note();
                notum.Note    = temp;
                notum.KonumX  = 0;
                notum.KonumY  = 0;
                notum.ColorID = 0;

                var rs = db.Tbl_Note.Add(notum);
                db.SaveChanges();
                return(notum);
            }
            catch (Exception)
            {
                return(null);
            }
        }
 public FormNote GetForm(Tbl_Note note)
 {
     return(new FormNote(note));
 }
Exemple #8
0
 public FormNote(Tbl_Note note)
 {
     InitializeComponent();
     this.note = note;
 }