예제 #1
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())
                {
                    string empAccount = empAuthDao.GetEmployeeAccountOfId(qsEmpId);
                    string dbErrMsg   = empAuthDao.GetErrMsg();

                    if (!string.IsNullOrEmpty(empAccount))
                    {
                        accountOfData = empAccount;

                        EmployeeForBackend empData = empAuthDao.GetEmployeeDataForBackend(empAccount);
                        dbErrMsg = empAuthDao.GetErrMsg();

                        if (empData != null)
                        {
                            authAndOwner.OwnerAccountOfDataExamined = empData.OwnerAccount;
                            authAndOwner.OwnerDeptIdOfDataExamined  = empData.OwnerDeptId;
                        }
                    }
                }
            }

            return(authAndOwner);
        }
예제 #2
0
        /// <summary>
        /// 取得員工資料
        /// </summary>
        public EmployeeForBackend GetEmployeeData(int empId)
        {
            EmployeeForBackend entity = null;

            using (EmployeeAuthorityDataAccess empAuthDao = new EmployeeAuthorityDataAccess())
            {
                entity   = empAuthDao.GetEmployeeDataForBackend(empId);
                dbErrMsg = empAuthDao.GetErrMsg();
            }

            return(entity);
        }