Ejemplo n.º 1
0
        private void GetConfig()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (item.Key_name == Constant.Configuration.config_fblike)
                    {
                        ltrFBLike.Text = string.Format(" <a href=\"javascript:void(0)\" class=\"facebook\" onclick=\"st_buildingx_PopupCenterDual('{0}','facebook',600,600);\"> <i class=\"fa fa-facebook\"></i><span></span></a>", item.Value_name);
                    }
                    else if (item.Key_name == Constant.Configuration.config_twitter)
                    {
                        ltrTwiter.Text = string.Format(" <a href=\"javascript:void(0)\" class=\"twitter\" onclick=\"st_buildingx_PopupCenterDual('{0}','twitter',600,600);\"> <i class=\"fa fa-twitter\"></i><span></span></a>", item.Value_name);
                    }
                    else if (item.Key_name == Constant.Configuration.config_pinterest)
                    {
                        ltrPinterest.Text = string.Format(" <a href=\"javascript:void(0)\" class=\"instagram\" onclick=\"st_buildingx_PopupCenterDual('{0}','pinterest',600,600);\"> <i class=\"fa fa-pinterest\"></i><span></span></a>", item.Value_name);
                    }
                    else if (item.Key_name == Constant.Configuration.config_googleplus)
                    {
                        ltrGooglePlus.Text = string.Format(" <a href=\"javascript:void(0)\" class=\"dribble\" onclick=\"st_buildingx_PopupCenterDual('{0}','google',600,600);\"> <i class=\"fa fa-google-plus\"></i><span></span></a>", item.Value_name);
                    }
                }
            }
        }
Ejemplo n.º 2
0
    protected void btn_add_Click(object sender, EventArgs e)
    {
        // Check whether admin section is in readonly mode.
        if (!Config.isAdminActionAllowed())
        {
            Response.Redirect(Config.GetUrl("adm/sc/Default.aspx?action_error=true"));
            return;
        }


        ConfigurationBLL.Update_Value(1, txt_title.Text);
        ConfigurationBLL.Update_Value(2, txt_description.Text);

        ConfigurationBLL.Update_Value(4, txt_email.Text);
        ConfigurationBLL.Update_Value(5, txt_emaildisplayname.Text);

        ConfigurationBLL.Update_Value(7, drp_databasetype.SelectedValue);
        ConfigurationBLL.Update_Value(8, drp_screening.SelectedValue);
        ConfigurationBLL.Update_Value(9, drp_approvaltype.SelectedValue);
        ConfigurationBLL.Update_Value(10, txt_abusereport_count.Text);
        ConfigurationBLL.Update_Value(11, txt_cache.Text);

        ConfigurationBLL.Update_Value(17, txt_channel_psize.Text);


        ConfigurationBLL.Update_Value(183, txt_tracking.Text);
        ConfigurationBLL.Update_Value(186, drp_template.SelectedValue);
        ConfigurationBLL.Update_Value(171, drp_navigationside.SelectedValue);
        ConfigurationBLL.Update_Value(26, txt_max_url_length.Text);


        Load_Settings();

        Config.ShowMessageV2(msg, "General Configuration Settings Updated Successfully", "Success!", 1);
    }
Ejemplo n.º 3
0
        private void GetLogo()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (item.Key_name == Constant.Configuration.config_logoHeader)
                    {
                        imgLogo.Src  = imgLogo.Src = WebUtils.GetUrlImage(Constant.DSC.AdvUploadFolder, item.Value_name);
                        hypIcon.HRef = WebUtils.RedirectHomePage();
                    }
                    if (item.Key_name == Constant.Configuration.config_fbfanpage)
                    {
                        hypFBFanpage.HRef = item.Value_name;
                    }
                    if (item.Key_name == Constant.Configuration.skypeid)
                    {
                        ltrWokingTimeValue.Text = item.Value_name;
                    }
                    if (item.Key_name == Constant.Configuration.email)
                    {
                        ltrEmail.Text = item.Value_name;
                    }
                    else if (item.Key_name == Constant.Configuration.config_twitter)
                    {
                        this.hypTwitter.HRef = item.Value_name;
                    }
                    else if (item.Key_name == Constant.Configuration.config_linkedIn)
                    {
                        this.hypLinkedIn.HRef = item.Value_name;
                    }

                    if (LangInt == 1)
                    {
                        if (item.Key_name == Constant.Configuration.config_address_vi)
                        {
                            ltrAddressValue.Text = item.Value_name;
                        }
                        if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }
                    }
                    else
                    {
                        if (item.Key_name == Constant.Configuration.config_address1_vi)
                        {
                            ltrAddressValue.Text = item.Value_name;
                        }
                        if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }
                    }
                }
            }
        }
