コード例 #1
0
ファイル: LaborBLL.cs プロジェクト: soon14/HilandCompany
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="modelID"></param>
        /// <returns></returns>
        public override bool Delete(string modelID)
        {
            bool isSuccessful = base.Delete(modelID);

            if (isSuccessful == true)
            {
                //TODO:xieran20130112 如果删除劳务人员成功,那么其对应的其他信息(工资等)均需要删除
                if (GuidHelper.IsInvalidOrEmpty(modelID) == false)
                {
                    BusinessUserBLL.DeleteUser(GuidHelper.TryConvert(modelID));
                }
            }
            return(isSuccessful);
        }
コード例 #2
0
        /// <summary>
        /// 删除员工
        /// </summary>
        /// <param name="itemKey"></param>
        /// <returns></returns>
        public ActionResult Delete(string itemKey)
        {
            if (GuidHelper.IsInvalidOrEmpty(itemKey) == false)
            {
                bool isSuccessful = EmployeeBLL.Instance.Delete(itemKey);
                if (isSuccessful == true)
                {
                    BusinessUserBLL.DeleteUser(GuidHelper.TryConvert(itemKey));
                }
            }

            string url             = RequestHelper.GetValue("returnUrl");
            bool   isUsingCompress = RequestHelper.GetValue <bool>("isUsingCompress");

            if (isUsingCompress == true)
            {
                url = CompressHelper.Decompress(url);
            }
            return(Redirect(url));
        }