/// <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); } } }
/// <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); } } }
/// <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); } }
/// <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); } }
/// <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); } }
/// <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); } }
/// <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); } } }