예제 #1
0
        public static bool SendSpecialGroupFutureSms(SmsSenderAgentReference smsSenderAgentRefrence, Guid userGuid, Guid smsSentGuid,
                                                     Guid sentboxGuid, string groupGuid, int smsPartCount, Encoding encoding)
        {
            Business.Sms      smsController = new Business.Sms();
            Business.SmsTypes smsType       = encoding == Business.Encoding.Utf8 ? Business.SmsTypes.Farsi : Business.SmsTypes.Latin;
            smsController.BeginTransaction();
            try
            {
                Dictionary <Business.Operators, int> operatorCountNumberDictionary = GeneralNumber.GetCountNumberOfOperators(groupGuid, 0, 0);

                //Transaction.DecreaseCostOfSmsSend(userGuid, Business.SmsSendType.SendSpecialGroupFutureSms,
                //																	operatorCountNumberDictionary, smsPartCount, smsType, smsSenderAgentRefrence, smsSentGuid, smsController.DataAccessProvider);

                if (!smsController.SendSpecialGroupFutureSms(sentboxGuid, groupGuid))
                {
                    throw new Exception(Language.GetString("ErrorRecord"));
                }

                smsController.CommitTransaction();
                return(true);
            }
            catch (InnerTransactionException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                smsController.RollbackTransaction();
                throw ex;
            }
        }