コード例 #1
0
 public Authenticate(FrwUser user, bool isAuthenticate, FrwCompany[] companies, FrwCompany defaultCompany)
 {
     User = user;
     IsAuthenticate = isAuthenticate;
     Companies = companies;
     DefaultCompany = defaultCompany;
 }
コード例 #2
0
 public static void UpdateDefaultParamValueApp(FrwCompany company)
 {
     FrwParamValue[] paramsValue = FrwParamValue.FindAll(Expression.Eq("objIdCompany", company));
     Conjunction conj = new Conjunction();
     conj.Add(Expression.Not(Expression.In("IdParam", paramsValue.Select(x => x.objIdParam.IdParam).ToArray())));
     conj.Add(Expression.Eq("IsCompanyRequired", true));
     FrwParam[] paramsNew = FrwParam.FindAll(conj);
     string[] paramsNames = paramsNew.Select(x => x.IdParam).ToArray();
     AppParamEnum enumTryParse;
     foreach (string item in paramsNames)
     {
         if (Enum.TryParse<AppParamEnum>(item, out enumTryParse))
             FrwParametersHelper.UpdateDefaultParamValue(enumTryParse, company);
     }
 }