/// <summary> /// 日常打卡信息 /// </summary> /// <param name="sType"></param> /// <param name="sValue"></param> /// <param name="strOwnerID"></param> /// <param name="strEmployeeID"></param> /// <param name="strAttendDateFrom"></param> /// <param name="strAttendDateTo"></param> /// <param name="strSortKey"></param> /// <returns></returns> public IQueryable <T_HR_ATTENDANCERECORD> GetAllAttendanceRdListByMultSearch(string sType, string sValue, string strOwnerID, string strEmployeeID, string strAttendDateFrom, string strAttendDateTo, string strSortKey) { AttendanceRecordDAL dalAttendanceRecord = new AttendanceRecordDAL(); StringBuilder strfilter = new StringBuilder(); List <object> objArgs = new List <object>(); string strOrderBy = string.Empty; if (!string.IsNullOrEmpty(strEmployeeID)) { strfilter.Append(" EMPLOYEEID == @0"); objArgs.Add(strEmployeeID); } string filterString = strfilter.ToString(); if (!string.IsNullOrEmpty(strOwnerID)) { SetOrganizationFilter(ref filterString, ref objArgs, strOwnerID, "T_HR_ATTENDANCERECORD"); } if (!string.IsNullOrEmpty(strSortKey)) { strOrderBy = strSortKey; } else { strOrderBy = "EMPLOYEEID"; } var q = dalAttendanceRecord.GetAttendanceRdListByMultSearch(sType, sValue, strAttendDateFrom, strAttendDateTo, strOrderBy, filterString, objArgs.ToArray()); return(q); }
/// <summary> /// 修改T_HR_ATTENDANCERECORD信息 /// </summary> /// <param name="entLTRd"></param> /// <returns></returns> public string ModifyAttRd(T_HR_ATTENDANCERECORD entTemp) { string strMsg = string.Empty; try { if (entTemp == null) { return("{REQUIREDFIELDS}"); } bool flag = false; StringBuilder strFilter = new StringBuilder(); List <string> objArgs = new List <string>(); strFilter.Append(" ATTENDANCERECORDID == @0"); objArgs.Add(entTemp.ATTENDANCERECORDID); AttendanceRecordDAL dalAttendanceRecord = new AttendanceRecordDAL(); flag = dalAttendanceRecord.IsExistsRd(strFilter.ToString(), objArgs.ToArray()); if (!flag) { return("{NOTFOUND}"); } T_HR_ATTENDANCERECORD entUpdate = dalAttendanceRecord.GetAttendanceRecordRdByMultSearch(strFilter.ToString(), objArgs.ToArray()); Utility.CloneEntity(entTemp, entUpdate); dalAttendanceRecord.Update(entUpdate); strMsg = "{SAVESUCCESSED}"; } catch (Exception ex) { strMsg = ex.ToString(); } return(strMsg); }
/// <summary> /// 根据主键索引,删除T_HR_ATTENDANCERECORD信息(注:暂定为物理删除) /// </summary> /// <param name="strVacationId">主键索引</param> /// <returns></returns> public string DeleteAttRd(string strAttendanceRecordId) { string strMsg = string.Empty; try { if (string.IsNullOrEmpty(strAttendanceRecordId)) { return("{REQUIREDFIELDS}"); } bool flag = false; StringBuilder strFilter = new StringBuilder(); List <string> objArgs = new List <string>(); strFilter.Append(" ATTENDANCERECORDID == @0"); objArgs.Add(strAttendanceRecordId); AttendanceRecordDAL dalAttendanceRecord = new AttendanceRecordDAL(); flag = dalAttendanceRecord.IsExistsRd(strFilter.ToString(), objArgs.ToArray()); if (!flag) { return("{NOTFOUND}"); } T_HR_ATTENDANCERECORD entDel = dalAttendanceRecord.GetAttendanceRecordRdByMultSearch(strFilter.ToString(), objArgs.ToArray()); dalAttendanceRecord.Delete(entDel); strMsg = "{DELETESUCCESSED}"; } catch (Exception ex) { strMsg = ex.Message.ToString(); } return(strMsg); }