Beispiel #1
0
 /// <summary>
 /// RestoreEquip - returns EquipmentDto - calls either Rosettian CreateEquipment or UpdateEquipment
 /// </summary>
 /// <param name="equip"></param>
 /// <returns></returns>
 protected static EquipmentDto RestoreEquip(EquipmentDto equip)
 {
     using (var client = new RosettianClient())
     {
         if (!client.EquipmentExists(equip.SerialNumber, user))
         {
             client.CreateEquipment(equip, user);
         }
         else
         {
             client.UpdateEquipment(equip, user);
         }
         return equip;
     }
 }