Exemplo n.º 1
0
        /// <summary>
        /// 取得部門資料
        /// </summary>
        public DepartmentForBackend GetDepartmentData(int deptId)
        {
            DepartmentForBackend entity = null;

            using (EmployeeAuthorityDataAccess empAuthDao = new EmployeeAuthorityDataAccess())
            {
                entity   = empAuthDao.GetDepartmentDataForBackend(deptId);
                dbErrMsg = empAuthDao.GetErrMsg();
            }

            return(entity);
        }
Exemplo n.º 2
0
        public EmployeeAuthorizationsWithOwnerInfoOfDataExamined InitialAuthorizationResult(bool isTopPageOfOperation, EmployeeAuthorizations authorizations)
        {
            EmployeeAuthorizationsWithOwnerInfoOfDataExamined authAndOwner = new EmployeeAuthorizationsWithOwnerInfoOfDataExamined(authorizations);

            if (!isTopPageOfOperation)
            {
                // get owner info for config-form
                using (EmployeeAuthorityDataAccess empAuthDao = new EmployeeAuthorityDataAccess())
                {
                    DepartmentForBackend dept = empAuthDao.GetDepartmentDataForBackend(qsId);
                    string dbErrMsg           = empAuthDao.GetErrMsg();

                    if (dept != null)
                    {
                        authAndOwner.OwnerAccountOfDataExamined = dept.PostAccount ?? "";
                        authAndOwner.OwnerDeptIdOfDataExamined  = dept.PostDeptId;
                    }
                }
            }

            return(authAndOwner);
        }