Exemplo n.º 1
0
    //-----------------------------------------------
    //Page_Load
    //-----------------------------------------------
    private void Page_Load(object sender, System.EventArgs e)
    {
        ItemsModulesOptions   currentModule         = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"];
        MessagesModuleOptions CurrentMessagesModule = MessagesModuleOptions.GetType(currentModule.MessagesModuleID);

        ucUpdate.ModuleTypeID    = CurrentMessagesModule.ModuleTypeID;
        ucUpdate.DefaultPagePath = "/AdminCP/Items/" + currentModule.Identifire + "/Messages/default.aspx";
        //-----------------------------------------------
        int messageID = -1;

        if (MoversFW.Components.UrlManager.ChechIsValidIntegerParameter("id"))
        {
            messageID = Convert.ToInt32(Request.QueryString["id"]);
        }
        //-----------------------------------------------
        if (messageID > 0)
        {
            MessagesEntity msg = MessagesFactory.GetMessagesObject(messageID, UsersTypes.Admin, SitesHandler.GetOwnerIDAsGuid());
            ucUpdate.DefaultPagePath += "?id=" + msg.ToItemID;
        }
        //-----------------------------------------------
        if (!IsPostBack)
        {
            this.Page.Title = CurrentMessagesModule.GetModuleTitle() + " - " + DynamicResource.GetMessageModuleText(CurrentMessagesModule, "Module_MessageData");
        }
    }
Exemplo n.º 2
0
        public static bool ContactUS(ContactUsModel model, out string resultMessage)
        {
            int moduleTypeID = 501;
            MessagesModuleOptions currentMessageModule = MessagesModuleOptions.GetType(moduleTypeID);
            //Preparing admin notification email
            string         mailBody = "<table style='width:auto; direction:" + DynamicResource.GetText("Lang", "Dir") + "'>";
            MessagesEntity msg      = new MessagesEntity();

            //-------------------------------------
            msg.ModuleTypeID = moduleTypeID;
            //--------------------------------------------------------------------------
            msg.Name    = model.Name;
            mailBody   += string.Format(rowTemplate, DynamicResource.GetMessageModuleText(currentMessageModule, "Name"), msg.Name);
            msg.EMail   = model.Email;
            mailBody   += string.Format(rowTemplate, DynamicResource.GetMessageModuleText(currentMessageModule, "Email"), msg.EMail);
            msg.Details = model.Message;
            mailBody   += string.Format(rowTemplate, DynamicResource.GetMessageModuleText(currentMessageModule, "Details"), model.Message);
            //-------------------------------------
            msg.LangID = SiteSettings.GetCurrentLanguage();
            bool createMessageFolder = (currentMessageModule.HasFileExtension || currentMessageModule.HasPhotoExtension || currentMessageModule.HasPhoto2Extension || currentMessageModule.HasVideoExtension || currentMessageModule.HasAudioExtension);
            bool status = MessagesFactory.Create(msg, createMessageFolder);

            if (status)
            {
                //-------------------------------------------------------------------------
                //RegisterInMailList
                if ((currentMessageModule.MailListAutomaticRegistration || (msg.HasEmailService)) && !string.IsNullOrEmpty(msg.EMail))
                {
                    MessagesFactory.RegisterInMailList(msg);
                }
                //------------------------------------------------------------------------
                //RegisterInSms
                if ((currentMessageModule.SmsAutomaticRegistration || (msg.HasSmsService)) && !string.IsNullOrEmpty(msg.Mobile))
                {
                    MessagesFactory.RegisterInSms(msg);
                }
                //------------------------------------------------------------------------
                //------------------------------------------------------------------------
                if (SiteSettings.Admininstration_HasAdminEmail)
                {
                    try
                    {
                        string subject = DynamicResource.GetMessageModuleText(currentMessageModule, "NewMessageRecieved");
                        SendMailToSiteAdmin(subject, mailBody);
                    }
                    catch (Exception exc)
                    {
                    }
                }
                //------------------------------------------------------------------------
                resultMessage = DynamicResource.GetMessageModuleText(currentMessageModule, "SendinogOperationDone");
            }
            else
            {
                resultMessage = DynamicResource.GetMessageModuleText(currentMessageModule, "SendinogOperationFaild");
            }
            return(status);
        }
