private PriceQuotationMngEntities CreateContext() { PriceQuotationMngEntities context = new PriceQuotationMngEntities(Helper.CreateEntityConnectionString("DAL.PriceQuotationMngModel")); context.Database.CommandTimeout = 180; return(context); }
private bool CheckIsFactory(PriceQuotationMngEntities context, int userId) { Framework.DAL.DataFactory factory = new Framework.DAL.DataFactory(); int? companyLogin = factory.GetCompanyID(userId); List <int?> companyInternals = context.SupportMng_InternalCompany2_View.Select(o => o.InternalCompanyID).ToList(); return(!companyInternals.Contains(companyLogin)); }