Exemple #1
0
        /// <summary>
        /// 修改考勤方案带薪假信息
        /// </summary>
        /// <param name="entTemp"></param>
        /// <returns></returns>
        public string ModifyAttendFreeLeave(T_HR_ATTENDFREELEAVE 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(" ATTENDFREELEAVEID == @0");

                objArgs.Add(entTemp.ATTENDFREELEAVEID);

                AttendFreeLeaveDAL dalAttendFreeLeave = new AttendFreeLeaveDAL();
                flag = dalAttendFreeLeave.IsExistsRd(strFilter.ToString(), objArgs.ToArray());

                if (!flag)
                {
                    return("{NOTFOUND}");
                }

                T_HR_ATTENDFREELEAVE entUpdate = dalAttendFreeLeave.GetAttendFreeLeaveRdByMultSearch(strFilter.ToString(), objArgs.ToArray());
                entUpdate.T_HR_ATTENDANCESOLUTION = entTemp.T_HR_ATTENDANCESOLUTION;
                entUpdate.T_HR_LEAVETYPESET       = entTemp.T_HR_LEAVETYPESET;
                entUpdate.REMARK       = entTemp.REMARK;
                entUpdate.CREATEUSERID = entTemp.CREATEUSERID;
                entUpdate.CREATEDATE   = entTemp.CREATEDATE;
                entUpdate.UPDATEUSERID = entTemp.UPDATEUSERID;
                entUpdate.UPDATEDATE   = entTemp.UPDATEDATE;

                dalAttendFreeLeave.Update(entUpdate);
                strMsg = "{SAVESUCCESSED}";
            }
            catch (Exception ex)
            {
                strMsg = ex.Message.ToString();
            }

            return(strMsg);
        }
Exemple #2
0
        /// <summary>
        /// 获取考勤方案带薪假信息
        /// </summary>
        /// <param name="strAttendFreeLeaveId">主键索引</param>
        /// <returns></returns>
        public T_HR_ATTENDFREELEAVE GetAttendFreeLeaveByID(string strAttendFreeLeaveId)
        {
            if (string.IsNullOrEmpty(strAttendFreeLeaveId))
            {
                return(null);
            }

            AttendFreeLeaveDAL dalAttendFreeLeave = new AttendFreeLeaveDAL();
            StringBuilder      strfilter          = new StringBuilder();
            List <string>      objArgs            = new List <string>();

            if (!string.IsNullOrEmpty(strAttendFreeLeaveId))
            {
                strfilter.Append(" ATTENDFREELEAVEID == @0");
                objArgs.Add(strAttendFreeLeaveId);
            }

            T_HR_ATTENDFREELEAVE entRd = dalAttendFreeLeave.GetAttendFreeLeaveRdByMultSearch(strfilter.ToString(), objArgs.ToArray());

            return(entRd);
        }
Exemple #3
0
        /// <summary>
        /// 根据主键索引,删除考勤方案带薪假信息(注:暂定为物理删除)
        /// </summary>
        /// <param name="strAttendFreeLeaveId">主键索引</param>
        /// <returns></returns>
        public string DeleteAttendFreeLeave(string strAttendFreeLeaveId)
        {
            string strMsg = string.Empty;

            try
            {
                if (string.IsNullOrEmpty(strAttendFreeLeaveId))
                {
                    return("{REQUIREDFIELDS}");
                }

                bool          flag      = false;
                StringBuilder strFilter = new StringBuilder();
                List <string> objArgs   = new List <string>();

                strFilter.Append(" ATTENDFREELEAVEID == @0");

                objArgs.Add(strAttendFreeLeaveId);

                AttendFreeLeaveDAL dalAttendFreeLeave = new AttendFreeLeaveDAL();
                flag = dalAttendFreeLeave.IsExistsRd(strFilter.ToString(), objArgs.ToArray());

                if (!flag)
                {
                    return("{NOTFOUND}");
                }

                T_HR_ATTENDFREELEAVE entDel = dalAttendFreeLeave.GetAttendFreeLeaveRdByMultSearch(strFilter.ToString(), objArgs.ToArray());
                dalAttendFreeLeave.Delete(entDel);

                strMsg = "{DELETESUCCESSED}";
            }
            catch (Exception ex)
            {
                strMsg = ex.Message.ToString();
            }

            return(strMsg);
        }