Esempio n. 1
0
        public void guardLightHandler()
        {
            int          FID                 = selectedFeatures[0].FID;
            short        FNO                 = selectedFeatures[0].FNO;
            IGTKeyObject guardLight          = dataContext.OpenFeature(FNO, FID);
            IGTComponent guardLightComponent = guardLight.Components.GetComponent(g_Gaurd_Light_CNO);

            if (guardLightComponent.Recordset.Fields["LAMP_USE_C"].Value.ToString() == "G")
            {
                replaceOrRemoveDialog dialog = new replaceOrRemoveDialog(FNO);
                dialog.ShowDialog();
                IGTComponent cuAttributes = guardLight.Components.GetComponent(21);
                cuAttributes.Recordset.Fields["ACTIVITY_C"].Value = dialog.activityCode;
                dialog.Close();
            }
            else
            {
                MessageBox.Show("Invalid feature selected, please select a service line, secondary box, or guard light.");
                customCommandHelper.Complete();
            }
        }
Esempio n. 2
0
 public void featureHandler()
 {
     if (selectedFeatures[0].FNO == g_Secondary_Box_FNO)
     {
         foreach (IGTDDCKeyObject feature in selectedFeatures)
         {
             IGTKeyObject keyObject    = dataContext.OpenFeature(feature.FNO, feature.FID);
             IGTComponent cuAttributes = keyObject.Components.GetComponent(21);
             cuAttributes.Recordset.Fields["ACTIVITY_C"].Value = "UR";
         }
     }
     else
     {
         foreach (IGTDDCKeyObject feature in selectedFeatures)
         {
             replaceOrRemoveDialog dialog = new replaceOrRemoveDialog(feature.FNO);
             dialog.ShowDialog();
             IGTKeyObject keyObject    = dataContext.OpenFeature(feature.FNO, feature.FID);
             IGTComponent cuAttributes = keyObject.Components.GetComponent(21);
             cuAttributes.Recordset.Fields["ACTIVITY_C"].Value = dialog.activityCode;
             dialog.Close();
         }
     }
 }