Exemplo n.º 1
0
 /// <summary>
 /// DeleteLocation - deletes a location - calls Rosettian DeleteLocation
 /// </summary>
 /// <param name="locId"></param>
 public static void DeleteLocation(string locId)
 {
     using (var client = new SIMPL.DAL.Rosettian.RosettianClient())
     {
         if (client.LocationExists(locId, user))
         {
             client.DeleteLocation(new LocationDto{ID=locId},user);
         }
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Return2Headend - returns the item to headend - calls Rosettian ReturnToHeadend
        /// </summary>
        /// <param name="locId"></param>
        public static void Return2Headend(string locId)
        {
            using (var client = new SIMPL.DAL.Rosettian.RosettianClient())
            {
                var currentEquipOnLoc =
                    client.SearchEquipment(new SearchFieldsDto {LocationId = locId}, user)
                        .Where(x => x.LocationId == locId)
                        .ToList();

                if (currentEquipOnLoc.Any())
                {
                    client.ReturnToHeadend(currentEquipOnLoc.Select(x => x.SerialNumber).ToList(), user);
                }
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// LocationExists - returns a bool based on Rosettian LocationExists 
 /// </summary>
 /// <param name="locId"></param>
 /// <returns></returns>
 public static bool LocationExists(string locId)
 {
     using (var client = new SIMPL.DAL.Rosettian.RosettianClient())
     {
         return client.LocationExists(locId, user);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// LoadSubscriber - returns a SubscriberDto - calls Rosettian LoadSubscriber
 /// </summary>
 /// <param name="subId"></param>
 /// <returns></returns>
 public static SubscriberDto LoadSubscriber(string subId)
 {
     using (var client = new SIMPL.DAL.Rosettian.RosettianClient())
     {
         return client.LoadSubscriber(subId, user);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// LoadLocation - returns a LocationDto - calls Rosettian LoadLocation
 /// </summary>
 /// <param name="locId"></param>
 /// <returns></returns>
 public static LocationDto LoadLocation(string locId)
 {
     using (var client = new SIMPL.DAL.Rosettian.RosettianClient())
     {
         return client.LoadLocation(locId, user);
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// LoadEquipment - returns an EquipmentDto - calls Rosettian LoadEquipment
 /// </summary>
 /// <param name="equipId"></param>
 /// <param name="returnExtraInfo"></param>
 /// <returns></returns>
 public static EquipmentDto LoadEquipment(string equipId, bool returnExtraInfo)
 {
     using (var client = new SIMPL.DAL.Rosettian.RosettianClient())
     {
         return client.LoadEquipment(equipId, returnExtraInfo, user);
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// DeleteSubscriber - deletes a subscriber - calls Rosettian DeleteSubscriber
 /// </summary>
 /// <param name="subId"></param>
 public static void DeleteSubscriber(string subId)
 {
     using (var client = new SIMPL.DAL.Rosettian.RosettianClient())
     {
         if (client.SubscriberExists(subId, user))
         {
             client.DeleteSubscriber(new SubscriberDto { ID = subId }, user);
         }
     }
 }