Ejemplo n.º 4
0
        private void ShowConfig()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            foreach (PNK_Configuration item in lst)
            {
                if (item.Key_name == Constant.Configuration.config_fbfanpage)
                {
                    this.hypFB.HRef = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_googleplus)
                {
                    this.hypGooglePlus.HRef = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_twitter)
                {
                    this.hypTwitter.HRef = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_linkedIn)
                {
                    this.hypLinkedIn.HRef = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_pinterest)
                {
                    this.hypPinTerest.HRef = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_reddit)
                {
                    this.hypReddit.HRef = item.Value_name;
                }
            }
        }
Ejemplo n.º 5
0
        private void GetLogo()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (item.Key_name == Constant.Configuration.config_logoHeader)
                    {
                        imgLogoSticky.Src   = imgLogo.Src = WebUtils.GetUrlImage(Constant.DSC.AdvUploadFolder, item.Value_name);
                        hypImgHomePage.HRef = hypImgHomePagesticky.HRef = WebUtils.RedirectHomePage();
                    }
                    else if (item.Key_name == Constant.Configuration.phone)
                    {
                        ltrPhoneValue.Text = item.Value_name;
                    }
                    else if (item.Key_name == Constant.Configuration.email)
                    {
                        // ltrEmail.Text = item.Value_name;
                    }
                    if (LangInt == 1)
                    {
                        if (item.Key_name == Constant.Configuration.config_address_vi)
                        {
                            //ltrAddressValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            //ltrEmail.Text = item.Value_name;
                        }
                    }
                    else
                    {
                        if (item.Key_name == Constant.Configuration.config_address1_vi)
                        {
                            // ltrAddressValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            // ltrEmail.Text = item.Value_name;
                        }
                    }
                }
            }
        }
Ejemplo n.º 6
0
        private void InitPage()
        {
            try
            {
                this.template_path = WebUtils.GetWebPath();
                pageName           = Utils.GetParameter("page", "home");
                cid    = Utils.GetParameter("cid", string.Empty);
                cidsub = Utils.GetParameter("cidsub", string.Empty);
                id     = Utils.GetParameter("id", string.Empty);

                //string pathUsc = pageName;
                //switch (pageName)
                //{
                //    case "home":
                //    case "trang-chu":
                //        pathUsc = "Pages/home.ascx";
                //        break;
                //    default:
                //        pathUsc = "Controls/block_breakumb.ascx";
                //        break;

                //}
                //UserControl contentView = (UserControl)Page.LoadControl(pathUsc);
                //childContent.Controls.Add(contentView);

                ProductCategoryBLL          pcBllCate = new ProductCategoryBLL();
                IList <PNK_ProductCategory> lstCate   = pcBllCate.GetList(1, pageName, string.Empty, int.MinValue, false, "p.ordering", 1, 9999, out total);
                if (total > 0)
                {
                    string pagePath = lstCate[0].PageDetail.ToLower();
                    if (pagePath.Contains("template") && id != string.Empty && cidsub != "page")
                    {
                        top_menu.Visible = footer.Visible = main.Visible = false;
                    }
                }
            }
            catch (Exception ex)
            {
            }

            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (item.Key_name == Constant.Configuration.config_vchat)
                    {
                        // WebUtils.IncludeJSScript(this.Page, item.Value_name);
                    }
                }
            }
        }
