Ejemplo n.º 1
0
 /// <summary>
 /// 綁定機台的實時生產數據
 /// </summary>
 /// <param name="strMacNo">機台編號</param>
 private void BindMacSummary(string strMacNo)
 {
     MachineRealtimeSummaryBLL macSummaryBL = new MachineRealtimeSummaryBLL();
     MachineRealtimeSummary searchInfo = new MachineRealtimeSummary();
     searchInfo.MachineNO = strMacNo.Trim();
     List<MachineRealtimeSummary> listSummaries = macSummaryBL.GetMacRealtimeSummaries(searchInfo);
     this.dtvMacSummary.DataSource = listSummaries;
     this.dtvMacSummary.DataBind();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 綁定指定機台主檔信息
 /// </summary>
 /// <param name="strMacNo">機台編號</param>
 private void BindMacDetail(string strMacNo)
 {
     List<MachineMaster_mmt_Info> listSource = null;
     MachineRealtimeSummaryBLL macMasterBL = new MachineRealtimeSummaryBLL();
     MachineMaster_mmt_Info macInfo = macMasterBL.GetMachineMasterInfo(strMacNo);
     if (macInfo != null)
     {
         listSource = new List<MachineMaster_mmt_Info>();
         listSource.Add(macInfo);
     }
     this.dtvMacInfo.DataSource = listSource;
     this.dtvMacInfo.DataBind();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 緩存本地數據
        /// </summary>
        /// <param name="cacheType">緩存類型</param>
        private void BufferLocalDataSource(EnmCacheName cacheType)
        {
            if (this.m_MacSummaryBL == null)
            {
                this.m_MacSummaryBL = new MachineRealtimeSummaryBLL();
            }

            switch (cacheType)
            {
                case EnmCacheName.DeptInfos:
                    {
                        //綁定事業單位信息
                        List<string> listDeptNames = this.m_MacSummaryBL.GetAllDepartmentNames();
                        Cache.Remove(EnmCacheName.DeptInfos.ToString());
                        Cache.Insert(EnmCacheName.DeptInfos.ToString(), listDeptNames);
                        break;
                    }
                case EnmCacheName.AreaInfos:
                    {
                        //綁定生產區域信息
                        List<AreaMaster_amr_Info> listAreaInfo = this.m_MacSummaryBL.GetAreaInfosWithDeptName(null);
                        Cache.Remove(EnmCacheName.AreaInfos.ToString());
                        Cache.Insert(EnmCacheName.AreaInfos.ToString(), listAreaInfo);
                        break;
                    }
                case EnmCacheName.MachineStatus:
                    {
                        //機台狀態
                        List<CodeMaster_cmt_Info> listMacStatus = this.m_MacSummaryBL.GetMasterRecords_MachineStatus();
                        Cache.Remove(EnmCacheName.MachineStatus.ToString());
                        Cache.Insert(EnmCacheName.MachineStatus.ToString(), listMacStatus);
                        break;
                    }
                case EnmCacheName.MacSummaryRecords:
                    {
                        //機台實時生產數據
                        List<MachineRealtimeSummary> listSummaries = this.m_MacSummaryBL.GetAllMacRealtimeSummaries();
                        Cache.Remove(EnmCacheName.MacSummaryRecords.ToString());
                        Cache.Insert(EnmCacheName.MacSummaryRecords.ToString(), listSummaries);
                        break;
                    }
                default:
                    break;
            }
        }