Exemplo n.º 3
0
    //-----------------------------------------------
    //Page_Load
    //-----------------------------------------------
    private void Page_Load(object sender, System.EventArgs e)
    {
        ItemsModulesOptions   currentModule         = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"];
        MessagesModuleOptions CurrentMessagesModule = MessagesModuleOptions.GetType(currentModule.MessagesModuleID);

        ucExport.ModuleTypeID = CurrentMessagesModule.ModuleTypeID;
        if (!IsPostBack)
        {
            this.Page.Title = CurrentMessagesModule.GetModuleTitle() + " - " + DynamicResource.GetMessageModuleText(CurrentMessagesModule, "Module_ExportData");
        }
    }
Exemplo n.º 4
0
    //-----------------------------------------------
    #endregion

    #region --------------Load_ddlType()--------------
    //---------------------------------------------------------
    //Load_ddlType
    //---------------------------------------------------------
    protected void Load_ddlType()
    {
        ddlType.Items.Insert(0, new ListItem(Resources.AdminText.Choose, "-1"));
        string text = "";
        string id   = "";

        for (int i = 1; i <= currentModule.TypesCount; i++)
        {
            id   = i.ToString();
            text = DynamicResource.GetMessageModuleText(currentModule, "Type_" + i);
            ddlType.Items.Add(new ListItem(text, id));
        }
    }
Exemplo n.º 5
0
    //--------------------------------------------------------
    #endregion

    #region --------------GetEducationLevelText--------------
    //---------------------------------------------------------
    //GetEducationLevelText
    //---------------------------------------------------------
    protected string GetEducationLevelText(object _value)
    {
        string text = "";

        if (_value != null && _value.ToString().Length > 0)
        {
            text = DynamicResource.GetMessageModuleText(currentModule, "EducationLevel_" + _value.ToString());
        }
        if (string.IsNullOrEmpty(text))
        {
            text = Resources.Messages.Unspecified;
        }
        return(text);
    }
Exemplo n.º 6
0
    //--------------------------------------------------------
    #endregion

    #region --------------GetAgeText--------------
    //---------------------------------------------------------
    //GetAgeText
    //---------------------------------------------------------
    protected string GetAgeText(object age)
    {
        string text = "";

        if (age != null && age.ToString().Length > 0)
        {
            text = DynamicResource.GetMessageModuleText(currentModule, "AgeRang_" + age.ToString());
        }
        if (string.IsNullOrEmpty(text))
        {
            text = Resources.Messages.Unspecified;
        }
        return(text);
    }
Exemplo n.º 7
0
    //--------------------------------------------------------
    #endregion

    #region --------------GetActivitiesIDText--------------
    //---------------------------------------------------------
    //GetActivitiesIDText
    //---------------------------------------------------------
    protected string GetActivitiesIDText(object ActivitiesID)
    {
        string text = "";

        if (ActivitiesID != null && ActivitiesID.ToString().Length > 0)
        {
            text = DynamicResource.GetMessageModuleText(currentModule, "ActivitiesID_" + ActivitiesID);
        }
        if (string.IsNullOrEmpty(text))
        {
            text = Resources.Messages.Unspecified;
        }
        return(text);
    }
Exemplo n.º 8
0
    //--------------------------------------------------------
    #endregion

    #region --------------GetJobIDText--------------
    //---------------------------------------------------------
    //GetJobIDText
    //---------------------------------------------------------
    protected string GetJobIDText(object job)
    {
        string text = "";

        if (job != null && job.ToString().Length > 0)
        {
            text = DynamicResource.GetMessageModuleText(currentModule, "Job_" + job);
        }
        if (string.IsNullOrEmpty(text))
        {
            text = Resources.Messages.Unspecified;
        }
        return(text);
    }
