コード例 #1
0
        public void UpdateStatusAfterTransactionGuest(Guid congressId, Guid id)
        {
            var userBoothBo = new UserBoothBO();
            var list        = new ModelView.InFormEntitiyList <UserBooth>();

            try
            {
                this.ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                this.PaymentConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                var guestbooths             = userBoothBo.Where(this.ConnectionHandler, guestbooth => guestbooth.UserId == id);
                var tempTransactionalFacade = PaymentComponenets.Instance.TempTransactionalFacade(this.PaymentConnection);
                var firstOrDefault          = guestbooths.FirstOrDefault(x => x.TempId != null);
                if (firstOrDefault == null || firstOrDefault.TempId == null)
                {
                    return;
                }
                var tr = tempTransactionalFacade.RemoveTempAndReturnTransaction((Guid)firstOrDefault.TempId);
                if (tr == null)
                {
                    return;
                }
                foreach (var guestbooth in guestbooths)
                {
                    guestbooth.TransactionId = tr.Id;
                    guestbooth.TempId        = null;
                    if (tr.PreDone)
                    {
                        guestbooth.Status = (byte)Enums.RezervState.Pay;
                        list.Add(guestbooth, Resources.Congress.BoothPaymentEmail, Resources.Congress.BoothPaymentSMS);
                    }
                    if (!userBoothBo.Update(this.ConnectionHandler, guestbooth))
                    {
                        throw new Exception(Resources.Congress.ErrorInEditBoothReserv);
                    }
                }
                this.ConnectionHandler.CommitTransaction();
                this.PaymentConnection.CommitTransaction();
            }
            catch (KnownException ex)
            {
                this.ConnectionHandler.RollBack();
                this.PaymentConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                this.ConnectionHandler.RollBack();
                this.PaymentConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                userBoothBo.InformUserboothReserv(this.ConnectionHandler, congressId, list);
            }
            catch (Exception)
            {
            }
        }
コード例 #2
0
        public KeyValuePair <bool, Guid> HotelUserInsert(Guid congressId, Guid hotelId, User parentUser,
                                                         List <DiscountType> discountAttaches, string callBackurl, FormGenerator.DataStructure.FormStructure formModel,
                                                         int dayCount, List <Guid> userIdlist)
        {
            KeyValuePair <bool, Guid> keyValuePair;
            var entitiys = new ModelView.InFormEntitiyList <HotelUser>();

            try
            {
                this.ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                this.PaymentConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                this.FormGeneratorConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                var hotelUserInsertGroup = new HotelUserBO().HotelUserInsert(this.ConnectionHandler,
                                                                             this.PaymentConnection,
                                                                             this.FormGeneratorConnection, hotelId, parentUser, discountAttaches, callBackurl, formModel,
                                                                             dayCount, userIdlist);
                if (hotelUserInsertGroup.Key && userIdlist.Count > 0)
                {
                    entitiys.Add(
                        new HotelUser()
                    {
                        HotelId = hotelId, UserId = parentUser.Id
                    },
                        Resources.Congress.HotelInsertEmail, Resources.Congress.HotelInsertSMS
                        );
                }
                this.ConnectionHandler.CommitTransaction();
                this.PaymentConnection.CommitTransaction();
                this.FormGeneratorConnection.CommitTransaction();
                keyValuePair = new KeyValuePair <bool, Guid>(hotelUserInsertGroup.Key, hotelUserInsertGroup.Value);
            }
            catch (KnownException ex)
            {
                this.ConnectionHandler.RollBack();
                this.PaymentConnection.RollBack();
                this.FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                this.ConnectionHandler.RollBack();
                this.PaymentConnection.RollBack();
                this.FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                if (keyValuePair.Key)
                {
                    new HotelUserBO().InformHotelReserv(this.ConnectionHandler, congressId, entitiys);
                }
            }
            catch (Exception)
            {
            }
            return(keyValuePair);
        }
