Example #1
0
        private void ButtonEditSettings_OnDefaultButtonClick(object sender, System.Windows.RoutedEventArgs e)
        {
            RsRoutingDetail routingDetail = gridProcessInfo.SelectedItem as RsRoutingDetail;

            if (routingDetail != null)
            {
                DeviceSelect deviceSelect = new DeviceSelect(routingDetail);
                deviceSelect.Closed += DeviceSelect_Closed;
                deviceSelect.Show();
            }
        }
Example #2
0
        private void DeviceSelect_Closed(object sender, EventArgs e)
        {
            DeviceSelect    deviceSelect  = sender as DeviceSelect;
            AmAssetMasterN  amAssetMaster = deviceSelect.Tag as AmAssetMasterN;
            RsRoutingDetail routingDetail = gridProcessInfo.SelectedItem as RsRoutingDetail;

            if (routingDetail != null && amAssetMaster != null)
            {
                if (routingDetail.WC_ABV != amAssetMaster.ASSET_CODE)
                {
                    routingDetail.WC_ABV  = amAssetMaster.ASSET_CODE;
                    routingDetail.OP_TYPE = amAssetMaster.ASSET_NAME;
                }
            }
        }