Ejemplo n.º 7
0
        private void GetConfig()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (LangInt == 1)
                    {
                        if (item.Key_name == Constant.Configuration.config_address_vi)
                        {
                            ltrAddressValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            ltrEmail.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.skypeid)
                        {
                            ltrHouse.Text = item.Value_name;
                        }
                    }
                    else
                    {
                        if (item.Key_name == Constant.Configuration.config_address1_vi)
                        {
                            ltrAddressValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            ltrEmail.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.skypeid)
                        {
                            ltrHouse.Text = item.Value_name;
                        }
                    }
                }
            }
        }
Ejemplo n.º 8
0
        public void ProcessRequest(HttpContext context)
        {
            var json = new StreamReader(context.Request.InputStream).ReadToEnd();
            var responseMsg = new Dictionary <string, string>(); var _ld_post_data = new Dictionary <string, CategoryObject>();

            if ((context.Request.Params["action"] != null))
            {
                switch (context.Request.Params["action"])
                {
                // This update is only for pubplishing pending videos (unpublished videos only)
                case "update":

                    // Authentication
                    if (!context.User.Identity.IsAuthenticated)
                    {
                        responseMsg["status"]  = "error";
                        responseMsg["message"] = "Authentication Failed";
                        context.Response.Write(responseMsg);
                        return;
                    }
                    var _data = JsonConvert.DeserializeObject <Category_Struct>(json);
                    ConfigurationBLL.Update_Value(_data.ID, _data.Name);

                    responseMsg["status"]  = "success";
                    responseMsg["message"] = "Operation Commit";
                    context.Response.Write(responseMsg);
                    break;

                case "return_value":
                    int ID = 0;
                    if (context.Request.Params["id"] != null)
                    {
                        ID = Convert.ToInt32(context.Request.Params["id"]);
                    }

                    responseMsg["value"] = ConfigurationBLL.Return_Value(ID);
                    context.Response.Write(responseMsg);
                    break;
                }
            }
            else
            {
                // No action found
                responseMsg["status"]  = "error";
                responseMsg["message"] = "No action found";
                context.Response.Write(JsonConvert.SerializeObject(responseMsg));
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// SaveConfig
        /// </summary>
        private void SaveConfig()
        {
            //Xoá cache trước khi lưu
            CacheHelper.ClearContains("Configuration");

            ConfigurationBLL cgBLL = new ConfigurationBLL();

            cgBLL.SaveConfig(
                txt_config_email.Value.Trim(), txt_config_phone.Value.Trim(), txt_config_sitename.Value.Trim(), txtFax.Value.Trim(), txtSkype.Value.Trim()
                , editContact.Text, txtCompanyName.Value.Trim(), txtCompanyNameEng.Value.Trim(), txtAddress.Value.Trim(), txtAddress1.Value.Trim(), filenameUploadHeader, filenameUploadFooter
                , filenameUploadLocation, txtTitle.Value.Trim(), txtMetaDescription.Value.Trim(), txtMetaKeyword.Value.Trim(), txtFacebook.Value.Trim()
                , txtGooglePlus.Value.Trim(), txtTwitter.Value.Trim(), txtH1.Value.Trim(), txtH2.Value.Trim(), txtH3.Value.Trim(), txtAnalytic.Value.Trim()
                , txtLikePage.Value.Trim(), txtVChat.Value.Trim(), txtLatitude.Value.Trim(), txtLongitude.Value.Trim(), editFooter.Text);

            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), Guid.NewGuid().ToString(), string.Format("jAlert('{0}','Message');", Constant.UI.admin_msg_save_success), true);
        }
        private void GetConfig()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (item.Key_name == Constant.Configuration.phone)
                    {
                        ltrPhoneValue.Text = item.Value_name;
                    }
                }
            }
        }
