Beispiel #1
0
 public Service(int id, Guid guid, Application application, Product product, Merchant merchant, ServiceStatus serviceStatus, ServiceType serviceType, UserSessionType userSessionType, Country fallbackCountry, Language fallbackLanguage, ServiceConfigurationEntry serviceConfiguration, Template template, string name, string description, DateTime updated, DateTime created) : base(id, updated, created, false)
 {
     this._guid                 = guid;
     this._application          = application;
     this._product              = product;
     this._merchant             = merchant;
     this._serviceStatus        = serviceStatus;
     this._serviceType          = serviceType;
     this._userSessionType      = userSessionType;
     this._fallbackCountry      = fallbackCountry;
     this._fallbackLanguage     = fallbackLanguage;
     this._serviceConfiguration = serviceConfiguration;
     this._template             = template;
     this._name                 = name;
     this._description          = description;
 }
Beispiel #2
0
        public static ShortMessage Send(string text, Customer customer, User user)
        {
            ServiceConfigurationEntry sce = ServiceConfigurationEntry.CreateManager().Load(customer.Service, customer.Country);
            ShortMessage shortMessage     = new ShortMessage(-1,
                                                             Guid.NewGuid(),
                                                             null,
                                                             customer.Service,
                                                             customer.MobileOperator,
                                                             customer,
                                                             ShortMessageDirection.Outcoming,
                                                             ShortMessageStatus.Requested,
                                                             text,
                                                             sce.Shortcode,
                                                             sce.Keyword,
                                                             DateTime.Now, DateTime.Now);

            shortMessage.Send(user);

            return(shortMessage);
        }