public string[] setPropertyRecordDataBase(CreatePropertyRecord propertyRecordData) { PropertyDataBase pDB = new PropertyDataBase(); pDB.propertyFunction(); if (int.Parse(pDB._StaffhaveRoles[1]) == 1) { return pDB.setPropertyRecordDataBase(propertyRecordData); } else { return new string[2] { _noRole, _errorMsg }; } }
public string[] searchPropertyRecordDataBaseCount(SearchPropertyRecord searchRecordData) { PropertyDataBase pDB = new PropertyDataBase(); pDB.propertyFunction(); if (int.Parse(pDB._StaffhaveRoles[3]) == 1) { return pDB.SearchPropertyRecordDataCount(searchRecordData); } else { return new string[2] { _noRole, _errorMsg }; } }
public string[] setPropertyChangesRecord(PropertyChangesExplainData propertyChangesData) { PropertyDataBase pDB = new PropertyDataBase(); pDB.propertyFunction(); if (int.Parse(pDB._StaffhaveRoles[1]) == 1) { return pDB.setPropertyChangesRecord(propertyChangesData); } else { return new string[2] { _noRole, _errorMsg }; } }
public CreatePropertyRecord getPropertyRecordDataBase(string ID) { PropertyDataBase pDB = new PropertyDataBase(); CreatePropertyRecord returnValue = new CreatePropertyRecord(); pDB.propertyFunction(); if (int.Parse(pDB._StaffhaveRoles[3]) == 1) { returnValue= pDB.getPropertyRecordDataBase(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; }