Ejemplo n.º 1
0
 private void OnGridSelectionChanged(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e)
 {
     //Event handler for after selection changes
     try {
         //Select grid and forward to update
         this.mType = null;
         if (this.grdComponents.Selected.Rows.Count > 0)
         {
             string typeID = this.grdComponents.Selected.Rows[0].Cells["TypeID"].Value.ToString();
             this.mType = MobileDevicesProxy.GetComponentType(typeID);
         }
     }
     catch (Exception ex) { App.ReportError(ex, false, Argix.Terminals.LogLevel.Warning); }
     finally { setServices(); }
 }
Ejemplo n.º 2
0
 public void Create()
 {
     try {
         ComponentType    type    = MobileDevicesProxy.GetComponentType("");
         dlgComponentType dlgType = new dlgComponentType(type);
         if (dlgType.ShowDialog(this) == DialogResult.OK)
         {
             //Create a new component type
             setStatusMessage("Creating new component type " + type.TypeID + "...");
             if (MobileDevicesProxy.SaveComponentType(type))
             {
                 setStatusMessage("Component type " + type.TypeID + " was created.");
                 Refresh2();
             }
             else
             {
                 MessageBox.Show(this, "Component type " + type.TypeID + " could not be created. Please try again.", this.Text, MessageBoxButtons.OK);
             }
         }
     }
     catch (Exception ex) { App.ReportError(ex, true, Argix.Terminals.LogLevel.Error); }
 }