Ejemplo n.º 1
0
        public override bool Create(EnterpriseContractEntity model)
        {
            bool isSuccessful = base.Create(model);

            OperateLogBLL.RecordOperateLog(string.Format("创建企业合同信息{0}", isSuccessful == true ? "成功" : "失败"), "EnterpriseContract", model.ContractGuid.ToString(), model.EnterpriseInfo, model, null);
            //RecordOperateLog(model, null, string.Format("创建企业合同信息{0}", isSuccessful == true ? "成功" : "失败"));
            return(isSuccessful);
        }
Ejemplo n.º 2
0
        public override bool Update(EnterpriseContractEntity model)
        {
            EnterpriseContractEntity originalModel = Get(model.ContractGuid, true);
            bool isSuccessful = base.Update(model);

            OperateLogBLL.RecordOperateLog(string.Format("修改企业合同信息{0}", isSuccessful == true ? "成功" : "失败"), "EnterpriseContract", model.ContractGuid.ToString(), model.EnterpriseInfo, model, originalModel);
            //RecordOperateLog(model, originalModel, string.Format("修改企业合同信息{0}", isSuccessful == true ? "成功" : "失败"));
            return(isSuccessful);
        }
Ejemplo n.º 3
0
        public override bool Create(LaborContractEntity model)
        {
            bool isSuccessful = base.Create(model);

            if (isSuccessful == true && model.LaborContractIsCurrent == Logics.True)
            {
                UpdateCurrentContractData(model);
            }

            OperateLogBLL.RecordOperateLog(string.Format("创建劳务人员合同信息{0}", isSuccessful == true ? "成功" : "失败"), "LaborContract", model.LaborContractGuid.ToString(), model.Labor.UserNameDisplay, model, null);
            return(isSuccessful);
        }
Ejemplo n.º 4
0
        public override bool Update(LaborEntity model)
        {
            LaborEntity originalModel = Get(model.UserGuid, true);
            bool        isSuccessful  = BusinessUserBLL.UpdateUser(model);

            if (isSuccessful == true)
            {
                //TIP:xieran2012124 保存即加锁锁定
                model.IsProtectedByOwner = Logics.True;
                isSuccessful             = base.Update(model);
            }
            OperateLogBLL.RecordOperateLog(string.Format("修改劳务人员信息{0}", isSuccessful == true ? "成功" : "失败"), "Labor", model.UserGuid.ToString(), model.UserNameDisplay, model, originalModel);

            return(isSuccessful);
        }
Ejemplo n.º 5
0
        public new CreateUserRoleStatuses Create(LaborEntity model)
        {
            CreateUserRoleStatuses createStatus;

            BusinessUserBLL.CreateUser(model, out createStatus);
            if (createStatus == CreateUserRoleStatuses.Successful)
            {
                bool isSuccessful = base.Create(model);
                OperateLogBLL.RecordOperateLog(string.Format("创建劳务人员信息{0}", isSuccessful == true ? "成功" : "失败"), "Labor", model.UserGuid.ToString(), model.UserNameDisplay, model, null);
                if (isSuccessful == true)
                {
                    return(CreateUserRoleStatuses.Successful);
                }
                else
                {
                    return(CreateUserRoleStatuses.FailureUnknowReason);
                }
            }
            else
            {
                return(createStatus);
            }
        }