Exemple #1
0
        public static List <BaseCompany> GetCurrLoginUserRoleCompany(string companyId, string userId)
        {
            List <BaseVillage> villages      = VillageServices.QueryVillageByUserId(userId);
            List <BaseCompany> validCompanys = new List <BaseCompany>();
            List <BaseCompany> allComapnys   = CompanyServices.QueryCompanyAndSubordinateCompany(companyId);

            foreach (var item in villages)
            {
                CompanyServices.GetCurrLoginUserRoleCompany(validCompanys, allComapnys, item.CPID);
            }
            return(validCompanys);
        }
Exemple #2
0
 public static string GetCompanyId(string parkingId, string boxId)
 {
     if (!string.IsNullOrWhiteSpace(parkingId))
     {
         BaseCompany company = CompanyServices.QueryByParkingId(parkingId);
         if (company != null)
         {
             return(company.CPID);
         }
     }
     if (!string.IsNullOrWhiteSpace(boxId))
     {
         BaseCompany company = CompanyServices.QueryByBoxID(boxId);
         if (company != null)
         {
             return(company.CPID);
         }
     }
     return(string.Empty);
 }