コード例 #1
0
 /// <summary>
 /// Deletes employee's record
 /// </summary>
 /// <param name="employee"></param>
 private void DeleteEmployeeDetails(Employee employee)
 {
     try
     {
         if (employee != null)
         {
             ResponseMessage = businessLogic.DeleteEmployeeDetails(employee.id);
         }
         else if (DeleteEmployeeId.HasValue)
         {
             ResponseMessage = businessLogic.DeleteEmployeeDetails(DeleteEmployeeId.Value);
         }
         else
         {
             ResponseMessage = "Enter valid input!!";
         }
     }
     catch (Exception ex)
     {
         LoggerHelper.logger.Error("Error in DeleteEmployeeDetails" + ex.Message);
     }
     finally
     {
         ShowPostMessage = null;
         ClearContents();
     }
 }