예제 #1
0
        //---------------------------------------------------------------------------
        public static void UpdateSmsMobileNo(string oldMobile, UsersDataEntity usersDataObject)
        {
            SMSNumbersEntity smsUser = SMSNumbersFactory.GetObject(usersDataObject.ModuleTypeID, oldMobile);

            if (smsUser != null)
            {
                if (!string.IsNullOrEmpty(usersDataObject.Mobile))
                {
                    smsUser.Numbers = usersDataObject.Mobile;
                    SMSNumbersFactory.Update(smsUser);
                }
                else
                {
                    SMSNumbersFactory.Delete(smsUser.NumID);
                }
            }
            else
            {
                UsersDataFactory.RegisterInSms(usersDataObject);
            }
        }
예제 #2
0
        //---------------------------------------------------------------------------
        public static void UpdateSmsMobileNo(string oldMobile, MessagesEntity msg)
        {
            SMSNumbersEntity smsUser = SMSNumbersFactory.GetObject(msg.ModuleTypeID, oldMobile);

            if (smsUser != null)
            {
                if (!string.IsNullOrEmpty(msg.Mobile))
                {
                    smsUser.Numbers = msg.Mobile;
                    SMSNumbersFactory.Update(smsUser);
                }
                else
                {
                    SMSNumbersFactory.Delete(smsUser.NumID);
                }
            }
            else
            {
                MessagesFactory.RegisterInSms(msg);
            }
        }