public static bool SendPrefixSms(SmsSenderAgentReference smsSenderAgentRefrence, Guid userGuid, Guid smsSentGuid, int recipientNumberCount, Guid sentboxGuid, int smsPartCount, Encoding encoding) { Business.Sms smsController = new Business.Sms(); Dictionary <Business.Operators, int> operatorCountNumberDictionary = new Dictionary <Operators, int>(); operatorCountNumberDictionary.Add(Operators.MCI, recipientNumberCount); Business.SmsTypes smsType = encoding == Business.Encoding.Utf8 ? Business.SmsTypes.Farsi : Business.SmsTypes.Latin; smsController.BeginTransaction(); try { //Transaction.DecreaseCostOfSmsSend(userGuid, Business.SmsSendType.SendPrefixSms, operatorCountNumberDictionary, // smsPartCount, smsType, smsSenderAgentRefrence, smsSentGuid, smsController.DataAccessProvider); if (!smsController.SendPrefixSms(sentboxGuid)) { throw new Exception(Language.GetString("ErrorRecord")); } smsController.CommitTransaction(); return(true); } catch (InnerTransactionException ex) { throw ex; } catch (Exception ex) { smsController.RollbackTransaction(); throw ex; } }