Ejemplo n.º 11
0
        private void GetSEO()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (item.Key_name == Constant.Configuration.config_title)
                    {
                        title = item.Value_name;
                    }
                    else if (item.Key_name == Constant.Configuration.config_metaDescription)
                    {
                        metaDescription = item.Value_name;
                    }
                    else if (item.Key_name == Constant.Configuration.config_metaKeyword)
                    {
                        metaKeyword = item.Value_name;
                    }

                    else if (item.Key_name == Constant.Configuration.config_h1)
                    {
                        h1 = item.Value_name;
                    }
                    else if (item.Key_name == Constant.Configuration.config_h2)
                    {
                        h2 = item.Value_name;
                    }
                    else if (item.Key_name == Constant.Configuration.config_h3)
                    {
                        h3 = item.Value_name;
                    }
                    else if (item.Key_name == Constant.Configuration.config_analytic)
                    {
                        analytic = item.Value_name;
                    }
                }

                WebUtils.SeoPage(title, metaDescription, metaKeyword, this.Page);
                WebUtils.SeoTagH(h1, h2, h3, Controls);

                //Google Analytic
                WebUtils.IncludeJSScript(this.Page, analytic);
            }
        }
Ejemplo n.º 12
0
        private void ShowConfig()
        {
            string latitude = string.Empty, longitude = string.Empty, companyName = string.Empty, imageName = string.Empty, address = string.Empty;

            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (LangInt == 1)
                    {
                        if (item.Key_name == Constant.Configuration.config_latitude)
                        {
                            latitude = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.config_longitude)
                        {
                            longitude = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.config_company_name_vi)
                        {
                            companyName = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.config_logoHeader)
                        {
                            imageName = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.config_address_vi)
                        {
                            address = item.Value_name;
                        }
                    }
                }

                if (!string.IsNullOrEmpty(latitude) && !string.IsNullOrEmpty(longitude))
                {
                    LoadGMap(latitude, longitude, companyName, address, imageName);
                }
            }
        }
Ejemplo n.º 13
0
        private void GetLogo()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (item.Key_name == Constant.Configuration.config_logoHeader)
                    {
                        imgLogo.Src = WebUtils.GetUrlImage(Constant.DSC.AdvUploadFolder, item.Value_name);
                    }
                    else if (item.Key_name == Constant.Configuration.config_company_name_vi)
                    {
                        //ltrCompanyName.Text = item.Value_name;
                    }
                }
            }
        }
Ejemplo n.º 14
0
        private void GetConfig()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (LangInt == 1)
                    {
                        //if (item.Key_name == Constant.Configuration.config_address_vi)
                        //{
                        //    ltrAddressValue.Text = item.Value_name;
                        //}
                        if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            ltrEmail.Text = item.Value_name;
                            hypEmail.HRef = string.Format("mailto:{0}", item.Value_name);
                        }
                    }
                    else
                    {
                        if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            ltrEmail.Text = item.Value_name;
                            hypEmail.HRef = string.Format("mailto:{0}", item.Value_name);
                        }
                    }
                }
            }
        }
