public ActionResult SelectSubscriber(string gsm, int activeTypeId, int orderChannelId, int subscriberTypeId, DateTime startDateMin, DateTime startDateMax, DateTime lastSuccessfulPaymentDateMin, DateTime lastSuccessfulPaymentDateMax) { _subscriberManagementService = new SubscriberManagementServiceSoapClient(SubscriberManagementServiceSoapClient.EndpointConfiguration.SubscriberManagementServiceSoap); #region Token SubscriberService.MAuthToken token = new SubscriberService.MAuthToken(); token.UserCode = base.settings.UserCode; token.Pin = base.settings.Pin; #endregion #region MSelectSubscriberInput MSelectSubscriberInput input = new MSelectSubscriberInput(); input.ProductId = 0; input.GSM = gsm; input.OrderChannelId = orderChannelId; input.Active = activeTypeId; input.SubscriberType = subscriberTypeId; input.StartDateMin = startDateMin; input.StartDateMax = startDateMax; input.LastSuccessfulPaymentDateMin = lastSuccessfulPaymentDateMin; input.LastSuccessfulPaymentDateMax = lastSuccessfulPaymentDateMax; #endregion var result = _subscriberManagementService.SelectSubscriberAsync(token, input).GetAwaiter().GetResult(); return(View(result)); }
public ActionResult DeactivateSubscriber(Guid subscriberId) { _subscriberManagementService = new SubscriberManagementServiceSoapClient(SubscriberManagementServiceSoapClient.EndpointConfiguration.SubscriberManagementServiceSoap); SubscriberService.MAuthToken token = new SubscriberService.MAuthToken(); token.UserCode = base.settings.UserCode; token.Pin = base.settings.Pin; var guid = new Guid(subscriberId.ToString()); var response = _subscriberManagementService.DeactivateSubscriberAsync(token, guid).GetAwaiter().GetResult(); return(View(response)); }