Exemplo n.º 9
0
    //--------------------------------------------------------
    #endregion

    #region --------------GetTypeText--------------
    //---------------------------------------------------------
    //GetTypeText
    //---------------------------------------------------------
    protected string GetTypeText(object type)
    {
        string text = "";

        if (type != null && type.ToString().Length > 0)
        {
            text = DynamicResource.GetMessageModuleText(currentModule, "Type_" + type);
        }
        if (string.IsNullOrEmpty(text))
        {
            text = Resources.Messages.Unspecified;
        }
        return(text);
    }
Exemplo n.º 10
0
 //-----------------------------------------------
 //SetTexts
 //-----------------------------------------------
 private void SetTexts()
 {
     //-----------------------------------------------
     dgMessages.Columns[1].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Title");
     dgMessages.Columns[3].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Email");
     dgMessages.Columns[3].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Name");
     dgMessages.Columns[4].HeaderText = Resources.AdminText.AdminGrid_ReviewStatus;
     dgMessages.Columns[5].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Reply");
     dgMessages.Columns[6].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "IsAvailable_Status");
     dgMessages.Columns[7].HeaderText = Resources.AdminText.AdminGrid_InActiveComments;
     dgMessages.Columns[8].HeaderText = Resources.AdminText.AdminGrid_ActiveComments;
     dgMessages.Columns[9].HeaderText = Resources.AdminText.AdminGrid_DateAdded;
     //-----------------------------------------------
     lblType.Text = DynamicResource.GetMessageModuleText(currentModule, "Type");
     //-----------------------------------------------
 }
Exemplo n.º 11
0
    //----------------------------------------------------------
    #endregion

    #region ----------------BuildMessagesModuleLinks---------------
    //----------------------------------------------------------
    //BuildMessagesModuleLinks
    //----------------------------------------------------------
    public string BuildMessagesModuleLinks(int moduleType)
    {
        //------------------------------------------------------------------------------------------------
        MessagesModuleOptions msgsModule = MessagesModuleOptions.GetType(moduleType);
        //------------------------------------------------------------------------------------------------
        string moduleTitleText       = msgsModule.GetModuleTitle();
        string categoriesAddText     = Resources.Modules.Module_CategoriesAdd;
        string categoriesDefaultText = Resources.Modules.Module_CategoriesDefault;
        string exportData            = Resources.Modules.Module_ExportData;
        string newMessageText        = Resources.Modules.Module_NewMessage;
        string allMessageText        = Resources.Modules.Module_AllMessage;

        //------------------------------------------------------------------------------------------------
        if (msgsModule.HasSpecialAdminText)
        {
            //moduleTitleText = itemsModule.GetModuleTitle();
            categoriesAddText     = DynamicResource.GetMessageModuleText(msgsModule, "Module_CategoriesAdd");
            categoriesDefaultText = DynamicResource.GetMessageModuleText(msgsModule, "Module_CategoriesDefault");
            exportData            = DynamicResource.GetMessageModuleText(msgsModule, "Module_ExportData");
            newMessageText        = DynamicResource.GetMessageModuleText(msgsModule, "Module_NewMessage");
            allMessageText        = DynamicResource.GetMessageModuleText(msgsModule, "Module_AllMessage");
        }
        //------------------------------------------------------------------------------------------------
        string links  = "";
        string folder = msgsModule.Identifire.ToString();

        if (ZecurityManager.CheckFolderPermission("/AdminCP/Messages/" + folder + "/"))
        {
            links += "<li " + AdditionalLinkClassIfActive("/AdminCP/Messages/" + folder + "/") + "><a href=\"#\"><i class=\"icon-stack2\"></i><span>" + moduleTitleText + "</span></a>";
            links += "<ul>";
            if (msgsModule.CategoryLevel != 0 && msgsModule.DisplayCategoriesInAdminMenue)
            {
                links += "<li " + AdditionalLinkClassIfActive("/Messages/" + folder + "/Cats/Add.aspx") + "><a href=\"/AdminCP/Messages/" + folder + "/Cats/Add.aspx\">" + categoriesAddText + "</a></li>";
                links += "<li " + AdditionalLinkClassIfActive("/Messages/" + folder + "/Cats/default.aspx") + "><a href=\"/AdminCP/Messages/" + folder + "/Cats/default.aspx\">" + categoriesDefaultText + "</a></li>";
            }
            links += "<li " + AdditionalLinkClassIfActive("Messages/" + folder + "/New.aspx") + "><a href=\"/AdminCP/Messages/" + folder + "/New.aspx\">" + newMessageText + "</a></li>";
            links += "<li " + AdditionalLinkClassIfActive("Messages/" + folder + "/default.aspx") + "><a href=\"/AdminCP/Messages/" + folder + "/default.aspx\">" + allMessageText + "</a></li>";
            if (msgsModule.HasExportData)
            {
                links += "<li " + AdditionalLinkClassIfActive("/Messages/" + folder + "/Export.aspx") + "><a href=\"/AdminCP/Messages/" + folder + "/Export.aspx\">" + exportData + "</a></li>";
            }
            links += "</ul>";
        }
        return(links);
    }