Ejemplo n.º 15
0
        /// <summary>
        /// ShowConfig
        /// </summary>
        ///
        private void ShowConfig()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            foreach (PNK_Configuration item in lst)
            {
                if (item.Key_name == Constant.Configuration.sitename)
                {
                    this.txt_config_sitename.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.email)
                {
                    this.txt_config_email.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.phone)
                {
                    this.txt_config_phone.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.fax)
                {
                    this.txtFax.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.skypeid)
                {
                    this.txtSkype.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.yahooid)
                {
                    this.editContact.Text = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_address_vi)
                {
                    this.txtAddress.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_address1_vi)
                {
                    this.txtAddress1.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_company_name_vi)
                {
                    this.txtCompanyName.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_company_name_en)
                {
                    this.txtCompanyNameEng.Value = item.Value_name;
                }

                else if (item.Key_name == Constant.Configuration.config_title)
                {
                    this.txtTitle.Value = item.Value_name;
                }

                else if (item.Key_name == Constant.Configuration.config_metaDescription)
                {
                    this.txtMetaDescription.Value = item.Value_name;
                }

                else if (item.Key_name == Constant.Configuration.config_metaKeyword)
                {
                    this.txtMetaKeyword.Value = item.Value_name;
                }

                else if (item.Key_name == Constant.Configuration.config_fbfanpage)
                {
                    this.txtFacebook.Value = item.Value_name;
                }

                else if (item.Key_name == Constant.Configuration.config_googleplus)
                {
                    this.txtGooglePlus.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_twitter)
                {
                    this.txtTwitter.Value = item.Value_name;
                }

                else if (item.Key_name == Constant.Configuration.config_h1)
                {
                    this.txtH1.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_h2)
                {
                    this.txtH2.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_h3)
                {
                    this.txtH3.Value = item.Value_name;
                }

                else if (item.Key_name == Constant.Configuration.config_analytic)
                {
                    this.txtAnalytic.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_fblike)
                {
                    this.txtLikePage.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_vchat)
                {
                    this.txtVChat.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_linkedIn)
                {
                    this.txtLinkedIn.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_pinterest)
                {
                    this.txtPinterest.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_reddit)
                {
                    this.txtreddit.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_fbfanpageLarge)
                {
                    this.txtFBFooter.Value = item.Value_name;
                }

                else if (item.Key_name == Constant.Configuration.config_logoHeader)
                {
                    filenameUploadHeader = item.Value_name;
                    if (!string.IsNullOrEmpty(filenameUploadHeader))
                    {
                        SetVisibleImg(false, string.Format("{0}/{1}", ConfigurationManager.AppSettings["LogoUpload"], filenameUploadHeader), fuImageHeader, btnUploadImageHeader, lbnViewHeader, lbnDeleteHeader);
                    }
                    else
                    {
                        SetVisibleImg(true, string.Empty, fuImageHeader, btnUploadImageHeader, lbnViewHeader, lbnDeleteHeader);
                    }
                }

                else if (item.Key_name == Constant.Configuration.config_logoFooter)
                {
                    filenameUploadFooter = item.Value_name;
                    if (!string.IsNullOrEmpty(filenameUploadFooter))
                    {
                        SetVisibleImg(false, string.Format("{0}/{1}", ConfigurationManager.AppSettings["LogoUpload"], filenameUploadFooter), fuImageFooter, btnUploadImageFooter, lbnViewFooter, lbnDeleteFooter);
                    }
                    else
                    {
                        SetVisibleImg(true, string.Empty, fuImageFooter, btnUploadImageFooter, lbnViewFooter, lbnDeleteFooter);
                    }
                }

                else if (item.Key_name == "config_location")
                {
                    filenameUploadLocation = item.Value_name;
                    if (!string.IsNullOrEmpty(filenameUploadLocation))
                    {
                        SetVisibleImg(false, string.Format("{0}/{1}", ConfigurationManager.AppSettings["LogoUpload"], filenameUploadLocation), fuLocation, btnUploadLocation, lbnViewLocation, lbnDeleteLocation);
                    }
                    else
                    {
                        SetVisibleImg(true, string.Empty, fuLocation, btnUploadLocation, lbnViewLocation, lbnDeleteLocation);
                    }
                }

                else if (item.Key_name == Constant.Configuration.config_latitude)//Vĩ độ
                {
                    this.txtLatitude.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_longitude)//Kinh độ
                {
                    this.txtLongitude.Value = item.Value_name;
                }
                else if (item.Key_name == Constant.Configuration.config_footer)//footer
                {
                    this.editFooter.Text = item.Value_name;
                }
            }
        }
