Exemple #1
0
        /// <summary>
        ///  根据厂别初始化机台状态画面
        /// </summary>
        private void IniFoad()
        {
            EquipmentLayoutEntity equipmentLayoutEntity = new EquipmentLayoutEntity();
            string    msg       = string.Empty;
            DataTable dataTable = new DataTable();

            dataTable = equipmentLayoutEntity.SearchEquipmentLayout("", out msg);
            //if (string.IsNullOrEmpty(msg)) //返回是否有错误
            //{
            //}
            //else
            //{
            //}
            string strFactoryRoom = PropertyService.Get(PROPERTY_FIELDS.FACTORY_CODE);

            DataRow[] selectedRows = dataTable.Select("LAYOUT_NAME ='" + strFactoryRoom + "'");
            if (selectedRows.Length > 0)
            {
                DataRow selectedRow = selectedRows[0];


                equLayoutKey         = selectedRow[EMS_LAYOUT_MAIN_FIELDS.LAYOUT_KEY].ToString();
                this.txtPicName.Text = selectedRow[EMS_LAYOUT_MAIN_FIELDS.LAYOUT_NAME].ToString();
                this.txtPicName.Tag  = equLayoutKey;
                DataSet dsReturn = EquLayoutEntity.GetEquipmentLayoutDetail(equLayoutKey, out msg);
                if (string.IsNullOrEmpty(msg))
                {
                    QueryEquipmentData(dsReturn);
                }
            }
            else
            {
                MessageBox.Show(StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.EquipmentLayout.msg.0001}"));//没有和当前车间代码一样的设备看板图,请自己导入
            }
        }
Exemple #2
0
        private void btnC3C1_Click(object sender, EventArgs e)
        {
            EquipmentLayoutEntity equipmentLayoutEntity = new EquipmentLayoutEntity();
            string    msg       = string.Empty;
            DataTable dataTable = new DataTable();

            dataTable = equipmentLayoutEntity.SearchEquipmentLayout("", out msg);
            DataRow[] selectedRows = dataTable.Select("LAYOUT_NAME ='C3C1'");
            if (selectedRows.Length > 0)
            {
                DataRow selectedRow = selectedRows[0];
                equLayoutKey         = selectedRow[EMS_LAYOUT_MAIN_FIELDS.LAYOUT_KEY].ToString();
                this.txtPicName.Text = selectedRow[EMS_LAYOUT_MAIN_FIELDS.LAYOUT_NAME].ToString();
                this.txtPicName.Tag  = equLayoutKey;
                DataSet dsReturn = EquLayoutEntity.GetEquipmentLayoutDetail(equLayoutKey, out msg);
                if (string.IsNullOrEmpty(msg))
                {
                    QueryEquipmentData(dsReturn);
                }
            }
        }