Beispiel #1
0
        public static void Show_FormNot(tblNot tblNot)
        {
            FormNot temp = new FormNot(tblNot);

            list_formNot.Add(temp);
            temp.Show();
        }
Beispiel #2
0
 public bool Delete_Not(tblNot temp)
 {
     try
     {
         db.tblNots.Remove(temp);
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Beispiel #3
0
        public bool Update_Not(tblNot temp)
        {
            try
            {
                var urun = db.tblNots.First(x => x.ID == temp.ID);
                urun.Notum = temp.Notum;

                db.SaveChanges();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Beispiel #4
0
 public tblNot Insert_Not(string temp = "")
 {
     try
     {
         tblNot notum = new tblNot();
         notum.Notum = temp;
         var rs = db.tblNots.Add(notum);
         db.SaveChanges();
         return(notum);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Beispiel #5
0
 public FormNot(tblNot tblNot)
 {
     InitializeComponent();
     this.tblNot = tblNot;
     txtNot.Text = tblNot.Notum;
 }
Beispiel #6
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            tblNot tblNot = crud.Insert_Not("");

            FormBegin.Show_FormNot(tblNot);
        }