public IActionResult SearchPCBParameter(Int64 ParameterID)
        {
            ParameterService parameterService = new ParameterService(_context);

            List <PDC_Parameter> model = new List <PDC_Parameter>();

            model = parameterService.GetParameterList(ParameterID);

            return(Json(model));
        }
        //consume custom security service to get all roles
        public IActionResult Index()
        {
            m_ConfigurationPartial model            = new m_ConfigurationPartial();
            ParameterService       parameterService = new ParameterService(_context);
            FileService            FileService      = new FileService(_hostingEnvironment, _context);

            var user = _userManager.GetUserId(HttpContext.User);

            //組態設定-CNS範本
            if (_context.PDC_File.Where(x => x.FunctionName == "ConfigurationSample").Any())
            {
                model.CNS_Sample = _context.PDC_File.Where(x => x.FunctionName == "ConfigurationSample").OrderByDescending(x => x.CreatorDate).FirstOrDefault();
            }
            //組態設定-首頁連結
            model.HomeLinkList     = parameterService.GetParameterList("Configuration_HomeLink");
            model.HomeLinkFileList = _context.PDC_File.Where(x => x.FunctionName == "Configuration_HomeLink").ToList();

            //組態設定-圖文說明
            model.PCBTypeList = parameterService.GetSelectList("PCBLayoutConstraint");
            if (model.PCBTypeList.Any())
            {
                model.PCBTypeItemList = parameterService.GetSelectList(Convert.ToInt64(model.PCBTypeList.First().Value));
            }

            //組態設定-清單與罐頭
            model.PCBParameterList = parameterService.GetSelectList("PCBTypeList");
            //組態設定-其他
            model.Announcement    = parameterService.GetParameterOne("ConfigurationAnnouncement");
            model.Description     = parameterService.GetParameterOne("ConfigurationDescription");
            model.ApplyDraw       = parameterService.GetParameterOne("ConfigurationApplyDraw");
            model.SendReturn      = parameterService.GetParameterOne("ConfigurationSendReturn");
            model.Release         = parameterService.GetParameterOne("ConfigurationRelease");
            model.Reject          = parameterService.GetParameterOne("ConfigurationReject");
            model.FormApply       = parameterService.GetParameterOne("ConfigurationFormApply");
            model.WorkDetail      = parameterService.GetParameterOne("ConfigurationWorkDetail");
            model.WorkDetail_File = FileService.GetFileList("ConfigurationWorkDetail", model.WorkDetail.ParameterID).FirstOrDefault();

            model.SystemCategoryList = parameterService.GetSelectList("SystemCategory", false);

            return(View(model));
        }
Exemplo n.º 3
0
        //consume custom security service to get all roles
        public IActionResult Index()
        {
            FileService      FileService      = new FileService(_hostingEnvironment, _context);
            ParameterService ParameterService = new ParameterService(_context);
            m_ExcelPartial   model            = new m_ExcelPartial();

            //取得要同步驗證的資料
            model.FastLinkList = ParameterService.GetParameterList("Configuration_HomeLink").Where(x => x.IsSync == true).OrderBy(x => x.OrderNo).ToList();
            //取得要同步驗證的連結
            model.FastLinkFileList = FileService.GetFileList("Configuration_HomeLink").Where(x => model.FastLinkList.Select(pa => pa.ParameterID).Contains(x.SourceID)).ToList();
            //取得Excel範本
            PDC_File sample = FileService.GetFileList("ConfigurationSample").FirstOrDefault();

            //加入Excel範本
            if (sample != null)
            {
                model.FastLinkFileList.Add(sample);
            }

            return(View(model));
        }