public string[] printApplyPropertyDataBase(string tID) { PropertyDataBase pDB = new PropertyDataBase(); CreateApplyProperty getData =pDB.getApplyPropertyDataBase(tID); pDB.applyFunction(); if (int.Parse(pDB._StaffhaveRoles[3]) == 1 && getData.applyByID == HttpContext.Current.User.Identity.Name) { return pDB.printApplyPropertyDataBase(tID); } else { return new string[2] { _noRole, _errorMsg }; } }
public CreateApplyProperty getApplyPropertyDataBase(string ID) { PropertyDataBase pDB = new PropertyDataBase(); CreateApplyProperty returnValue = new CreateApplyProperty(); pDB.applyFunction(); if (int.Parse(pDB._StaffhaveRoles[3]) == 1) { returnValue=pDB.getApplyPropertyDataBase(ID); } else { returnValue.checkNo = _noRole; returnValue.errorMsg = _errorMsg; } StaffDataBase sDB = new StaffDataBase(); List<string> UserFile = sDB.getStaffDataName(HttpContext.Current.User.Identity.Name); if (returnValue.Unit != UserFile[2] && int.Parse(pDB._StaffhaveRoles[4]) == 0 && UserFile[1].Length > 0) { returnValue.checkNo = _getcheckNo; returnValue.errorMsg = _errorMsg; } return returnValue; }