Пример #1
0
        /// <summary>
        /// 根据主键索引,删除员工考勤年度结算信息(注:暂定为物理删除)
        /// </summary>
        /// <param name="strYearlyBalanceId">主键索引</param>
        /// <returns></returns>
        public string DeleteYearlyBalance(string strYearlyBalanceId)
        {
            string strMsg = string.Empty;

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

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

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

                objArgs.Add(strYearlyBalanceId);

                AttendYearlyBalanceDAL dalAttendYearlyBalance = new AttendYearlyBalanceDAL();
                flag = dalAttendYearlyBalance.IsExistsRd(strFilter.ToString(), objArgs.ToArray());

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

                T_HR_ATTENDYEARLYBALANCE entDel = dalAttendYearlyBalance.GetAttendYearlyBalanceRdByMultSearch(strFilter.ToString(), objArgs.ToArray());
                dalAttendYearlyBalance.Delete(entDel);

                strMsg = "{DELETESUCCESSED}";
            }
            catch (Exception ex)
            {
                strMsg = ex.Message.ToString();
                if (ex.InnerException == null)
                {
                    Utility.SaveLog(ex.Message);
                }
                else
                {
                    Utility.SaveLog(ex.InnerException.Message);
                }
            }

            return(strMsg);
        }
Пример #2
0
        /// <summary>
        /// 修改员工考勤年度结算信息
        /// </summary>
        /// <param name="entTemp"></param>
        /// <returns></returns>
        public string ModifyYearlyBalance(T_HR_ATTENDYEARLYBALANCE 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(" YEARLYBALANCEID == @0");

                objArgs.Add(entTemp.YEARLYBALANCEID);

                AttendYearlyBalanceDAL dalAttendYearlyBalance = new AttendYearlyBalanceDAL();
                flag = dalAttendYearlyBalance.IsExistsRd(strFilter.ToString(), objArgs.ToArray());

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

                T_HR_ATTENDYEARLYBALANCE entUpdate = dalAttendYearlyBalance.GetAttendYearlyBalanceRdByMultSearch(strFilter.ToString(), objArgs.ToArray());
                Utility.CloneEntity(entTemp, entUpdate);

                dalAttendYearlyBalance.Update(entUpdate);
                strMsg = "{SAVESUCCESSED}";
            }
            catch (Exception ex)
            {
                strMsg = ex.ToString();
                Utility.SaveLog(strMsg);
            }

            return(strMsg);
        }
Пример #3
0
        /// <summary>
        /// 获取员工考勤年度结算信息
        /// </summary>
        /// <param name="strYearlyBalanceId">主键索引</param>
        /// <returns></returns>
        public T_HR_ATTENDYEARLYBALANCE GetAttendYearlyBalanceByID(string strYearlyBalanceId)
        {
            if (string.IsNullOrEmpty(strYearlyBalanceId))
            {
                return(null);
            }

            AttendYearlyBalanceDAL dalAttendYearlyBalance = new AttendYearlyBalanceDAL();
            StringBuilder          strfilter = new StringBuilder();
            List <string>          objArgs   = new List <string>();

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

            T_HR_ATTENDYEARLYBALANCE entRd = dalAttendYearlyBalance.GetAttendYearlyBalanceRdByMultSearch(strfilter.ToString(), objArgs.ToArray());

            return(entRd);
        }