Example #1
0
        public ActionResult SectionPartial(int typeId)
        {
            IList <SectionItem> sectionList = SectionDao.FindByTypeId(typeId);

            ViewBag.Section = sectionList;
            ViewBag.Count   = sectionList.Count;
            return(PartialView("~/Views/Lecture/SectionPartial.cshtml"));
        }
 public MapBLL(WindownApplication _app)
 {
     app             = _app;
     objCacheManager = app.ObjCacheManager;
     adrDAO          = app.AddressDao;
     sectionDAO      = app.SectionDao;
     segmentDAO      = app.SegmentDao;
     portDAO         = app.PortDao;
     groupRailDAO    = app.GroupRailDao;
     railDAO         = app.RailDao;
     pointDAO        = app.PointDao;
     portIconDAO     = app.PortIconDao;
 }
Example #3
0
        public ActionResult Update(int id)
        {
            LectureDetailItem           item         = LectureDetailDao.FindById(id);
            IList <LectureCategoryItem> categoryList = LectureCategoryDao.FindAll();
            IList <LectureTypeItem>     typeList     = LectureTypeDao.FindByCategoryId(item.LectureCategoryId);
            IList <SectionItem>         sectionList  = SectionDao.FindByTypeId(item.LectureTypeId);

            ViewBag.categoryList = categoryList;
            ViewBag.Item         = item;
            ViewBag.typeList     = typeList;
            ViewBag.sectionList  = sectionList;
            return(View());
        }
Example #4
0
            public VehicleDataSetting()
            {
                VSection100Dao    = new ViewSectionDao();
                SegmentDao        = new SegmentDao();
                AddressDataDao    = new AddressDataDao();
                ScaleBaseDataDao  = new ScaleBaseDataDao();
                ControlDataDao    = new ControlDataDao();
                VehicleControlDao = new VehicleControlDao();

                SectionDao        = new SectionDao();
                sectionControlDao = new ohxc.winform.Dao.MirleOHS_100.SectionControlDao();

                start(VSection100Dao, SegmentDao, AddressDataDao, ScaleBaseDataDao, ControlDataDao, VehicleControlDao);
            }
Example #5
0
        //
        // GET: /Result/
        public ActionResult Index()
        {
            ResultService service = new ResultService();

            service.CategoryRequirements = LectureCategoryRequirementDao.FindByAccountId(accountItem.Id);
            service.LectureDetails       = LectureDetailDao.FindByAccountId(accountItem.Id);
            service.ScoreRequirement     = ScoreRequirementDao.FindByAccountIdForCheck(accountItem.Id);
            service.SectionRequirement   = SectionRequirementDao.FindByAccountIdForCheck(accountItem.Id);
            service.Sections             = SectionDao.FindAll();
            service.TypeRequirements     = LectureTypeRequirementDao.FindByAccountId(accountItem.Id);
            ViewBag.Results     = service.GetResults();
            ViewBag.IsAllPassed = IsAllPassed(ViewBag.Results);
            return(View());
        }
 public void start(SCApplication app)
 {
     scApp               = app;
     railDAO             = scApp.RailDao;
     adrDAO              = scApp.AddressDao;
     portDAO             = scApp.PortDao;
     portIconDAO         = scApp.PortIconDao;
     pointDAO            = scApp.PointDao;
     groupRailDAO        = scApp.GroupRailDao;
     sectionDAO          = scApp.SectionDao;
     segmentDAO          = scApp.SegmentDao;
     vehicleDAO          = scApp.VehicleDao;
     blockZoneMasterDao  = scApp.BlockZoneMasterDao;
     blockZoneDetaiDao   = scApp.BolckZoneDetaiDao;
     blockZoneQueueDao   = scApp.BlockZoneQueueDao;
     commObjCacheManager = scApp.getCommObjCacheManager();
 }
Example #7
0
        public ActionResult Register()
        {
            // IList<LectureDetailItem> list = LectureDetailDao.FindAll();
            // ViewBag.Detail = list;

            IList <LectureCategoryItem> categoryList = LectureCategoryDao.FindAll();

            ViewBag.Category = categoryList;

            IList <LectureTypeItem> typeList = LectureTypeDao.FindByCategoryId(categoryList[0].Id);

            ViewBag.Type = typeList;

            IList <SectionItem> sectionList = SectionDao.FindByTypeId(typeList[0].Id);

            ViewBag.Section = sectionList;
            return(View());
        }
