Exemple #1
0
        public List <T_FB_BUDGETACCOUNT> FetchSalaryBudget(string companyID, string departmentID)
        {
            string subjectID            = string.Empty;
            T_FB_SYSTEMSETTINGS setting = SystemBLL.GetSetting(null);

            if (setting != null)
            {
                subjectID = setting.SALARYSUBJECTID;
            }
            if (string.IsNullOrEmpty(subjectID))
            {
                return(new List <T_FB_BUDGETACCOUNT>());
            }

            return(FetchBudgetAccount(subjectID, companyID, departmentID, BudgetAccountBLL.AccountObjectType.Deaprtment));
        }
Exemple #2
0
        public bool HRPersonPostChanged(T_HR_EMPLOYEEPOSTCHANGE personChange, ref string message)
        {
            try
            {
                using (FBCommonBLL bll = new FBCommonBLL())
                {
                    var setting = SystemBLL.GetSetting(null);

                    var qePostID    = QueryExpression.Equal(FieldName.OwnerPostID, personChange.FROMPOSTID);
                    var qeOwnerID   = QueryExpression.Equal(FieldName.OwnerID, personChange.T_HR_EMPLOYEE.EMPLOYEEID);
                    var qeSubjectID = QueryExpression.Equal("T_FB_SUBJECT.SUBJECTID", setting.MONEYASSIGNSUBJECTID);
                    qePostID.RelatedExpression  = qeOwnerID;
                    qeOwnerID.RelatedExpression = qeSubjectID;


                    var entity = bll.GetEntity <T_FB_BUDGETACCOUNT>(qePostID);

                    if (entity != null)
                    {
                        entity.OWNERCOMPANYID    = personChange.TOCOMPANYID;
                        entity.OWNERDEPARTMENTID = personChange.TODEPARTMENTID;
                        entity.OWNERPOSTID       = personChange.TOPOSTID;
                        entity.OWNERID           = personChange.T_HR_EMPLOYEE.EMPLOYEEID;

                        bll.BassBllSave(entity, FBEntityState.Modified);
                    }

                    return(true);
                }
            }
            catch (Exception ex)
            {
                message = "修改异动后的预算活动经费数据异常!";
                Tracer.Debug(message + " 异常信息: " + ex.ToString());
                return(false);
            }
        }