public StaffResult getOneStaffDataBase(string sID) { StaffDataBase sDB = new StaffDataBase(); sDB.personnelFunction(); StaffResult returnValue = new StaffResult(); if (int.Parse(sDB._StaffhaveRoles[3]) == 1) { returnValue=sDB.getOneStaffDataBase(sID); } else { returnValue.checkNo = _noRole; returnValue.errorMsg = _errorMsg; } List<string> UserFile = sDB.getStaffDataName(HttpContext.Current.User.Identity.Name); if (returnValue.StaffBaseData.unit != UserFile[2] && int.Parse(sDB._StaffhaveRoles[4]) == 0 && UserFile[1].Length > 0) { returnValue.checkNo = _getcheckNo; returnValue.errorMsg = _errorMsg; } return returnValue; }