Example #8
0
            private void updateSection(ASECTION sec)
            {
                ASECTION secTemp = new ASECTION();

                using (sc.Data.DBConnection_EF con = sc.Data.DBConnection_EF.GetUContext())
                {
                    secTemp.SEC_ID  = sec.SEC_ID;
                    secTemp.SUB_VER = "";
                    con.ASECTION.Attach(secTemp);
                    secTemp.DIRC_DRIV     = sec.DIRC_DRIV;
                    secTemp.DIRC_GUID     = sec.DIRC_GUID;
                    secTemp.CDOG_1        = sec.CDOG_1;
                    secTemp.CDOG_2        = sec.CDOG_2;
                    secTemp.CHG_SEG_NUM_1 = sec.CHG_SEG_NUM_1;
                    secTemp.CHG_SEG_NUM_2 = sec.CHG_SEG_NUM_2;
                    secTemp.SEC_DIS       = sec.SEC_DIS;
                    secTemp.SEC_SPD       = sec.SEC_SPD;
                    secTemp.PRE_BLO_REQ   = sec.PRE_BLO_REQ;
                    secTemp.AREA_SECSOR   = sec.AREA_SECSOR;
                    //secTemp.PRE_DIV = sec.PRE_DIV;

                    con.Entry(secTemp).Property(p => p.DIRC_DRIV).IsModified     = true;
                    con.Entry(secTemp).Property(p => p.DIRC_GUID).IsModified     = true;
                    con.Entry(secTemp).Property(p => p.CDOG_1).IsModified        = true;
                    con.Entry(secTemp).Property(p => p.CDOG_2).IsModified        = true;
                    con.Entry(secTemp).Property(p => p.CHG_SEG_NUM_1).IsModified = true;
                    con.Entry(secTemp).Property(p => p.CHG_SEG_NUM_2).IsModified = true;
                    con.Entry(secTemp).Property(p => p.SEC_DIS).IsModified       = true;
                    con.Entry(secTemp).Property(p => p.SEC_SPD).IsModified       = true;
                    con.Entry(secTemp).Property(p => p.PRE_BLO_REQ).IsModified   = true;
                    con.Entry(secTemp).Property(p => p.AREA_SECSOR).IsModified   = true;
                    //con.Entry(secTemp).Property(p => p.PRE_DIV).IsModified = true;

                    SectionDao.update(con, secTemp);
                    con.Entry(secTemp).State = System.Data.Entity.EntityState.Detached;
                }
            }
 public Database(SectionDao dao)
 {
     SectionDao = dao;
 }
 public Database(SectionDao dao)
 {
 }
        public WindownApplication()
        {
            ViewerID         = getString("Viewer_ID", "");
            webClientManager = WebClientManager.getInstance();

            ObjCacheManager = new ObjCacheManager(this);

            elasticSearchManager = new ElasticSearchManager();

            RailDao             = new RAILDao();
            AddressDao          = new ADDRESSDao();
            PortIconDao         = new PortIconDao();
            PointDao            = new POINTDao();
            GroupRailDao        = new GROUPRAILSDao();
            SegmentDao          = new SegmentDao();
            SectionDao          = new SectionDao();
            PortDao             = new PortDao();
            VehicleDao          = new VehicleDao();
            UserDao             = new UserDao();
            UserGroupDao        = new UserGroupDao();
            UserFuncDao         = new UserFuncDao();
            FunctionCodeDao     = new FunctionCodeDao();
            CMD_OHTCDao         = new CMD_OHTCDao();
            CMD_MCSDao          = new CMD_MCSDao();
            VCMD_MCSDao         = new VCMD_MCSDao();
            PortStationDao      = new PortStationDao();
            AlarmDao            = new AlarmDao();
            MapBLL              = new MapBLL(this);
            UserBLL             = new UserBLL(this);
            OperationHistoryBLL = new OperationHistoryBLL(this);
            CmdBLL              = new CmdBLL(this);
            AlarmBLL            = new AlarmBLL(this);
            PortStationBLL      = new PortStationBLL(this);
            SegmentBLL          = new SegmentBLL(this);
            ObjCacheManager.start();
            ID = ObjCacheManager.MapId;

            LineBLL             = new LineBLL(this);
            VehicleBLL          = new VehicleBLL(this);
            SysExcuteQualityBLL = new SysExcuteQualityBLL(this);

            dBTableWatcher = new EventAction.DBTableWatcher(this);
            dBTableWatcher.initStart();
            // setEFConnectionString(ObjCacheManager.EFConnectionString);



            SysExcuteQualityQueryService = new SysExcuteQualityQueryService(this);
            //initBackgroundWork();
            //  SysExcuteQualityQueryService = new SysExcuteQualityQueryService();
            switch (WindownApplication.OHxCFormMode)
            {
            case OHxCFormMode.CurrentPlayer:
                natsManager       = new NatsManager(ID, "nats-cluster", ViewerID);
                redisCacheManager = new RedisCacheManager(ID);
                SubscriberNatsEvent();
                SubscriberDBTableWatcherEvent();
                //SysExcuteQualityQueryService.start();
                break;

            case OHxCFormMode.HistoricalPlayer:
                HistoricalReplyService = new HistoricalReplyService(this);
                //HistoricalReplyService.loadVhHistoricalInfo();
                break;
            }
            //VehicleBLL.ReguestViewerUpdate();
        }