예제 #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);
         }
     }
 }
예제 #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);
                }
            }
        }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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);
         }
     }
 }