public Authenticate(FrwUser user, bool isAuthenticate, FrwCompany[] companies, FrwCompany defaultCompany) { User = user; IsAuthenticate = isAuthenticate; Companies = companies; DefaultCompany = defaultCompany; }
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); } }