コード例 #1
0
 //To Update the records of a particluar employee
 public void UpdateEmployee(Employee employee)
 {
     try
     {
         db.Entry(employee).State = EntityState.Modified;
         db.SaveChanges();
     }
     catch
     {
         throw;
     }
 }
コード例 #2
0
        //To Update the records of a particluar employee

        public int UpdateEmployee(TblEmployee employee)
        {
            try
            {
                db.Entry(employee).State = EntityState.Modified;
                db.SaveChanges();
                return(1);
            }
            catch
            {
                throw;
            }
        }
コード例 #3
0
        public int UpdatePolicy(Policy policy)
        {
            try
            {
                db.Entry(policy).State = EntityState.Modified;
                db.SaveChanges();

                return(1);
            }
            catch
            {
                throw;
            }
        }
コード例 #4
0
        public int UpdateEvent(TblEvents events)
        {
            try
            {
                string cute_String;
                string MyString = events.Photo;
                cute_String            = MyString.Remove(0, 12);
                events.Photo           = cute_String;
                db.Entry(events).State = EntityState.Modified;
                db.SaveChanges();

                return(1);
            }
            catch
            {
                throw;
            }
        }