Exemplo n.º 12
0
    //-----------------------------------------------
    //Page_Load
    //-----------------------------------------------
    private void Page_Load(object sender, System.EventArgs e)
    {
        ItemsModulesOptions   currentModule         = (ItemsModulesOptions)HttpContext.Current.Items["CurrentItemsModule"];
        MessagesModuleOptions CurrentMessagesModule = MessagesModuleOptions.GetType(currentModule.MessagesModuleID);
        //-----------------------------------------------
        int itemID = -1;

        if (MoversFW.Components.UrlManager.ChechIsValidIntegerParameter("id"))
        {
            itemID = Convert.ToInt32(Request.QueryString["id"]);
        }
        //-----------------------------------------------
        ucGetAll.ModuleTypeID = CurrentMessagesModule.ModuleTypeID;
        ucGetAll.ToItemID     = itemID;
        //-----------------------------------------------
        if (!IsPostBack)
        {
            this.Page.Title = CurrentMessagesModule.GetModuleTitle() + " - " + DynamicResource.GetMessageModuleText(CurrentMessagesModule, "Module_AllMessage");
        }
    }
Exemplo n.º 13
0
    //-----------------------------------------------
    #endregion



    #region ---------------SetTexts---------------
    //-----------------------------------------------
    //SetTexts
    //-----------------------------------------------
    private void SetTexts()
    {
        lblType.Text = DynamicResource.GetMessageModuleText(currentModule, "Type");
        //-------------------------------------------------------------------------------------------
        //Set Gerid Headers
        //-------------------------------------------------------------------------------------------
        dgMessages.Columns[0].HeaderText  = DynamicResource.GetMessageModuleText(currentModule, "Name");
        dgMessages.Columns[1].HeaderText  = DynamicResource.GetMessageModuleText(currentModule, "EMail");
        dgMessages.Columns[2].HeaderText  = DynamicResource.GetMessageModuleText(currentModule, "CountryID");
        dgMessages.Columns[3].HeaderText  = DynamicResource.GetMessageModuleText(currentModule, "CityID");
        dgMessages.Columns[4].HeaderText  = DynamicResource.GetMessageModuleText(currentModule, "UserCityName");
        dgMessages.Columns[5].HeaderText  = DynamicResource.GetMessageModuleText(currentModule, "Company");
        dgMessages.Columns[6].HeaderText  = DynamicResource.GetMessageModuleText(currentModule, "JobID");
        dgMessages.Columns[7].HeaderText  = DynamicResource.GetMessageModuleText(currentModule, "JobText");
        dgMessages.Columns[8].HeaderText  = DynamicResource.GetMessageModuleText(currentModule, "EmpNo");
        dgMessages.Columns[9].HeaderText  = DynamicResource.GetMessageModuleText(currentModule, "JobTel");
        dgMessages.Columns[10].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "ActivitiesID");
        dgMessages.Columns[11].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Url");
        dgMessages.Columns[12].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Tel");
        dgMessages.Columns[13].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Mobile");
        dgMessages.Columns[14].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Fax");
        dgMessages.Columns[15].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "MailBox");
        dgMessages.Columns[16].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "ZipCode");
        dgMessages.Columns[17].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Address");
        dgMessages.Columns[18].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "AgeRang");
        dgMessages.Columns[19].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Gender");
        dgMessages.Columns[20].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "BirthDate");
        dgMessages.Columns[21].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "SocialStatus");
        dgMessages.Columns[22].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "EducationLevel");
        dgMessages.Columns[23].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Type");
        dgMessages.Columns[24].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "HasSmsService");
        dgMessages.Columns[25].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "HasEmailService");
        dgMessages.Columns[26].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "Date_Added");
        dgMessages.Columns[27].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "IsSeen");
        dgMessages.Columns[28].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "IsReplied");
        dgMessages.Columns[29].HeaderText = DynamicResource.GetMessageModuleText(currentModule, "IsAvailable");
        //-------------------------------------------------------------------------------------------
    }
