Ejemplo n.º 1
0
 public string[] setApplyPropertyDetail(PropertyDetailData PropertyDetail)
 {
     PropertyDataBase pDB = new PropertyDataBase();
     pDB.applyFunction();
     if (int.Parse(pDB._StaffhaveRoles[1]) == 1)
     {
         return pDB.setApplyPropertyDetail(PropertyDetail);
     }
     else
     {
         return new string[2] { _noRole, _errorMsg };
     }
 }
Ejemplo n.º 2
0
 public string[] searchApplyPropertyDataBaseCount(SearchApplyProperty searchApplyData)
 {
     PropertyDataBase pDB = new PropertyDataBase();
     pDB.applyFunction();
     if (int.Parse(pDB._StaffhaveRoles[3]) == 1)
     {
         return pDB.SearchApplyPropertyDataCount(searchApplyData);
     }
     else
     {
         return new string[2] { _noRole, _errorMsg };
     }
 }
Ejemplo n.º 3
0
 public string[] createApplyPropertyDataBase(CreateApplyProperty applyPropertyData)
 {
     PropertyDataBase pDB = new PropertyDataBase();
     pDB.applyFunction();
     if (int.Parse(pDB._StaffhaveRoles[2]) == 1)
     {
         return pDB.createApplyPropertyData(applyPropertyData);
     }
     else
     {
         return new string[2] { _noRole, _errorMsg };
     }
 }
Ejemplo n.º 4
0
 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 };
     }
 }
Ejemplo n.º 5
0
 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;
 }