Пример #1
0
 public int Delete(int EmployeeEvaluationID, int UserIdentity)
 {
     try
     {
         using (var db = new HCMEntities())
         {
             EmployeesEvaluations EmployeeEvaluationObj = db.EmployeesEvaluations.SingleOrDefault(x => x.EmployeeEvaluationID.Equals(EmployeeEvaluationID));
             db.EmployeesEvaluations.Remove(EmployeeEvaluationObj);
             return(db.SaveChanges(UserIdentity));
         }
     }
     catch
     {
         throw;
     }
 }
Пример #2
0
 public int Insert(EmployeesEvaluations EmployeeEvaluation)
 {
     try
     {
         using (var db = new HCMEntities())
         {
             db.EmployeesEvaluations.Add(EmployeeEvaluation);
             db.SaveChanges();
             return(EmployeeEvaluation.EmployeeEvaluationID);
         }
     }
     catch
     {
         throw;
     }
 }
Пример #3
0
 public int Update(EmployeesEvaluations EmployeeEvaluation)
 {
     try
     {
         using (var db = new HCMEntities())
         {
             EmployeesEvaluations EmployeeEvaluationObj = db.EmployeesEvaluations.SingleOrDefault(x => x.EmployeeEvaluationID.Equals(EmployeeEvaluation.EmployeeEvaluationID));
             EmployeeEvaluationObj.MaturityYearID    = EmployeeEvaluation.MaturityYearID;
             EmployeeEvaluationObj.EvaluationPointID = EmployeeEvaluation.EvaluationPointID;
             EmployeeEvaluationObj.EvaluationDegree  = EmployeeEvaluation.EvaluationDegree;
             EmployeeEvaluationObj.EmployeeCodeID    = EmployeeEvaluation.EmployeeCodeID;
             EmployeeEvaluationObj.LastUpdatedDate   = EmployeeEvaluation.LastUpdatedDate;
             EmployeeEvaluationObj.LastUpdatedBy     = EmployeeEvaluation.LastUpdatedBy;
             return(db.SaveChanges());
         }
     }
     catch
     {
         throw;
     }
 }