Ejemplo n.º 1
0
 public DiscoveryRepository(IInnonAnalyticsEngineEntities db, IConnectorRepository conectorrepository, IRawTableRepository rawtablename, IElementRepository elementrepository)
 {
     _dbcontext             = db;
     _objConectorRepository = conectorrepository;
     _objRawTableName       = rawtablename;
     _objElementRepository  = elementrepository;
 }
Ejemplo n.º 2
0
        public ElementDTO UpdateElement(ElementDTO elementDto)
        {
            if (elementDto == null)
            {
                throw new ElementException(Resources.ElementPointNotFound);
            }

            tblElement element = _dbcontext.tblElements.SingleOrDefault(e => e.ID == elementDto.ID);

            if (element != null)
            {
                try
                {
                    ElementDTO.ConvertDTOToTable(elementDto, ref element);
                    _dbcontext.SaveChanges();

                    //Refresh dbcontext
                    _dbcontext             = new InnonAnalyticsEngineEntities();
                    element                = _dbcontext.tblElements.SingleOrDefault(e => e.ID == elementDto.ID);
                    element.tblTagElements = element.tblTagElements.Where(d => d.Is_Deleted == false).ToList();
                    return(ElementDTO.ConvertTableToDTO(element));
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            else
            {
                throw new ElementException(Resources.ElementPointNotFound);
            }
        }
Ejemplo n.º 3
0
        public IList <Dashboard_Menu_DTO> Get_Dashboard_Menu_ByID(int?menuID)
        {
            _dbcontext = new InnonAnalyticsEngineEntities();
            IList <tblDashboard> tbl_dashboards = (from e in _dbcontext.tblDashboards
                                                   where (menuID.HasValue ? e.Parent_Id == menuID : e.Parent_Id == null) &&
                                                   e.Is_Deleted == false
                                                   orderby e.Title
                                                   select e).ToList();

            return(Dashboard_Menu_DTO_Converter.Dashboard_Menu_DTO_Converter_list_Table_To_DTO(tbl_dashboards));
        }
Ejemplo n.º 4
0
        public MetricRepository(IInnonAnalyticsEngineEntities db, ITagRepository tagRespository)
        {
            _dbcontext      = db;
            _tagRespository = tagRespository;


            if (_pre_define_matric == null)
            {
                _pre_define_matric = Get_Pre_Define_Metrics();
            }
        }
Ejemplo n.º 5
0
        public static void InitializeUnit()
        {
            if (context == null)
            {
                context = new InnonAnalyticsEngineEntities();
            }

            if (Unit_Of_Measurement_DTO.Unit_DTO == null)
            {
                Unit_Of_Measurement_DTO.Unit_DTO = GetAllActiveUnits();
            }
        }
Ejemplo n.º 6
0
        //In Global.asx it will initailize, If want to reinitailze please restart the application pool and run the application
        public static void InitializeLangugae()
        {
            if (context == null)
            {
                context = new InnonAnalyticsEngineEntities();
            }

            objLangugaeValueDTO = LanguageValueDTOConvert.ConvertTableToDTO(getAllActiveLanguage());
            LanguageValueDTOConvert.listLanguageValueDTO = objLangugaeValueDTO;
            if (objLangugaeValueDTO.Count() == 0)
            {
                throw new LanguageException(Resources.LanguageNotFound);
            }
        }
Ejemplo n.º 7
0
        public IList <Dashboard_Menu_DTO> Get_Dashboard_Menu_ByID_ByUserId(int?menuID, string user_ID)
        {
            _dbcontext = new InnonAnalyticsEngineEntities();


            IList <tblDashboard> tbl_dashboards = _dbcontext.AspNetUserDashboards.Where(userdashboard => userdashboard.User_Id == user_ID)
                                                  .Select(dashboard => dashboard.tblDashboard).ToList();

            tbl_dashboards = (from e in tbl_dashboards
                              where (menuID.HasValue ? e.Parent_Id == menuID : e.Parent_Id == null) &&
                              e.Is_Deleted == false
                              orderby e.Title
                              select e).ToList();


            return(Dashboard_Menu_DTO_Converter.Dashboard_Menu_DTO_Converter_list_Table_To_DTO(tbl_dashboards));
        }
Ejemplo n.º 8
0
 public DatawareHouseMigrationLogRepository(IInnonAnalyticsEngineEntities db)
 {
     _dbcontext = db;
 }
Ejemplo n.º 9
0
        //static LanguageRepository()
        //{
        //    getAllActiveLanguage();
        //}

        public UnitRepository(IInnonAnalyticsEngineEntities db)
        {
            context = db;
        }
 public HomePageWidgetRepository(IInnonAnalyticsEngineEntities db, IDashboardRepository dashboadRepository)
 {
     _dbcontext          = db;
     _dashboadRepository = dashboadRepository;
 }
Ejemplo n.º 11
0
 public DashboardRepository(IInnonAnalyticsEngineEntities db, IMetricRepository metric_rep)
 {
     _dbcontext  = db;
     _metric_rep = metric_rep;
 }
Ejemplo n.º 12
0
 public NoteRepository(IInnonAnalyticsEngineEntities _db)
 {
     _dbcontext = _db;
 }
Ejemplo n.º 13
0
 public RawTableRepository(IInnonAnalyticsEngineEntities db)
 {
     _dbcontext = db;
 }
Ejemplo n.º 14
0
 public TagElementRepository(IInnonAnalyticsEngineEntities dbcontext)
 {
     _dbcontext = dbcontext;
 }
Ejemplo n.º 15
0
 public DashboardRepository(IInnonAnalyticsEngineEntities db)
 {
     _dbcontext = db;
 }
Ejemplo n.º 16
0
        //static LanguageRepository()
        //{
        //    getAllActiveLanguage();
        //}

        public LanguageRepository(IInnonAnalyticsEngineEntities db)
        {
            context = db;
        }
Ejemplo n.º 17
0
 public ConnectorRepository(IInnonAnalyticsEngineEntities db)
 {
     _dbcontext = db;
 }
Ejemplo n.º 18
0
 public ElementRepository(IInnonAnalyticsEngineEntities db, IMetricRepository metricRepository, IConnectorRepository connector_rep)
 {
     _dbcontext        = db;
     _metricRepository = metricRepository;
     _connector_rep    = connector_rep;
 }