public void InsertAttendance(int EmployeeID, DateTime PunchDateTime, Micro.Commons.MicroEnums.AttendanceType AttendanceType) { try { int ReturnValue = 0; SqlCommand InsertCommand = new SqlCommand(); InsertCommand.CommandType = CommandType.StoredProcedure; InsertCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output; InsertCommand.Parameters.Add(GetParameter("@EmployeeID", SqlDbType.Int, EmployeeID)); InsertCommand.Parameters.Add(GetParameter("@DateOfAttendance", SqlDbType.DateTime, PunchDateTime)); InsertCommand.Parameters.Add(GetParameter("@AttendanceType", SqlDbType.Int, (int)AttendanceType)); InsertCommand.Parameters.Add(GetParameter("@AddedOrModifiedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID)); InsertCommand.CommandText = "pHRM_Attendances_InsertManual"; ExecuteStoredProcedure(InsertCommand); InsertCommand.Parameters[0].Value.ToString(); //ReturnValue = int.Parse(InsertCommand.Parameters[0].Value.ToString()); //return ReturnValue; } catch (Exception ex) { throw (new Exception(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + (new System.Diagnostics.StackFrame()).GetMethod().Name, ex)); } }
public void InsertAttendance(int EmployeeID, DateTime PunchDateTime, Micro.Commons.MicroEnums.AttendanceType AttendanceType) { try { AttendanceIntegration.InsertAttendance(EmployeeID, PunchDateTime, AttendanceType); } catch (Exception ex) { throw (new Exception(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + (new System.Diagnostics.StackFrame()).GetMethod().Name, ex)); } }