Ejemplo n.º 16
0
        private void SendEmailTempate(PNK_Booking obj)
        {
            string companyName = string.Empty, companyEmail = string.Empty, companyPhone = string.Empty;;

            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (item.Key_name == Constant.Configuration.config_company_name_vi)
                    {
                        companyName = item.Value_name;
                    }
                    if (item.Key_name == Constant.Configuration.email)
                    {
                        companyEmail = item.Value_name;
                    }
                    if (item.Key_name == Constant.Configuration.phone)
                    {
                        companyPhone = item.Value_name;
                    }
                }
            }

            string path    = Request.PhysicalApplicationPath;
            string strHtml = WebUtils.GetMailTemplate(Path.Combine(path, "TemplateMail/Booking.txt"));
            string body    = string.Format(strHtml,
                                           companyName,               //0
                                           obj.FullName,              //1
                                           obj.Email,                 //2
                                           obj.PhoneNumber,           //3
                                           obj.RequestTour,           //4
                                           obj.ExpectedDepartureDate, //5
                                           obj.NumberOfAduts,         //6
                                           obj.NumberOfChildren,      //7
                                           obj.HotelType,             //8
                                           obj.RoomType,              //9
                                           obj.RoomOther,             //10
                                           obj.BedType,               //11
                                           obj.BedOther,              //12
                                           obj.ArrivalPort,           //13
                                           obj.VisaOfNeed,            //14
                                           obj.PaymentMethod,         //15
                                           obj.Distance,              //16
                                           obj.FlightArrivalNo,       //17
                                           obj.FlightArrivaTime,      //18
                                           obj.FlightArrivalDate,     //19
                                           obj.FlightDepartureTime,   //20
                                           obj.FlightDepartureDate,   //21
                                           obj.CustomerHeight,        //22
                                           obj.CustomerAge,           //23
                                           obj.HotelName,             //24
                                           obj.HotelAddress,          //25
                                           companyEmail,              //26
                                           companyPhone,              //27


                                           "fasfasf");

            WebUtils.SendEmail("LienHe", string.Empty, string.Empty, body);
        }
Ejemplo n.º 17
0
        private void GetConfig()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (LangInt == 1)
                    {
                        if (item.Key_name == Constant.Configuration.config_address_vi)
                        {
                            ltrAddressValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.fax)
                        {
                            ltrFax.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.yahooid)
                        {
                            ltrFooterContact.Text = DBHelper.getTruncate(item.Value_name, 40);
                        }
                        //else if (item.Key_name == Constant.Configuration.config_googleplus)
                        //{
                        //    hypGooglePlus.HRef = item.Value_name;
                        //}

                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            ltrEmail.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.config_logoFooter)
                        {
                            logoFooter.Src     = WebUtils.GetUrlImage(Constant.DSC.AdvUploadFolder, item.Value_name);
                            hypLogoFooter.HRef = WebUtils.RedirectHomePage();
                        }
                        else if (item.Key_name == Constant.Configuration.config_footer)
                        {
                            ltrConfig_footer.Text = item.Value_name;
                        }
                    }
                    else
                    {
                        if (item.Key_name == Constant.Configuration.config_address1_vi)
                        {
                            ltrAddressValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }
                        //else if (item.Key_name == Constant.Configuration.config_fbfanpage)
                        //{
                        //    hypFBFP.HRef = item.Value_name;
                        //}
                        else if (item.Key_name == Constant.Configuration.yahooid)
                        {
                            ltrFooterContact.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.fax)
                        {
                            ltrFax.Text = item.Value_name;
                        }

                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            ltrEmail.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.config_logoFooter)
                        {
                            logoFooter.Src     = WebUtils.GetUrlImage(Constant.DSC.AdvUploadFolder, item.Value_name);
                            hypLogoFooter.HRef = WebUtils.RedirectHomePage();
                        }
                        else if (item.Key_name == Constant.Configuration.config_footer)
                        {
                            ltrConfig_footer.Text = item.Value_name;
                        }
                    }
                }
            }
        }
