Example #1
0
   public void updatequestion(Support_tbl ques)
   {
       db = new CollegeERPDBEntities();

       db.Support_tbl.Attach(ques);
       // var progrm = db.Program_tbl.Where(x => x.ID == id).FirstOrDefault();
       db.Entry(ques).State = EntityState.Modified;

       db.SaveChanges();
       Mails_tbl mail = new Mails_tbl { RecieverID =ques.UserID, Date = DateTime.Now.Date, Message =ques.Answer, Status = 0, Subject = "Admin Answer" };
       addmail(mail);  

   }
Example #2
0
   public void updatecourse(Courses_tbl updatecrs)
   {
       db = new CollegeERPDBEntities();

       db.Courses_tbl.Attach(updatecrs);
       // var progrm = db.Program_tbl.Where(x => x.ID == id).FirstOrDefault();
       db.Entry(updatecrs).State = EntityState.Modified;

       db.SaveChanges();

   }
Example #3
0
   public void UpdateCreditHours(StudentSelectedCredit t)
   {

       db = new CollegeERPDBEntities();
       db.StudentSelectedCredits.Attach(t);
       db.Entry(t).State = EntityState.Modified;
      
       db.SaveChanges();
   }
Example #4
0
    public void updateRoom(HostelRoom_tbl hstl)
    {
        db = new CollegeERPDBEntities();

        db.HostelRoom_tbl.Attach(hstl);
        // var progrm = db.Program_tbl.Where(x => x.ID == id).FirstOrDefault();
        db.Entry(hstl).State = EntityState.Modified;

        db.SaveChanges();

    }
Example #5
0
    public void updatepay(EmployeePay_tbl pay)
    {
        db = new CollegeERPDBEntities();

        db.EmployeePay_tbl.Attach(pay);
        // var progrm = db.Program_tbl.Where(x => x.ID == id).FirstOrDefault();
        db.Entry(pay).State = EntityState.Modified;

        db.SaveChanges();
       
    }
Example #6
0
    public void updatebook(Book books)
    {
        db = new CollegeERPDBEntities();

        db.Books.Attach(books);
        // var progrm = db.Program_tbl.Where(x => x.ID == id).FirstOrDefault();
        db.Entry(books).State = EntityState.Modified;

        db.SaveChanges();
    }