コード例 #3
0
        public bool UserInsert(ref Article article, List <ArticleAuthors> articleAuthorses,
                               HttpPostedFileBase abstractFileId,
                               HttpPostedFileBase orginalFileId, List <DiscountType> transactionDiscountAttaches, string callbackurl,
                               FormStructure formModel)
        {
            try
            {
                ArticleBO articleBo = new ArticleBO();
                ModelView.InFormEntitiyList <RefereeCartable> keyValuePairs = new ModelView.InFormEntitiyList <RefereeCartable>();
                ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                FileManagerConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                PaymentConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                FormGeneratorConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                if (!articleBo.UserInsert(ConnectionHandler, FileManagerConnection,
                                          FormGeneratorConnection, article, articleAuthorses, abstractFileId, orginalFileId,
                                          formModel))
                {
                    return(false);
                }

                if (!articleBo.SendArticle(ConnectionHandler, FileManagerConnection, article, keyValuePairs))
                {
                    return(false);
                }

                article = new ArticleBO().Get(ConnectionHandler, article.Id);
                bool articlePaymnet = new ArticleBO().ArticlePaymnet(ConnectionHandler, PaymentConnection,
                                                                     ref article, transactionDiscountAttaches, callbackurl + article.Id);
                if (!articlePaymnet)
                {
                    throw new Exception(string.Format(Resources.Congress.ErrorInPayArticleAmount,
                                                      Extention.GetAtricleTitle(article.CongressId)));
                }

                ConnectionHandler.CommitTransaction();
                FileManagerConnection.CommitTransaction();
                PaymentConnection.CommitTransaction();
                FormGeneratorConnection.CommitTransaction();
                return(true);
            }
            catch (KnownException ex)
            {
                ConnectionHandler.RollBack();
                FileManagerConnection.RollBack();
                PaymentConnection.RollBack();
                FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                ConnectionHandler.RollBack();
                FileManagerConnection.RollBack();
                PaymentConnection.RollBack();
                FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
        }
コード例 #4
0
        public bool SentArticle(Article article, HttpPostedFileBase orginalFileId, FormStructure formModel)
        {
            ModelView.InFormEntitiyList <RefereeCartable> keyValuePairs = new ModelView.InFormEntitiyList <RefereeCartable>();
            bool      result;
            RefereeBO refereeBo = new RefereeBO();

            try
            {
                ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                FileManagerConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                FormGeneratorConnection.StartTransaction(IsolationLevel.ReadUncommitted);

                if (orginalFileId != null)
                {
                    article.OrginalFileId =
                        FileManagerComponent.Instance.FileTransactionalFacade(FileManagerConnection)
                        .Insert(orginalFileId);
                }
                new ArticleBO().SetStatus(article);
                ArticleBO articleBo = new ArticleBO();
                FormGeneratorComponent.Instance.FormDataTransactionalFacade(FormGeneratorConnection).ModifyFormData(formModel);
                articleBo.Update(ConnectionHandler, article);
                articleBo.SendArticle(ConnectionHandler, FileManagerConnection, article, keyValuePairs);
                ConnectionHandler.CommitTransaction();
                FileManagerConnection.CommitTransaction();
                FormGeneratorConnection.CommitTransaction();
                result = true;
            }
            catch (KnownException ex)
            {
                ConnectionHandler.RollBack();
                FileManagerConnection.RollBack();
                FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                ConnectionHandler.RollBack();
                FileManagerConnection.RollBack();
                FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                if (result)
                {
                    refereeBo.InformRefereeAddArticle(ConnectionHandler, article.CongressId, keyValuePairs);
                }
            }
            catch (Exception)
            {
            }
            return(result);
        }
コード例 #5
0
        public Guid UpdateStatusAfterTransaction(Guid congressId, Guid id)
        {
            ModelView.ModifyResult <Article> afterTransactionModel;
            ModelView.InFormEntitiyList <RefereeCartable> keyValuePairs = new ModelView.InFormEntitiyList <RefereeCartable>();
            try
            {
                ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                PaymentConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                FileManagerConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                Article article = new ArticleBO().Get(ConnectionHandler, id);
                if (article == null || article.TempId == null)
                {
                    return(Guid.Empty);
                }

                afterTransactionModel = new ArticleBO().UpdateStatusAfterTransaction(ConnectionHandler, PaymentConnection, FileManagerConnection, (Guid)article.TempId, keyValuePairs);
                ConnectionHandler.CommitTransaction();
                PaymentConnection.CommitTransaction();
                FileManagerConnection.CommitTransaction();
            }
            catch (KnownException ex)
            {
                ConnectionHandler.RollBack();
                PaymentConnection.RollBack();
                FileManagerConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                ConnectionHandler.RollBack();
                PaymentConnection.RollBack();
                FileManagerConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                new RefereeBO().InformRefereeAddArticle(ConnectionHandler, congressId, keyValuePairs);
            }
            catch (Exception)
            {
            }
            try
            {
                if (afterTransactionModel.SendInform)
                {
                    new ArticleBO().InformArticle(ConnectionHandler, congressId, afterTransactionModel.InformList);
                }
            }
            catch (Exception)
            {
            }
            return(afterTransactionModel == null ? Guid.Empty : afterTransactionModel.TransactionId);
        }
コード例 #6
0
        public bool Insert(Referee referee,
                           HttpPostedFileBase fileBase, List <Guid> pivots)
        {
            var dictionary = new ModelView.InFormEntitiyList <Referee>();
            var result     = false;

            try
            {
                this.ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                this.EnterpriseNodeConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                if (!string.IsNullOrEmpty(referee.Password))
                {
                    referee.PasswordWithoutHash = referee.Password;
                }
                if (!new RefereeBO().Insert(this.ConnectionHandler, this.EnterpriseNodeConnection, referee, fileBase, pivots))
                {
                    throw new Exception(Resources.Congress.ErrorInSaveReferee);
                }
                this.ConnectionHandler.CommitTransaction();
                this.EnterpriseNodeConnection.CommitTransaction();
                if (referee.SendInform)
                {
                    dictionary.Add(referee, Resources.Congress.RefereeInsertEmail, Resources.Congress.RefereeInsertSMS);
                }
                result = true;
            }
            catch (KnownException ex)
            {
                this.ConnectionHandler.RollBack();
                this.EnterpriseNodeConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                this.ConnectionHandler.RollBack();
                this.EnterpriseNodeConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }

            try
            {
                //ارسال پیغام به داور
                if (result)
                {
                    new RefereeBO().InformRefereeRegister(this.ConnectionHandler, referee.CongressId, dictionary);
                }
            }
            catch
            {
            }
            return(result);
        }
コード例 #7
0
        public bool AdminUpdateArticles(Guid congressId, List <Article> model)
        {
            ModelView.InFormEntitiyList <Article> articles = new ModelView.InFormEntitiyList <Article>();
            bool      result;
            ArticleBO articleBo = new ArticleBO();

            try
            {
                ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                var transactionTransactionalFacade = PaymentComponenets.Instance.TransactionTransactionalFacade(PaymentConnection);
                var list = articleBo.Where(ConnectionHandler, x => x.Id.In(model.Select(article => article.Id)));
                foreach (Article obj in list)
                {
                    articleBo.AdminSetStatus(obj);
                    if (obj.PayStatus.HasValue)
                    {
                        obj.PayStatus = obj.PayStatus;
                        if (obj.PayStatus == (byte)Enums.ArticlepayState.PayConfirm && obj.TransactionId != null)
                        {
                            transactionTransactionalFacade.Done((Guid)obj.TransactionId);
                        }
                    }
                    articleBo.Update(ConnectionHandler, obj);
                    articles.Add(obj, Resources.Congress.ArticleChangeStatusEmail, Resources.Congress.ArticleChangeStatusSMS);
                }
                ConnectionHandler.CommitTransaction();
                result = true;
            }
            catch (KnownException ex)
            {
                ConnectionHandler.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                ConnectionHandler.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                if (result)
                {
                    articleBo.InformArticle(ConnectionHandler, congressId, articles);
                }
            }
            catch (Exception)
            {
            }
            return(result);
        }
コード例 #8
0
        public bool AdminUpdate(Guid adminId, Article obj, List <ArticleAuthors> articleAuthorses,
                                string comment, HttpPostedFileBase flowFile, HttpPostedFileBase orginalFileId, HttpPostedFileBase abstractFileId, FormStructure formModel)
        {
            bool      result;
            ArticleBO articleBo = new ArticleBO();

            ModelView.InFormEntitiyList <Article> articles = new ModelView.InFormEntitiyList <Article>();

            try
            {
                ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                FileManagerConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                FormGeneratorConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                Article oldsatus = articleBo.Get(ConnectionHandler, obj.Id);
                articleBo.AdminUpdate(ConnectionHandler, FileManagerConnection, FormGeneratorConnection, adminId, obj, articleAuthorses, orginalFileId, abstractFileId, comment, flowFile, formModel);
                ConnectionHandler.CommitTransaction();
                FileManagerConnection.CommitTransaction();
                FormGeneratorConnection.CommitTransaction();
                result = true;
                if (oldsatus.Status != obj.Status)
                {
                    articles.Add(obj, Resources.Congress.ArticleChangeStatusEmail, Resources.Congress.ArticleChangeStatusSMS);
                }
            }
            catch (KnownException ex)
            {
                ConnectionHandler.RollBack();
                FileManagerConnection.RollBack();
                FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                ConnectionHandler.RollBack();
                FileManagerConnection.RollBack();
                FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                articleBo.InformArticle(ConnectionHandler, obj.CongressId, articles);
            }
            catch (Exception)
            {
            }
            return(result);
        }
コード例 #9
0
        public bool UpdateStatus(Guid congressId, List <Guid> guids, FinalState status)
        {
            ModelView.InFormEntitiyList <Article> articles = new ModelView.InFormEntitiyList <Article>();
            bool      result;
            ArticleBO articleBo = new ArticleBO();

            try
            {
                ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                if (!guids.Any())
                {
                    return(true);
                }

                List <Article> list = articleBo.Where(ConnectionHandler, x => x.Id.In(guids));
                foreach (Article item in list)
                {
                    item.FinalState = (byte)status;
                    articleBo.AdminSetStatus(item);
                    articleBo.Update(ConnectionHandler, item);
                    articles.Add(item, Resources.Congress.ArticleChangeStatusEmail, Resources.Congress.ArticleChangeStatusSMS);
                }
                ConnectionHandler.CommitTransaction();
                result = true;
            }
            catch (KnownException ex)
            {
                ConnectionHandler.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                ConnectionHandler.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                if (result)
                {
                    articleBo.InformArticle(ConnectionHandler, congressId, articles);
                }
            }
            catch (Exception)
            {
            }
            return(result);
        }
コード例 #10
0
        public bool ArticlePaymnet(Article article, List <DiscountType> transactionDiscountAttaches, string callbackurl)
        {
            bool Resultpaymnet;

            ModelView.InFormEntitiyList <Article> articles = new ModelView.InFormEntitiyList <Article>();

            try
            {
                ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                PaymentConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                if (
                    !new ArticleBO().ArticlePaymnet(ConnectionHandler, PaymentConnection, ref article,
                                                    transactionDiscountAttaches, callbackurl))
                {
                    return(false);
                }

                ConnectionHandler.CommitTransaction();
                PaymentConnection.CommitTransaction();
                Resultpaymnet = true;
                articles.Add(article, Resources.Congress.ArticlePaymentEmail, Resources.Congress.ArticlePaymentSMS);
            }
            catch (KnownException ex)
            {
                ConnectionHandler.RollBack();
                PaymentConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                ConnectionHandler.RollBack();
                PaymentConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                if (Resultpaymnet)
                {
                    new ArticleBO().InformArticle(ConnectionHandler, article.CongressId, articles);
                }
            }
            catch (Exception)
            {
            }
            return(Resultpaymnet);
        }
コード例 #11
0
        public bool WorkShopUserUpdate(Guid congressId, WorkShopUser WorkShop, FormStructure formModel)
        {
            bool result   = false;
            var  entitiys = new ModelView.InFormEntitiyList <WorkShopUser>();

            try
            {
                this.ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                this.FormGeneratorConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                result = new WorkShopUserBO().WorkShopUserUpdate(this.ConnectionHandler,
                                                                 this.FormGeneratorConnection, WorkShop, formModel);
                entitiys.Add(

                    WorkShop,
                    Resources.Congress.WorkShopInsertEmail,
                    Resources.Congress.WorkShopInsertSMS
                    );

                this.ConnectionHandler.CommitTransaction();
                this.FormGeneratorConnection.CommitTransaction();
            }
            catch (KnownException ex)
            {
                this.ConnectionHandler.RollBack();
                this.FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                this.ConnectionHandler.RollBack();
                this.FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                if (result)
                {
                    new WorkShopUserBO().InformWorkShopReserv(this.ConnectionHandler, congressId, entitiys);
                }
            }
            catch (Exception)
            {
            }
            return(result);
        }
コード例 #12
0
        public void InformHotelReserv(IConnectionHandler connectionHandler, Guid congressId, ModelView.InFormEntitiyList <HotelUser> hotelUser)
        {
            if (!hotelUser.Any())
            {
                return;
            }
            Homa          homa   = new HomaBO().Get(connectionHandler, congressId);
            Configuration config = homa.Configuration;

            if (config.UserHotelReserveInformType == null)
            {
                return;
            }
            string        titlehoma     = homa.CongressTitle;
            CustomMessage custommessage = new CustomMessageBO().FirstOrDefault(connectionHandler, x => x.CongressId == congressId && x.Type == MessageInformType.Hotel);
            var           @where        = this.Where(connectionHandler,
                                                     x => x.HotelId.In(hotelUser.Select(i => i.obj.HotelId)) &&
                                                     x.UserId.In(hotelUser.Select(i => i.obj.UserId)));

            foreach (var hotelUser1 in hotelUser)
            {
                var firstOrDefault = @where.FirstOrDefault(x => x.HotelId == hotelUser1.obj.HotelId && x.UserId == hotelUser1.obj.UserId);
                if (firstOrDefault == null)
                {
                    continue;
                }
                var    enterpriseNode  = firstOrDefault.User.EnterpriseNode;
                var    hotel           = firstOrDefault.Hotel;
                var    status          = ((Enums.RezervState)hotelUser1.obj.Status).GetDescriptionInLocalization();
                var    homaCompleteUrl = homa.GetHomaCompleteUrl();
                string sms             = string.Format(hotelUser1.SmsBody, homa.CongressTitle, enterpriseNode.DescriptionFieldWithGender, hotel.Name, status);
                string email           = string.Format(hotelUser1.EmailBody, homa.CongressTitle, enterpriseNode.DescriptionFieldWithGender, hotel.Name, homaCompleteUrl, status);
                if (custommessage != null)
                {
                    if (!string.IsNullOrEmpty(custommessage.EmailText))
                    {
                        email = custommessage.EmailText.Replace($"[{HotelMessageKey.HotelName.ToString()}]", hotel.Name);
                        email = email.Replace($"[{HotelMessageKey.UsersName.ToString()}]", enterpriseNode.DescriptionFieldWithGender);
                        email = email.Replace($"[{HotelMessageKey.CongressTitle.ToString()}]", homa.CongressTitle);
                        email = email.Replace($"[{HotelMessageKey.CongressAddress.ToString()}]", homaCompleteUrl);
                        email = email.Replace($"[{HotelMessageKey.Status.ToString()}]", status);
                    }
                    if (!string.IsNullOrEmpty(custommessage.SmsText))
                    {
                        sms = custommessage.SmsText.Replace($"[{HotelMessageKey.HotelName.ToString()}]", hotel.Name);
                        sms = sms.Replace($"[{HotelMessageKey.UsersName.ToString()}]", enterpriseNode.DescriptionFieldWithGender);
                        sms = sms.Replace($"[{HotelMessageKey.CongressTitle.ToString()}]", homa.CongressTitle);
                        sms = sms.Replace($"[{HotelMessageKey.CongressAddress.ToString()}]", homaCompleteUrl);
                        sms = sms.Replace($"[{HotelMessageKey.Status.ToString()}]", status);
                    }
                }

                Message.Tools.ModelView.MessageModel inform = new Message.Tools.ModelView.MessageModel()
                {
                    Email      = enterpriseNode.Email,
                    Mobile     = enterpriseNode.Cellphone,
                    EmailTitle = homa.CongressTitle,
                    EmailBody  = email,
                    SMSBody    = sms
                };
                new HomaBO().SendInform((byte)config.UserHotelReserveInformType, inform, config, titlehoma);
                MessageComponenet.SentInternalMessageInstance.MailBoxFacade.SendInternalMail(homa.OwnerId, config.CongressId,
                                                                                             new[] { enterpriseNode.Id.ToString() }, homa.CongressTitle, inform.SMSBody);
            }
        }
コード例 #13
0
        public KeyValuePair <bool, Guid> InsertGuest(EnterpriseNode.DataStructure.EnterpriseNode enterpriseNode,
                                                     List <Guid> boothIdlist, HttpPostedFileBase file, List <DiscountType> discountAttaches,
                                                     string callBackurl, FormGenerator.DataStructure.FormStructure postFormData, Guid congressId)
        {
            var keyValuePairs = new ModelView.InFormEntitiyList <UserBooth>();
            var guid          = Guid.Empty;
            var userBoothBo   = new UserBoothBO();

            try
            {
                this.ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                this.PaymentConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                this.FormGeneratorConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                this.EnterpriseNodeConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                var additionalData = new CongressDiscountTypeBO().FillTempAdditionalData(this.ConnectionHandler, congressId);
                if (
                    !EnterpriseNodeComponent.Instance.EnterpriseNodeTransactionalFacade(this.EnterpriseNodeConnection)
                    .Insert(enterpriseNode, file))
                {
                    return(new KeyValuePair <bool, Guid>(false, Guid.Empty));
                }
                postFormData.RefId = enterpriseNode.Id.ToString();
                if (
                    !FormGeneratorComponent.Instance.FormDataTransactionalFacade(this.FormGeneratorConnection)
                    .ModifyFormData(postFormData))
                {
                    throw new Exception(Resources.Congress.ErrorInSaveBoothReserv);
                }
                var boothBo = new BoothBO();
                var amount  = boothBo.Sum(ConnectionHandler, x => x.ValidCost, x => x.Id.In(boothIdlist));

                if (amount.ToDecimal() > 0)
                {
                    var firstOrDefault = boothIdlist.FirstOrDefault();
                    var booth          = boothBo.Get(this.ConnectionHandler, firstOrDefault);
                    var temp           = new Temp
                    {
                        PayerId     = enterpriseNode.Id,
                        CallBackUrl = callBackurl + enterpriseNode.Id,
                        PayerTitle  = enterpriseNode.DescriptionField,
                        Description = Resources.Congress.PaymentBoothReserv,
                        Amount      =
                            new CongressDiscountTypeBO().CalulateAmountNew(this.PaymentConnection, amount.ToDecimal(),
                                                                           discountAttaches),
                        CurrencyType   = (byte)booth.CurrencyType.ToEnum <Radyn.Common.Definition.Enums.CurrencyType>(),
                        AdditionalData = additionalData
                    };

                    if (
                        !PaymentComponenets.Instance.TempTransactionalFacade(this.PaymentConnection)
                        .Insert(temp, discountAttaches))
                    {
                        return(new KeyValuePair <bool, Guid>(false, Guid.Empty));
                    }
                    guid = temp.Id;
                }
                foreach (var guid1 in boothIdlist)
                {
                    var userBooth = new UserBooth()
                    {
                        UserId  = enterpriseNode.Id,
                        BoothId = guid1,
                        TempId  = guid != Guid.Empty ? guid : (Guid?)null,
                    };
                    if (!userBoothBo.Insert(this.ConnectionHandler, userBooth))
                    {
                        throw new Exception(Resources.Congress.ErrorInSaveBoothReserv);
                    }
                    keyValuePairs.Add(userBooth,
                                      Resources.Congress.BoothInsertEmail, Resources.Congress.BoothInsertSMS);
                }

                this.ConnectionHandler.CommitTransaction();
                this.PaymentConnection.CommitTransaction();
                this.FormGeneratorConnection.CommitTransaction();
                this.EnterpriseNodeConnection.CommitTransaction();
            }
            catch (KnownException ex)
            {
                this.ConnectionHandler.RollBack();
                this.PaymentConnection.RollBack();
                this.FormGeneratorConnection.RollBack();
                this.EnterpriseNodeConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                this.ConnectionHandler.RollBack();
                this.PaymentConnection.RollBack();
                this.FormGeneratorConnection.RollBack();
                this.EnterpriseNodeConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                userBoothBo.InformUserboothReserv(this.ConnectionHandler, congressId, keyValuePairs);
            }
            catch (Exception)
            {
            }
            return(new KeyValuePair <bool, Guid>(true, guid));
        }
コード例 #14
0
        public bool UserInsert(Article article, List <ArticleAuthors> articleAuthorses,
                               HttpPostedFileBase abstractFileId,
                               HttpPostedFileBase orginalFileId, FormStructure formModel)
        {
            bool result = false;

            ModelView.InFormEntitiyList <RefereeCartable> keyValuePairs = new ModelView.InFormEntitiyList <RefereeCartable>();
            ModelView.InFormEntitiyList <Article>         articles      = new ModelView.InFormEntitiyList <Article>();
            ArticleBO articleBo = new ArticleBO();

            try
            {
                ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                FileManagerConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                FormGeneratorConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                if (
                    !articleBo.UserInsert(ConnectionHandler, FileManagerConnection,
                                          FormGeneratorConnection, article, articleAuthorses, abstractFileId, orginalFileId,
                                          formModel))
                {
                    return(false);
                }

                if (!articleBo.SendArticle(ConnectionHandler, FileManagerConnection, article, keyValuePairs))
                {
                    return(false);
                }

                ConnectionHandler.CommitTransaction();
                FileManagerConnection.CommitTransaction();
                FormGeneratorConnection.CommitTransaction();
                result = true;
                articles.Add(
                    article, Resources.Congress.ArticleInsertEmail,
                    Resources.Congress.ArticleInsertSMS
                    );
            }
            catch (KnownException)
            {
                ConnectionHandler.RollBack();
                FileManagerConnection.RollBack();
                FormGeneratorConnection.RollBack();
                throw;
            }
            catch (Exception ex)
            {
                ConnectionHandler.RollBack();
                FileManagerConnection.RollBack();
                FormGeneratorConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                articleBo.InformArticle(ConnectionHandler, article.CongressId, articles);
                new RefereeBO().InformRefereeAddArticle(ConnectionHandler, article.CongressId, keyValuePairs);
            }
            catch (Exception)
            {
            }
            return(result);
        }
コード例 #15
0
        public bool UpdateList(Guid congressId, List <HotelUser> list)
        {
            bool result;
            var  hotelUserBO = new HotelUserBO();
            var  entitiys    = new ModelView.InFormEntitiyList <HotelUser>();

            try
            {
                this.ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                this.PaymentConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                var transactionTransactionalFacade =
                    PaymentComponenets.Instance.TransactionTransactionalFacade(this.PaymentConnection);
                var userBo = new UserBO();
                foreach (var hotelUser1 in list)
                {
                    var hotelUser = Get(hotelUser1.HotelId, hotelUser1.UserId);
                    if (hotelUser == null)
                    {
                        continue;
                    }
                    hotelUser.Status = hotelUser1.Status;
                    if (hotelUser.Status == (byte)Enums.RezervState.PayConfirm)
                    {
                        if (hotelUser.TransactionId != null)
                        {
                            if (!transactionTransactionalFacade.Done((Guid)hotelUser.TransactionId))
                            {
                                return(false);
                            }
                        }
                    }
                    if (!hotelUserBO.Update(this.ConnectionHandler, hotelUser))
                    {
                        throw new Exception(Resources.Congress.ErrorInEditHotelReserv);
                    }
                    var user = userBo.Get(this.ConnectionHandler, hotelUser1.UserId);
                    if (entitiys.All(x => x.obj.UserId != hotelUser.UserId))
                    {
                        entitiys.Add(hotelUser
                                     , Resources.Congress.HotelChangeStatusEmail, Resources.Congress.HotelChangeStatusSMS);
                    }
                    if (!user.ParentId.HasValue || entitiys.Any(x => x.obj.UserId == user.ParentId))
                    {
                        continue;
                    }
                    entitiys.Add(
                        new HotelUser()
                    {
                        UserId  = (Guid)user.ParentId,
                        HotelId = hotelUser1.HotelId,
                        Status  = hotelUser1.Status
                    }

                        ,
                        Resources.Congress.HotelChangeStatusEmail,
                        Resources.Congress.HotelChangeStatusSMS
                        );
                }
                this.ConnectionHandler.CommitTransaction();
                this.PaymentConnection.CommitTransaction();

                result = true;
            }
            catch (KnownException ex)
            {
                this.ConnectionHandler.RollBack();
                this.PaymentConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                this.ConnectionHandler.RollBack();
                this.PaymentConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                if (result)
                {
                    hotelUserBO.InformHotelReserv(this.ConnectionHandler, congressId, entitiys);
                }
            }
            catch (Exception)
            {
            }
            return(result);
        }
コード例 #16
0
        public bool UpdateList(Guid congressId, List <UserBooth> list)
        {
            var  userBoothBo   = new UserBoothBO();
            var  keyValuePairs = new ModelView.InFormEntitiyList <UserBooth>();
            bool result;

            try
            {
                this.ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
                this.PaymentConnection.StartTransaction(IsolationLevel.ReadUncommitted);
                foreach (var rezerUserModel in list)
                {
                    var transactionTransactionalFacade =
                        PaymentComponenets.Instance.TransactionTransactionalFacade(this.PaymentConnection);
                    var obj = userBoothBo.Get(this.ConnectionHandler, rezerUserModel.UserId, rezerUserModel.BoothId);
                    if (obj == null)
                    {
                        continue;
                    }
                    obj.Status = rezerUserModel.Status;
                    if (obj.Status == (byte)Enums.RezervState.PayConfirm)
                    {
                        if (obj.TransactionId != null)
                        {
                            if (!transactionTransactionalFacade.Done((Guid)obj.TransactionId))
                            {
                                throw new Exception("خطایی در ثبت تراکنش وجود دارد");
                            }
                        }
                    }

                    if (!userBoothBo.Update(this.ConnectionHandler, obj))
                    {
                        throw new Exception("خطایی در ویرایش رزرو غرفه کاربر وجود دارد");
                    }
                    keyValuePairs.Add(obj, Resources.Congress.BoothChangeStatusEmail, Resources.Congress.BoothChangeStatusSMS);
                }



                this.ConnectionHandler.CommitTransaction();
                this.PaymentConnection.CommitTransaction();
                result = true;
            }
            catch (KnownException ex)
            {
                this.ConnectionHandler.RollBack();
                this.PaymentConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            catch (Exception ex)
            {
                this.ConnectionHandler.RollBack();
                this.PaymentConnection.RollBack();
                Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
                throw new KnownException(ex.Message, ex);
            }
            try
            {
                if (result)
                {
                    userBoothBo.InformUserboothReserv(this.ConnectionHandler, congressId, keyValuePairs);
                }
            }
            catch (Exception)
            {
            }
            return(result);
        }
コード例 #17
0
        public void InformUserboothReserv(IConnectionHandler connectionHandler, Guid CongressId, ModelView.InFormEntitiyList <UserBooth> keyValuePairs)
        {
            if (!keyValuePairs.Any())
            {
                return;
            }
            Homa homa = new HomaBO().Get(connectionHandler, CongressId);

            if (homa.Configuration.BoothReserveInformType == null)
            {
                return;
            }
            string        titlehoma     = homa.CongressTitle;
            CustomMessage custommessage = new CustomMessageBO().FirstOrDefault(connectionHandler, x => x.CongressId == CongressId && x.Type == MessageInformType.Booth);
            var           @where        = this.Where(connectionHandler,
                                                     x => x.BoothId.In(keyValuePairs.Select(i => i.obj.BoothId)) &&
                                                     x.UserId.In(keyValuePairs.Select(i => i.obj.UserId)));

            foreach (var shopUser in keyValuePairs)
            {
                var orDefault = @where.FirstOrDefault(x => x.BoothId == shopUser.obj.BoothId && x.UserId == shopUser.obj.UserId);
                if (orDefault == null)
                {
                    continue;
                }
                var    enterpriseNode  = orDefault.EnterpriseNode;
                var    status          = ((Enums.RezervState)orDefault.Status).GetDescriptionInLocalization();
                var    homaCompleteUrl = homa.GetHomaCompleteUrl();
                var    boothCode       = orDefault.Booth.Code;
                string sms             = string.Format(shopUser.EmailBody, homa.CongressTitle, enterpriseNode.DescriptionFieldWithGender, boothCode, status);
                string email           = string.Format(shopUser.SmsBody, homa.CongressTitle, enterpriseNode.DescriptionFieldWithGender, boothCode, homaCompleteUrl, status);
                if (custommessage != null)
                {
                    if (!string.IsNullOrEmpty(custommessage.EmailText))
                    {
                        email = custommessage.EmailText.Replace($"[{BoothMessageKey.BoothCode.ToString()}]", boothCode);
                        email = email.Replace($"[{BoothMessageKey.CongressTitle.ToString()}]", homa.CongressTitle);
                        email = email.Replace($"[{BoothMessageKey.UsersName.ToString()}]", enterpriseNode.DescriptionFieldWithGender);
                        email = email.Replace($"[{BoothMessageKey.Status.ToString()}]", status);
                        email = email.Replace($"[{BoothMessageKey.CongressAddress.ToString()}]", homaCompleteUrl);
                    }
                    if (!string.IsNullOrEmpty(custommessage.SmsText))
                    {
                        sms = custommessage.SmsText.Replace($"[{BoothMessageKey.BoothCode.ToString()}]", boothCode);
                        sms = sms.Replace($"[{BoothMessageKey.CongressTitle.ToString()}]", homa.CongressTitle);
                        sms = sms.Replace($"[{BoothMessageKey.UsersName.ToString()}]", enterpriseNode.DescriptionFieldWithGender);
                        sms = sms.Replace($"[{BoothMessageKey.Status.ToString()}]", status);
                        sms = sms.Replace($"[{BoothMessageKey.CongressAddress.ToString()}]", homaCompleteUrl);
                    }
                }


                Message.Tools.ModelView.MessageModel inform = new Message.Tools.ModelView.MessageModel
                {
                    Email      = enterpriseNode.Email,
                    Mobile     = enterpriseNode.Cellphone,
                    EmailTitle = homa.CongressTitle,
                    EmailBody  = email,
                    SMSBody    = sms
                };
                new HomaBO().SendInform((byte)homa.Configuration.BoothReserveInformType, inform, homa.Configuration, titlehoma);
                MessageComponenet.SentInternalMessageInstance.MailBoxFacade.SendInternalMail(homa.OwnerId, homa.Configuration.CongressId,
                                                                                             new[] { enterpriseNode.Id.ToString() }, homa.CongressTitle, inform.SMSBody);
            }
        }
コード例 #18
0
ファイル: RefereeBO.cs プロジェクト: davoodkosari/Zibasazi
        public void InformRefereeAddArticle(IConnectionHandler connectionHandler, Guid congressId, ModelView.InFormEntitiyList <RefereeCartable> keyValuePairs)
        {
            if (!keyValuePairs.Any())
            {
                return;
            }
            var refereeBo = new RefereeBO();
            var arti      = keyValuePairs.FirstOrDefault();
            var referee   = refereeBo.Get(connectionHandler, arti.obj.RefereeId);
            var homa1     = new HomaBO().Get(connectionHandler, congressId);
            var articleBo = new ArticleBO();
            var config    = homa1.Configuration;

            if (config.RefereeInformType == null)
            {
                return;
            }
            CustomMessage custommessage = new CustomMessageBO().FirstOrDefault(connectionHandler, x => x.CongressId == congressId && x.Type == Enums.MessageInformType.RefereeArticle);

            foreach (var article in keyValuePairs)
            {
                var article1 = articleBo.Get(connectionHandler, article.obj.ArticleId);
                if (article1 == null)
                {
                    continue;
                }
                var name                       = referee.EnterpriseNode.DescriptionFieldWithGender;
                var homaCompleteUrl            = homa1.GetHomaCompleteUrl();
                var homaArticleRefereePanelUrl = homa1.GetHomaArticleRefereePanelUrl(article1.Id, referee.Id);
                var email                      = string.Format(article.EmailBody, homa1.CongressTitle, name, article1.Title, homaCompleteUrl, homaArticleRefereePanelUrl);
                var sms = string.Format(article.SmsBody, homa1.CongressTitle, name, article1.Code);

                if (custommessage != null)
                {
                    if (!string.IsNullOrEmpty(custommessage.EmailText))
                    {
                        email = custommessage.EmailText.Replace($"[{Enums.RefereeArticleMessageKey.FullName.ToString()}]", name);
                        email = email.Replace($"[{Enums.RefereeArticleMessageKey.Username.ToString()}]", referee.Username);
                        email = email.Replace($"[{Enums.RefereeArticleMessageKey.ArticleCode.ToString()}]", article1.Code.ToString());
                        email = email.Replace($"[{Enums.RefereeArticleMessageKey.ArticleTitle.ToString()}]", article1.Title);
                        email = email.Replace($"[{Enums.RefereeArticleMessageKey.CongressTitle.ToString()}]", homa1.CongressTitle);
                        email = email.Replace($"[{Enums.RefereeArticleMessageKey.CongressAddress.ToString()}]", homaCompleteUrl);
                    }
                    if (!string.IsNullOrEmpty(custommessage.SmsText))
                    {
                        sms = custommessage.SmsText.Replace($"[{Enums.RefereeArticleMessageKey.FullName.ToString()}]", name);
                        sms = sms.Replace($"[{Enums.RefereeArticleMessageKey.Username.ToString()}]", referee.Username);
                        sms = sms.Replace($"[{Enums.RefereeArticleMessageKey.ArticleCode.ToString()}]", article1.Code.ToString());
                        sms = sms.Replace($"[{Enums.RefereeArticleMessageKey.ArticleTitle.ToString()}]", article1.Title);
                        sms = sms.Replace($"[{Enums.RefereeArticleMessageKey.CongressTitle.ToString()}]", homa1.CongressTitle);
                        sms = sms.Replace($"[{Enums.RefereeArticleMessageKey.CongressAddress.ToString()}]", homaCompleteUrl);
                    }
                }


                var inform = new Message.Tools.ModelView.MessageModel()
                {
                    Email      = referee.EnterpriseNode.Email,
                    Mobile     = referee.EnterpriseNode.Cellphone,
                    EmailTitle = homa1.CongressTitle,
                    EmailBody  = email,
                    SMSBody    = sms
                };
                new HomaBO().SendInform((byte)config.RefereeInformType, inform, config, homa1.CongressTitle);
                MessageComponenet.SentInternalMessageInstance.MailBoxFacade.SendInternalMail(homa1.OwnerId, config.CongressId,
                                                                                             new[] { referee.EnterpriseNode.Id.ToString() }, homa1.CongressTitle, inform.SMSBody);
            }
        }
コード例 #19
0
ファイル: RefereeBO.cs プロジェクト: davoodkosari/Zibasazi
        public void InformRefereeRegister(IConnectionHandler connectionHandler, Guid congressId, ModelView.InFormEntitiyList <Referee> valuePairs)
        {
            if (!valuePairs.Any())
            {
                return;
            }

            var config = new ConfigurationBO().Get(connectionHandler, congressId);

            if (config.RefereeInformType == null)
            {
                return;
            }
            var           homa1         = new HomaBO().Get(connectionHandler, config.CongressId);
            CustomMessage custommessage = new CustomMessageBO().FirstOrDefault(connectionHandler, x => x.CongressId == congressId && x.Type == Enums.MessageInformType.Referee);
            var           @where        = this.Where(connectionHandler, x => x.Id.In(valuePairs.Select(i => i.obj.Id)));

            foreach (var valuePair in valuePairs)
            {
                var referee = @where.FirstOrDefault(x => x.Id == valuePair.obj.Id);
                if (referee == null)
                {
                    continue;
                }
                var name = referee.EnterpriseNode.DescriptionFieldWithGender;
                var homaRefereePanelUrl = homa1.GetHomaRefereePanelUrl();
                var homaCompleteUrl     = homa1.GetHomaCompleteUrl();
                var email = string.Format(valuePair.EmailBody, homa1.CongressTitle, name, homaCompleteUrl, homaRefereePanelUrl, valuePair.obj.Username, valuePair.obj.PasswordWithoutHash);
                var sms   = string.Format(valuePair.SmsBody, homa1.CongressTitle, name, homaRefereePanelUrl, valuePair.obj.Username, valuePair.obj.PasswordWithoutHash);

                if (custommessage != null)
                {
                    if (!string.IsNullOrEmpty(custommessage.EmailText))
                    {
                        email = custommessage.EmailText.Replace($"[{Enums.RefereeMessageKey.FullName.ToString()}]", name);
                        email = email.Replace($"[{Enums.RefereeMessageKey.Username.ToString()}]", referee.Username);
                        email = email.Replace($"[{Enums.RefereeMessageKey.Email.ToString()}]", referee.EnterpriseNode.Email);
                        email = email.Replace($"[{Enums.RefereeMessageKey.CongressTitle.ToString()}]", homa1.CongressTitle);
                        email = email.Replace($"[{Enums.RefereeMessageKey.Password.ToString()}]", valuePair.obj.PasswordWithoutHash);
                        email = email.Replace($"[{Enums.RefereeMessageKey.CongressAddress.ToString()}]", homaCompleteUrl);
                    }
                    if (!string.IsNullOrEmpty(custommessage.SmsText))
                    {
                        sms = custommessage.SmsText.Replace($"[{Enums.RefereeMessageKey.FullName.ToString()}]", name);
                        sms = sms.Replace($"[{Enums.RefereeMessageKey.Username.ToString()}]", referee.Username);
                        sms = sms.Replace($"[{Enums.RefereeMessageKey.Email.ToString()}]", referee.EnterpriseNode.Email);
                        sms = sms.Replace($"[{Enums.RefereeMessageKey.CongressTitle.ToString()}]", homa1.CongressTitle);
                        sms = sms.Replace($"[{Enums.RefereeMessageKey.Password.ToString()}]", valuePair.obj.PasswordWithoutHash);
                        sms = sms.Replace($"[{Enums.RefereeMessageKey.CongressAddress.ToString()}]", homaCompleteUrl);
                    }
                }


                var inform = new Message.Tools.ModelView.MessageModel()
                {
                    Email      = referee.EnterpriseNode.Email,
                    Mobile     = referee.EnterpriseNode.Cellphone,
                    EmailTitle = homa1.DescriptionField,
                    EmailBody  = email,
                    SMSBody    = sms
                };
                new HomaBO().SendInform((byte)config.RefereeInformType, inform, config, homa1.CongressTitle);
                MessageComponenet.SentInternalMessageInstance.MailBoxFacade.SendInternalMail(homa1.OwnerId, config.CongressId,
                                                                                             new[] { referee.Id.ToString() }, homa1.CongressTitle, inform.SMSBody);
            }
        }