Exemplo n.º 14
0
    //-----------------------------------------------
    //Page_Load
    //-----------------------------------------------
    private void Page_Load(object sender, System.EventArgs e)
    {
        MessagesModuleOptions CurrentMessagesModule = (MessagesModuleOptions)HttpContext.Current.Items["CurrentMessagesModule"];

        ucGetAll.ModuleTypeID = CurrentMessagesModule.ModuleTypeID;
        //-----------------------------------------------
        if (!IsPostBack)
        {
            if (CurrentMessagesModule.HasSpecialAdminText)
            {
                this.Page.Title = CurrentMessagesModule.GetModuleAdminSpecialTitle() + " - " + DynamicResource.GetMessageModuleText(CurrentMessagesModule, "Module_CategoriesDefault");
            }
            else
            {
                this.Page.Title = CurrentMessagesModule.GetModuleAdminSpecialTitle() + " - " + Resources.Modules.Module_CategoriesDefault;
            }
        }
        //-----------------------------------------------
    }
Exemplo n.º 15
0
    //-----------------------------------------------
    //Page_Load
    //-----------------------------------------------
    private void Page_Load(object sender, System.EventArgs e)
    {
        MessagesModuleOptions CurrentMessagesModule = (MessagesModuleOptions)HttpContext.Current.Items["CurrentMessagesModule"];

        ucSendSms.ModuleTypeID = CurrentMessagesModule.ModuleTypeID;
        ucSendSms.FormSmsTo    = FormSMSToTypes.All;
        //-----------------------------------------------
        if (!IsPostBack)
        {
            if (CurrentMessagesModule.HasSpecialAdminText)
            {
                this.Page.Title = CurrentMessagesModule.GetModuleAdminSpecialTitle() + " - " + DynamicResource.GetMessageModuleText(CurrentMessagesModule, "SendSms");
            }
            else
            {
                this.Page.Title = CurrentMessagesModule.GetModuleAdminSpecialTitle() + " - " + Resources.Modules.SendSms;
            }
        }
        //-----------------------------------------------
    }
Exemplo n.º 16
0
    //-----------------------------------------------
    //Page_Load
    //-----------------------------------------------
    private void Page_Load(object sender, System.EventArgs e)
    {
        MessagesModuleOptions CurrentMessagesModule = (MessagesModuleOptions)HttpContext.Current.Items["CurrentMessagesModule"];

        ucEdit.ModuleTypeID   = CurrentMessagesModule.ModuleTypeID;
        ucEdit.Identifire     = CurrentMessagesModule.Identifire;
        ucEdit.BaseModuleType = ModuleBaseTypes.Messages;
        //-----------------------------------------------
        if (!IsPostBack)
        {
            if (CurrentMessagesModule.HasSpecialAdminText)
            {
                this.Page.Title = CurrentMessagesModule.GetModuleAdminSpecialTitle() + " - " + DynamicResource.GetMessageModuleText(CurrentMessagesModule, "Module_Comments");
            }
            else
            {
                this.Page.Title = CurrentMessagesModule.GetModuleAdminSpecialTitle() + " - " + Resources.Modules.Module_Comments;
            }
        }
        //-----------------------------------------------
    }