Ejemplo n.º 18
0
    protected void btn_add_Click(object sender, EventArgs e)
    {
        // Check whether admin section is in readonly mode.
        if (!Config.isAdminActionAllowed())
        {
            Response.Redirect(Config.GetUrl("adm/sc/Default.aspx?action_error=true"));
            return;
        }

        // update configuration values in database
        string value = "0";

        if (r_channels_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(74, value);



        if (r_comments_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(84, value);



        if (r_ads_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(90, value);

        if (r_email_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(91, value);

        if (r_email_ver_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(92, value);



        if (r_adult_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(94, value);

        if (r_rating_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(100, value);

        if (r_views_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(95, value);

        if (r_date_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(96, value);

        if (r_username_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(99, value);

        if (r_registration_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(97, value);

        if (r_registration_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(150, value);


        if (r_mchannel_on.Checked)
        {
            value = "true";
        }
        else
        {
            value = "false";
        }
        ConfigurationBLL.Update_Value(24, value);

        if (r_ip_on.Checked)
        {
            value = "true";
        }
        else
        {
            value = "false";
        }
        ConfigurationBLL.Update_Value(12, value);



        if (r_login_rating_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(101, value);

        if (r_login_comment_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(102, value);

        if (r_advice_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(103, value);

        if (r_cviews_on.Checked)
        {
            value = "1";
        }
        else
        {
            value = "0";
        }
        ConfigurationBLL.Update_Value(23, value);

        Load_Settings();
        Config.ShowMessageV2(msg, "Feature Configuration Settings Updated Successfully", "Success!", 1);
    }
Ejemplo n.º 19
0
        private void SendEmailTempate(PNK_Booking obj)
        {
            try
            {
                string companyName = string.Empty, companyEmail = string.Empty, companyPhone = string.Empty, companyAddress = string.Empty
                , companyWebsite = string.Empty, companyFax = string.Empty;

                ConfigurationBLL          pcBll = new ConfigurationBLL();
                IList <PNK_Configuration> lst   = pcBll.GetList();
                if (lst != null && lst.Count > 0)
                {
                    foreach (PNK_Configuration item in lst)
                    {
                        if (item.Key_name == Constant.Configuration.config_company_name_vi)
                        {
                            companyName = item.Value_name;
                        }
                        if (item.Key_name == Constant.Configuration.email)
                        {
                            companyEmail = item.Value_name;
                        }
                        if (item.Key_name == Constant.Configuration.phone)
                        {
                            companyPhone = item.Value_name;
                        }
                        if (item.Key_name == Constant.Configuration.config_address_vi)
                        {
                            companyAddress = item.Value_name;
                        }
                        if (item.Key_name == Constant.Configuration.sitename)
                        {
                            companyWebsite = item.Value_name;
                        }
                        if (item.Key_name == Constant.Configuration.fax)
                        {
                            companyFax = item.Value_name;
                        }
                    }
                }

                string path    = Request.PhysicalApplicationPath;
                string strHtml = WebUtils.GetMailTemplate(Path.Combine(path, "TemplateMail/Booking.html"));
                string body    = string.Format(strHtml,
                                               companyName,               //0
                                               obj.FirstName,             //1
                                               obj.LastName,              //2
                                               obj.Country,               //3
                                               obj.City,                  //4
                                               obj.PhoneNumber,           //5
                                               obj.Email,                 //6
                                               obj.PickUpLocation,        //7
                                               DateTime.Now,              //8
                                               obj.RequestTour,           //9
                                               obj.ExpectedDepartureDate, //10
                                               obj.NumberOfAduts,         //11
                                               obj.NumberOfChildren,      //12
                                               obj.NumberOfInfant,        //13
                                               obj.Total,                 //14
                                               obj.PaymentMethod,         //15
                                               companyAddress,            //16
                                               companyEmail,              //17
                                               companyWebsite,            //18
                                               companyPhone,              //19
                                               companyFax,                //20
                                               obj.PaymentStatus          //21
                                               );

                WebUtils.SendEmail("Contact", obj.Email, string.Empty, body);
            }
            catch (Exception ex)
            {
                Write2Log.WriteLogs("BookingResutl", "SendEmailTempate", ex.Message);
            }
        }
Ejemplo n.º 20
0
        private void GetLogo()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (item.Key_name == Constant.Configuration.config_logoHeader)
                    {
                        imgLogo.Src  = imgLogo.Src = WebUtils.GetUrlImage(Constant.DSC.AdvUploadFolder, item.Value_name);
                        hypIcon.HRef = hypImgHomePage.HRef = WebUtils.RedirectHomePage();
                    }
                    if (LangInt == 1)
                    {
                        //if (item.Key_name == Constant.Configuration.config_address_vi)
                        //{
                        //    ltrAddressValue.Text = item.Value_name;
                        //}
                        if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                            hypPhone.HRef      = string.Format("callto:{0}", item.Value_name);
                        }
                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            ltrEmail.Text = item.Value_name;
                            hypEmail.HRef = string.Format("mailto:{0}", item.Value_name);
                        }
                        //else
                        //if (item.Key_name == Constant.Configuration.config_fbfanpage)
                        //{
                        //    hypFBFP.HRef = item.Value_name;
                        //}
                        //else if (item.Key_name == Constant.Configuration.config_googleplus)
                        //{
                        //    hypGooglePlus.HRef = item.Value_name;
                        //}
                    }
                    else
                    {
                        //if (item.Key_name == Constant.Configuration.config_address1_vi)
                        //{
                        //    ltrAddressValue.Text = item.Value_name;
                        //}
                        if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                            hypPhone.HRef      = string.Format("callto:{0}", item.Value_name);
                        }
                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            ltrEmail.Text = item.Value_name;
                            hypEmail.HRef = string.Format("mailto:{0}", item.Value_name);
                        }
                        //else
                        //if (item.Key_name == Constant.Configuration.config_fbfanpage)
                        //{
                        //    hypFBFP.HRef = item.Value_name;
                        //}
                        //else if (item.Key_name == Constant.Configuration.config_googleplus)
                        //{
                        //    hypGooglePlus.HRef = item.Value_name;
                        //}
                    }
                }
            }
        }
Ejemplo n.º 21
0
        private void GetConfig()
        {
            ConfigurationBLL          pcBll = new ConfigurationBLL();
            IList <PNK_Configuration> lst   = pcBll.GetList();

            if (lst != null && lst.Count > 0)
            {
                foreach (PNK_Configuration item in lst)
                {
                    if (item.Key_name == Constant.Configuration.config_fbfanpageLarge)
                    {
                        ltrFBFooter.Text = item.Value_name;
                    }

                    if (LangInt == 1)
                    {
                        if (item.Key_name == Constant.Configuration.config_address_vi)
                        {
                            ltrAddressValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }

                        else if (item.Key_name == Constant.Configuration.yahooid)
                        {
                            ltrFooterContact.Text = item.Value_name;
                        }
                        //else if (item.Key_name == Constant.Configuration.config_googleplus)
                        //{
                        //    hypGooglePlus.HRef = item.Value_name;
                        //}
                        else if (item.Key_name == Constant.Configuration.config_footer)
                        {
                            ltrFooter.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            ltrEmail.Text = item.Value_name;
                        }
                    }
                    else
                    {
                        if (item.Key_name == Constant.Configuration.config_address1_vi)
                        {
                            ltrAddressValue.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.phone)
                        {
                            ltrPhoneValue.Text = item.Value_name;
                        }
                        //else if (item.Key_name == Constant.Configuration.config_fbfanpage)
                        //{
                        //    hypFBFP.HRef = item.Value_name;
                        //}
                        else if (item.Key_name == Constant.Configuration.yahooid)
                        {
                            ltrFooterContact.Text = item.Value_name;
                        }
                        //else if (item.Key_name == Constant.Configuration.config_googleplus)
                        //{
                        //    hypGooglePlus.HRef = item.Value_name;
                        //}
                        else if (item.Key_name == Constant.Configuration.config_footer)
                        {
                            //ltrFooter.Text = item.Value_name;
                        }
                        else if (item.Key_name == Constant.Configuration.email)
                        {
                            ltrEmail.Text = item.Value_name;
                        }
                    }
                }
            }
        }