Esempio n. 1
0
 protected override void Validation()
 {
     if (_IAssessTemplateItem.GetTemplateItemById(_Item.AssessTemplateItemID) == null)
     {
         BllUtility.ThrowException(BllExceptionConst._AssessTemplateItem_Not_Exist);
     }
     if (_IAssessTemplateItem.CountTemplateItemByQuestionDiffPKID(_Item.AssessTemplateItemID, _Item.Question) > 0)
     {
         BllUtility.ThrowException(BllExceptionConst._AssessTemplateItem_Title_Exist);
     }
 }
Esempio n. 2
0
 protected override void ExcuteSelf()
 {
     try
     {
         _DalRull.DeletePlanDutyTable(_PlanDutyTableId);
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
 protected override void ExcuteSelf()
 {
     try
     {
         _IDiyProcessDal.UpdateDiyProcess(_DiyProcess);
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
 protected override void ExcuteSelf()
 {
     try
     {
         _AccountSetParaID = _DalAccountSet.InsertAccountSetPara(MakeAccountSetPara());
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
Esempio n. 5
0
 protected override void ExcuteSelf()
 {
     try
     {
         _DalReadRull.UpdateAttendanceReadRule(_Read);
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
Esempio n. 6
0
 protected override void ExcuteSelf()
 {
     try
     {
         _IAssessTemplateItem.UpdateTemplateItem(_Item);
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
 protected override void Validation()
 {
     if (_DalAccountSet.GetAccountSetParaByPKID(_AccountSetParaID) == null)
     {
         BllUtility.ThrowException(BllExceptionConst._AccountSetPara_IsNotExist);
     }
     if (_DalAccountSet.CountAccountSetItemByAccountSetParaID(_AccountSetParaID) > 0)
     {
         BllUtility.ThrowException(BllExceptionConst._AccountSetParaName_HasUsed);
     }
 }
Esempio n. 8
0
 protected override void ExcuteSelf()
 {
     try
     {
         _DalRull.UpdatePlanDutyTable(_PlanDutyTable, _PlanDutyTable.PlanDutyAccountList);
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
Esempio n. 9
0
 protected override void Validation()
 {
     if (_DalAccountSet.GetWholeAccountSetByPKID(_AccountSetID) == null)
     {
         BllUtility.ThrowException(BllExceptionConst._AccountSet_IsNotExist);
     }
     if (_DalEmployeeAccountSet.CountEmployeeAccountSetByAccountSetID(_AccountSetID) > 0)
     {
         BllUtility.ThrowException(BllExceptionConst._AccountSet_EmployeeAccountSet_HasUsed);
     }
 }
 protected override void ExcuteSelf()
 {
     try
     {
         _DalAccountSet.DeleteAccountSetParaByPKID(_AccountSetParaID);
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
Esempio n. 11
0
 protected override void ExcuteSelf()
 {
     try
     {
         _TaxDal.UpdateTaxBand(_TaxBandID, _BandMin, _TaxRate);
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
Esempio n. 12
0
 protected override void ExcuteSelf()
 {
     try
     {
         _DalRull.UpdateDutyClass(_DutyClass);
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
Esempio n. 13
0
 /// <summary>
 /// 修改时查看该条记录是否存在,并判断是否有重名
 /// </summary>
 protected override void Validation()
 {
     if (_DalRull.GetDutyClassByPkid(_DutyClass.DutyClassID) == null)
     {
         BllUtility.ThrowException(BllExceptionConst._DutyClass_Not_Exist);
     }
     if (_DalRull.CountDutyClassByDutyClassDiffPkid(_DutyClass.DutyClassID, _DutyClass.DutyClassName) > 0)
     {
         BllUtility.ThrowException(BllExceptionConst._DutyClass_Name_Repeat);
     }
 }
 protected override void ExcuteSelf()
 {
     try
     {
         _DalEmployeeSalary.UpdateEmployeeSalaryHistory(_EmployeeID, MakeEmployeeSalary());
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
 protected override void ExcuteSelf()
 {
     //修改报销单的基本信息
     try
     {
         _DalReimburse.UpdateReimburseItemCustomer(_Reimburse);
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
Esempio n. 16
0
 protected override void ExcuteSelf()
 {
     try
     {
         int ret = _IAssessTemplateItem.InsertTemplateItem(_Item);
         _Item.AssessTemplateItemID = ret;
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
Esempio n. 17
0
 protected override void ExcuteSelf()
 {
     try
     {
         _Reimburse.ReimburseStatus = ReimburseStatusEnum.Auditing;
         _DalReimburse.UpdateReimburse(_LoginUser, _Reimburse, ReimburseStatusEnum.Auditing);
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
Esempio n. 18
0
        protected override void Validation()
        {
            //if (_title == "")
            //{
            //    BllUtility.ThrowException(BllExceptionConst._AssessTemplateItem_Title_Null);
            //}

            if (_IAssessTemplateItem.CountTemplateItemByTitle(_Item.Question) > 0)
            {
                BllUtility.ThrowException(BllExceptionConst._AssessTemplateItem_Title_Exist);
            }
        }
Esempio n. 19
0
 protected override void Validation()
 {
     if (_IAssessTemplatePaper.GetAssessTempletPaperById(_Paper.AssessTemplatePaperID) == null)
     {
         BllUtility.ThrowException(BllExceptionConst._AssessTemplatePaper_Not_Exist);
     }
     if (
         _IAssessTemplatePaper.CountTemplatePaperByPaperNameDiffPKID(_Paper.AssessTemplatePaperID,
                                                                     _Paper.PaperName) > 0)
     {
         BllUtility.ThrowException(BllExceptionConst._AssessTemplatePaper_PaperName_Exist);
     }
     ValideBindPosition();
 }
Esempio n. 20
0
 protected override void Validation()
 {
     //验证报销单已存在,报销单已进入报销流程不可修改或删除
     _EmployeeReimburse = _DalReimburse.GetEmployeeReimburseByEmployeeID(_EmployeeID);
     HRMISModel.Reimburse reimburseOld = _EmployeeReimburse.FindReimburseByReimburseID(_ReimburseID);
     if (reimburseOld == null)
     {
         BllUtility.ThrowException(BllExceptionConst._Reimburse_Not_Exist);
     }
     else if (reimburseOld.ReimburseStatus != ReimburseStatusEnum.Added && reimburseOld.ReimburseStatus != ReimburseStatusEnum.Return)
     {
         BllUtility.ThrowException(BllExceptionConst._Reimburse_Not_Update_Or_Delete);
     }
 }
 protected override void Validation()
 {
     //判断是否存在Para
     _OldAccountSetPara = _DalAccountSet.GetAccountSetParaByPKID(_AccountSetParaID);
     if (_OldAccountSetPara == null)
     {
         BllUtility.ThrowException(BllExceptionConst._AccountSetPara_IsNotExist);
     }
     //判断是否有重名
     if (_DalAccountSet.CountAccountSetParaByNameDiffPKID(_AccountSetParaID, _AccountSetParaName) > 0)
     {
         BllUtility.ThrowException(BllExceptionConst._AccountSetParaName_Repeat);
     }
 }
Esempio n. 22
0
 protected override void ExcuteSelf()
 {
     try
     {
         using (TransactionScope ts = new TransactionScope(TransactionScopeOption.RequiresNew))
         {
             _IFeedBackPaper.UpdateFeedBackPaper(_Paper);
             ts.Complete();
         }
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
 protected override void Validation()
 {
     if (_AccountSet == null)
     {
         BllUtility.ThrowException(BllExceptionConst._EmployeeAccountSet_AccountSet_IsNull);
     }
     else if (_DalAccountSet.GetWholeAccountSetByPKID(_AccountSet.AccountSetID) == null)
     {
         BllUtility.ThrowException(BllExceptionConst._EmployeeAccountSet_AccountSet_NotExist);
     }
     if (_DalEmployeeAccountSet.GetEmployeeAccountSetByEmployeeID(_EmployeeID) == null)
     {
         BllUtility.ThrowException(BllExceptionConst._EmployeeAccountSet_EmployeeAccountSet_NotExist);
     }
 }
Esempio n. 24
0
 protected override void ExcuteSelf()
 {
     try
     {
         using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required))
         {
             _IAssessTemplateItem.DeleteAssessItemByAssessItemID(_AssessItemID);
             ts.Complete();
         }
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
 protected override void Validation()
 {
     _Reimburse = _DalReimburse.GetReimburseByReimburseID(_ReimburseID);
     if (_Reimburse == null)
     {
         BllUtility.ThrowException(BllExceptionConst._Reimburse_Not_Exist);
     }
     if (_Reimburse.ReimburseStatus == ReimburseStatusEnum.Interrupt)
     {
         BllUtility.ThrowException(BllExceptionConst._Reimburse_Has_Interruptted);
     }
     if (_Reimburse.ReimburseStatus == ReimburseStatusEnum.Reimbursed)
     {
         BllUtility.ThrowException(BllExceptionConst._Reimburse_Has_Reimbursed);
     }
 }
Esempio n. 26
0
 protected override void ExcuteSelf()
 {
     try
     {
         using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required))
         {
             _IAssessTemplatePaper.DeleteAssessPaperByAssessPaperID(_AssessPaperID);
             _IAssessTemplatePaper.DeleteAllItemsInPaper(_AssessPaperID);
             _IAssessTemplatePaperBindPosition.DeleteByPaperID(_AssessPaperID);
             ts.Complete();
         }
     }
     catch
     {
         BllUtility.ThrowException(BllExceptionConst._DbError);
     }
 }
Esempio n. 27
0
        protected override void ValidateSelf()
        {
            Model.AssessActivity assessActivity = _IAssessActivity.GetAssessActivityById(_ActivityId);
            if (assessActivity != null)
            {
                string intention = assessActivity.Intention;

                if (_IfSubmit && !AssessActivityUtility.ValidateIntention(intention, _Intention))
                {
                    BllUtility.ThrowException(BllExceptionConst._InvalidIntention);
                }
            }
            if (_ItsAssessActivity.ItsAssessStatus != AssessStatus.PersonalFilling)
            {
                BllUtility.ThrowException(BllExceptionConst._InvalidStatus);
            }
        }
Esempio n. 28
0
        /// <summary>
        /// 员工姓名在dt中的列号
        /// </summary>
        private static int GetEmployeeRow(DataTable dt, string employeeName)
        {
            int j = GetColumnIndex(dt, _NameColumn);

            if (j == -1)
            {
                BllUtility.ThrowException(BllExceptionConst._WithOut_EmployeeName);
            }
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (dt.Rows[i][j].ToString() == employeeName)
                {
                    return(i);
                }
            }
            return(-1);
        }
Esempio n. 29
0
        protected override void ExcuteSelf()
        {
            try
            {
                using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required))
                {
                    _Reimburse.ReimburseStatus = _StatusEnum;
                    _DalReimburse.UpdateReimburse(_LoginUser, _Reimburse, _StatusEnum);

                    ts.Complete();
                }
            }
            catch
            {
                BllUtility.ThrowException(BllExceptionConst._DbError);
            }
        }
Esempio n. 30
0
 protected override void Validation()
 {
     _AssessActivity = _Dal.GetAssessActivityById(_AssessActivityID);
     if (_AssessActivity == null)
     {
         BllUtility.ThrowException(BllExceptionConst._InvalidActivityId);
     }
     _AssessActivity.ItsEmployee.Account =
         BllInstance.AccountBllInstance.GetAccountById(_AssessActivity.ItsEmployee.Account.Id);
     if (_AssessActivity.ItsAssessStatus == AssessStatus.Finish)
     {
         BllUtility.ThrowException(BllExceptionConst._Activity_Is_Finish);
     }
     if (_AssessActivity.ItsAssessStatus == AssessStatus.Interrupt)
     {
         BllUtility.ThrowException(BllExceptionConst._Activity_Is_Interrupt);
     }
 }