public FormNote AddForm(Tbl_Note note) { FormNote formNote = GetForm(note); AddForm(formNote); return(formNote); }
private void btnNewNote_Click(object sender, EventArgs e) { Tbl_Note note = crud.Insert_Not(); FormNote formNote = forms.AddForm(note); forms.ShowForm(formNote); }
public bool Update_Not2(Tbl_Note temp) { try { db.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool Delete_Not(Tbl_Note temp) { try { db.Tbl_Note.Remove(temp); db.SaveChanges(); return(true); } catch (Exception) { return(false); } }
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); } }
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)); }
public FormNote(Tbl_Note note) { InitializeComponent(); this.note = note; }