Пример #1
0
 public decimal GetCredit(SmsSenderAgentReference smsSenderAgentRefrence)
 {
     try
     {
         return((decimal)WinServiceHandler.SmsSendWinServiceHandlerChannel().GetCredit(smsSenderAgentRefrence));
     }
     catch
     {
         return(0);
     }
 }
Пример #2
0
        private void OnSmsSenderAgentChange(object sender, EntityChangeEventArgs e)
        {
            try
            {
                if (e != null && e.ActionType == EntityChangeActionTtype.Delete)
                {
                    WinServiceHandler.SmsSendWinServiceHandlerChannel().SetStatus((SmsSenderAgentReference)this.GetSmsSenderAgentRefrence(Helper.GetGuid(sender)), false, false, false);
                }
                else if (sender is Common.SmsSenderAgent)
                {
                    Common.SmsSenderAgent smsSenderAgent = (sender as Common.SmsSenderAgent);

                    WinServiceHandler.SmsSendWinServiceHandlerChannel().SetStatus((SmsSenderAgentReference)smsSenderAgent.SmsSenderAgentReference, smsSenderAgent.IsSendActive, smsSenderAgent.IsRecieveActive, smsSenderAgent.IsSendBulkActive);
                }
            }
            catch { }
        }
Пример #3
0
        private void OnPrivateNumberChange(object sender, EntityChangeEventArgs e)
        {
            int smsSenderAgentRefrence;

            if (sender is Common.PrivateNumber)
            {
                smsSenderAgentRefrence = new SmsSenderAgent().GetSmsSenderAgentRefrence(((Common.PrivateNumber)sender).SmsSenderAgentGuid);
            }
            else
            {
                smsSenderAgentRefrence = this.GetSmsSenderAgentReference(Helper.GetGuid(sender));
            }

            if (smsSenderAgentRefrence != 0)
            {
                try
                {
                    WinServiceHandler.SmsSendWinServiceHandlerChannel().ClearPrivateNumberCache((SmsSenderAgentReference)smsSenderAgentRefrence);
                }
                catch { }
            }
        }