public static bool SendBirthDateSms(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 = PhoneNumber.GetCountNumberOfOperators(groupGuid, 0, 0, true); //Transaction.DecreaseCostOfSmsSend(userGuid, Business.SmsSendType.SendBirthDateSms, // operatorCountNumberDictionary, smsPartCount, smsType, smsSenderAgentRefrence, smsSentGuid, smsController.DataAccessProvider); if (!smsController.SendBirthDateSms(sentboxGuid, groupGuid)) { throw new Exception(Language.GetString("ErrorRecord")); } smsController.CommitTransaction(); return(true); } catch (InnerTransactionException ex) { throw ex; } catch (Exception ex) { smsController.RollbackTransaction(); throw ex; } }