Exemple #1
0
 protected override void Render(HtmlTextWriter writer)
 {
     if (!string.IsNullOrEmpty(this.ID) && this.Text.Length == 0)
     {
         string helpText = string.IsNullOrEmpty(LocalizationUtility.GetHelpText(this.ID)) ? LocalizationUtility.GetHelpText("noHelp") : LocalizationUtility.GetHelpText(this.ID);
         this.Attributes.Add("onmouseover", string.Format(Overlib.TOOLTIP, helpText));
         this.Attributes.Add("onmouseout", Overlib.MOUSEOUT);
     }
     base.Render(writer);
 }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            view  = Utility.GetParameter("view");
            title = LocalizationUtility.GetText("titleOverview");
            switch (view)
            {
            case "si": //Site Settings
                siteSettingsOverview.Visible = true;
                Page.Title = string.Format(title, LocalizationUtility.GetText("pnlSiteOverview"));
                break;

            case "sec": //Security
                security.Visible = true;
                Page.Title       = string.Format(title, LocalizationUtility.GetText("pnlSecurity"));
                break;

            case "s": //Sales
                sales.Visible = true;
                Page.Title    = string.Format(title, LocalizationUtility.GetText("pnlSales"));
                break;

            case "pm": //Product Management
                productmanagement.Visible = true;
                Page.Title = string.Format(title, LocalizationUtility.GetText("pnlProductManagement"));
                break;

            case "pco": //Product Coupons
                productcoupons.Visible = true;
                Page.Title             = string.Format(title, LocalizationUtility.GetText("pnlProductCoupons"));
                break;

            case "c": //Configuration
                configuration.Visible = true;
                Page.Title            = string.Format(title, LocalizationUtility.GetText("pnlConfigurationOverview"));
                break;

            case "mc": //Mail Configuration
                mailConfiguration.Visible = true;
                Page.Title = string.Format(title, LocalizationUtility.GetText("pnlMailConfiguration"));
                break;

            case "pc": //Payment Configuration
                providers.Visible = true;
                Page.Title        = string.Format(title, LocalizationUtility.GetText("pnlPaymentConfiguration"));
                break;

            case "tc": //Tax Configuration
                providers.Visible = true;
                Page.Title        = string.Format(title, LocalizationUtility.GetText("pnlTaxConfiguration"));
                break;

            case "sc": //Shipping Configuration
                providers.Visible = true;
                Page.Title        = string.Format(title, LocalizationUtility.GetText("pnlShippingConfiguration"));
                break;

            case "cs"://customer service
                customerService.Visible = true;
                Page.Title = string.Format(title, LocalizationUtility.GetText("pnlCustomerServiceConfiguration"));
                break;

            case "help":
                help.Visible = true;
                Page.Title   = string.Format(title, LocalizationUtility.GetText("pnlHelp"));
                break;

            default:
                lblNotDone.Visible = true;
                break;
            }
        }
 public override string TranslateErrorNumber(Language language)
 {
     return(LocalizationUtility.GetErrorDescription("X16", ErrorNumber, language) ??
            base.TranslateErrorNumber(language));
 }
Exemple #4
0
 /// <summary>
 /// Sets the descriptors properties.
 /// </summary>
 private void SetDescriptorsProperties()
 {
     this.Page.Title = LocalizationUtility.GetText("titleProductEditDescriptors");
 }
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (_product != null)
            {
                associatedAttributeCollection = Store.Caching.ProductCache.GetAssociatedAttributeCollectionByProduct(_product.ProductId);
                if (associatedAttributeCollection.Count > 0)
                {
                    Label   lblAttributeName;
                    TextBox textBox;
                    AttributeItemCollection attributeItemCollection;
                    foreach (AssociatedAttribute associatedAttribute in associatedAttributeCollection)
                    {
                        lblAttributeName          = new Label();
                        lblAttributeName.CssClass = "attributeLabel";
                        lblAttributeName.Text     = associatedAttribute.Label;
                        pnlProductAttributes.Controls.Add(lblAttributeName);
                        pnlProductAttributes.Controls.Add(new LiteralControl("&nbsp;"));
                        Label label = new Label();
                        label.ID       = associatedAttribute.Name;
                        label.CssClass = "attribute";
                        ThisPage.UpdatePanel.ContentTemplateContainer.Controls.Add(label);
                        AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
                        trigger.ControlID = associatedAttribute.Name;
                        trigger.EventName = "OnSelectedIndexChanged";
                        ThisPage.UpdatePanel.Triggers.Add(trigger);

                        switch (associatedAttribute.AttributeTypeId)
                        {
                        case 1:// Single Select List
                            DropDownList dropDownList = new DropDownList();
                            dropDownList.ID       = associatedAttribute.Name;
                            dropDownList.CssClass = "attributeDropdownList";

                            attributeItemCollection = associatedAttribute.AttributeItemCollection;
                            attributeItemCollection.Sort("SortOrder", true);
                            dropDownList.DataSource     = attributeItemCollection;
                            dropDownList.DataTextField  = "FormattedAmount";
                            dropDownList.DataValueField = "SkuSuffix";
                            dropDownList.DataBind();

                            dropDownList.SelectedIndexChanged += new EventHandler(dropDownList_SelectedIndexChanged);
                            dropDownList.AutoPostBack          = true;
                            dropDownList.Items.Insert(0, new ListItem(LocalizationUtility.GetText("lblSelect"), string.Empty));

                            //CMC: ?? Sku's are not made up of just BaseSku + 1 attribute, it's the combination of
                            //BaseSku and ALL attributes.

                            //foreach (AttributeItem item in associatedAttribute.AttributeItemCollection) {
                            //  if (!_product.AllowNegativeInventories) {
                            //    Sku sku = ProductCache.GetSKU(_product.BaseSku + "-" + item.SkuSuffix);
                            //    if (sku.SkuId > 0 && sku.Inventory > 0)
                            //      dropDownList.Items.Add(new ListItem(item.FormattedAmount, item.SkuSuffix));
                            //  }
                            //  else
                            //    dropDownList.Items.Add(new ListItem(item.FormattedAmount, item.SkuSuffix));
                            //}

                            if (associatedAttribute.IsRequired)
                            {
                                RequiredFieldValidator rfv = new RequiredFieldValidator();
                                rfv.ControlToValidate = dropDownList.ID;
                                rfv.Display           = ValidatorDisplay.None;
                                rfv.ErrorMessage      = string.Format(LocalizationUtility.GetText("lblPleaseSelect"), associatedAttribute.Name);
                                pnlProductAttributes.Controls.Add(rfv);
                            }
                            pnlProductAttributes.Controls.Add(dropDownList);
                            break;

                        case 2: //Singleline Input
                            textBox          = new TextBox();
                            textBox.ID       = associatedAttribute.AttributeItemCollection[0].SkuSuffix;
                            textBox.TextMode = TextBoxMode.SingleLine;
                            textBox.CssClass = "textbox";
                            if (associatedAttribute.IsRequired)
                            {
                                RequiredFieldValidator rfv = new RequiredFieldValidator();
                                rfv.ControlToValidate = textBox.ID;
                                rfv.Display           = ValidatorDisplay.None;
                                rfv.ErrorMessage      = string.Format(LocalizationUtility.GetText("lblPleaseSupply"), associatedAttribute.Name);
                                pnlProductAttributes.Controls.Add(rfv);
                            }
                            pnlProductAttributes.Controls.Add(textBox);
                            break;

                        case 3: //Multiline Input
                            textBox          = new TextBox();
                            textBox.ID       = associatedAttribute.AttributeItemCollection[0].SkuSuffix;
                            textBox.TextMode = TextBoxMode.MultiLine;
                            textBox.CssClass = "multilinetextbox";
                            if (associatedAttribute.IsRequired)
                            {
                                RequiredFieldValidator rfv = new RequiredFieldValidator();
                                rfv.ControlToValidate = textBox.ID;
                                rfv.Display           = ValidatorDisplay.None;
                                rfv.ErrorMessage      = string.Format(LocalizationUtility.GetText("lblPleaseSupply"), associatedAttribute.Name);
                                pnlProductAttributes.Controls.Add(rfv);
                            }
                            pnlProductAttributes.Controls.Add(textBox);
                            break;
                        }
                        pnlProductAttributes.Controls.Add(new LiteralControl("<br/>"));
                    }
                }
                else
                {
                    if (!Page.IsPostBack)
                    {
                        GetInventory(_product.BaseSku);
                    }
                }
            }
        }
        /// <summary>
        /// ItemDataBound
        /// </summary>
        protected void rptResult_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                string        img, alt, publishedTask;
                HtmlTableRow  tr  = (HtmlTableRow)e.Item.FindControl("trList");
                HtmlInputText txt = null;
                if (e.Item.ItemIndex % 2 == 0)
                {
                    tr.Attributes.Add("class", "even");
                }
                else
                {
                    tr.Attributes.Add("class", "old");
                }

                try
                {
                    PNK_ContentStatic data = (PNK_ContentStatic)e.Item.DataItem;

                    //Role
                    Literal ltr = null;
                    ltr      = (Literal)e.Item.FindControl("ltrchk");
                    ltr.Text = string.Format(@"<INPUT class='txt' TYPE='checkbox' ID='cb{0}' NAME='cid[]' value='{1}' onclick='isChecked(this.checked);' >",
                                             e.Item.ItemIndex, data.Id);

                    //ltrNewsCategory
                    ltr = (Literal)e.Item.FindControl("ltrNewsCategory");


                    //image
                    if (data.Published == "1")
                    {
                        img           = "tick.png";
                        alt           = LocalizationUtility.GetText(ltrAdminPublish.Text);
                        publishedTask = "unpublish";
                    }
                    else
                    {
                        img           = "publish_x.png";
                        alt           = LocalizationUtility.GetText(ltrAdminPublish.Text);
                        publishedTask = "publish";
                    }

                    //Order
                    txt       = (HtmlInputText)e.Item.FindControl("txtOrder");
                    txt.Value = DBConvert.ParseString(data.Ordering);

                    //Id
                    HtmlInputButton btId = (HtmlInputButton)e.Item.FindControl("btId");
                    btId.Value = DBConvert.ParseString(data.Id);

                    //Base img
                    HtmlImage Image = (HtmlImage)e.Item.FindControl("Image");
                    Image.Src = WebUtils.GetUrlImage(ConfigurationManager.AppSettings["ContentStaticUpload"], data.Image);
                    HtmlAnchor hypImage = (HtmlAnchor)e.Item.FindControl("hypImage");

                    //set link
                    HyperLink hdflink = new HyperLink();
                    hdflink       = (HyperLink)e.Item.FindControl("hdflink");
                    hypImage.HRef = hdflink.NavigateUrl = template_path + LinkHelper.GetAdminLink("edit_contentstatic", data.Id);
                    ImageButton imgctr = (ImageButton)e.Item.FindControl("btnPublish");
                    imgctr.ImageUrl = string.Format("/Admin/images/{0}", img);
                    imgctr.Attributes.Add("alt", alt);
                    HtmlTableCell btn = (HtmlTableCell)e.Item.FindControl("tdbtn");
                    btn.Attributes.Add("onclick", string.Format(" return listItemTask('cb{0}', '{1}')", e.Item.ItemIndex, publishedTask));

                    //Name
                    ltr            = (Literal)e.Item.FindControl("ltrName");
                    hypImage.Title = ltr.Text = data.ContentStaticDesc.Title;
                }
                catch { }
            }
        }
        protected void rptLastBlog_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                PNK_Product data = e.Item.DataItem as PNK_Product;

                HtmlImage img = e.Item.FindControl("img") as HtmlImage;
                img.Src = WebUtils.GetUrlImage(ConfigurationManager.AppSettings["ProductUpload"], data.Image);

                HtmlAnchor hypImg   = e.Item.FindControl("hypImg") as HtmlAnchor;
                HtmlAnchor hypTitle = e.Item.FindControl("hypTitle") as HtmlAnchor;

                string cid   = Utils.GetParameter("cid", string.Empty);
                string link  = UtilityLocal.GetPathTreeNameUrl(data.CategoryId, LangInt, LangId);
                int    level = link.Count(i => i.Equals('/'));

                if (level == 3)
                {
                    hypTitle.HRef = hypImg.HRef = LinkHelper.GetLink(pageName, LangId, cid, data.CategoryUrlDesc, data.ProductDesc.TitleUrl);
                }
                else if (level == 2)
                {
                    hypTitle.HRef = hypImg.HRef = LinkHelper.GetLink(link, LocalizationUtility.GetText("linktmp", Ci), data.ProductDesc.TitleUrl);
                }
                else if (level == 1)
                {
                    hypTitle.HRef = hypImg.HRef = LinkHelper.GetLink(UtilityLocal.GetPathTreeNameUrl(data.CategoryId, LangInt, LangId), LocalizationUtility.GetText("linkCate", Ci), LocalizationUtility.GetText("linktmp", Ci), data.ProductDesc.TitleUrl);
                }

                Literal ltrTitle = e.Item.FindControl("ltrTitle") as Literal;
                hypTitle.Title = hypImg.Title = img.Alt = img.Attributes["title"] = ltrTitle.Text = data.ProductDesc.Title;

                Literal ltrDate = e.Item.FindControl("ltrDate") as Literal;
                ltrDate.Text = data.PostDate.ToString("dd/MM/yyyy");
            }
        }
 public string GetClientMessage()
 {
     return(GetClientMessage(LocalizationUtility.GetDefaultLanguage()));
 }
 public string GetClientMessage(Language language)
 {
     return(LocalizationUtility.GetErrorDescription("X21P", ErrorNumber, language) ??
            base.TranslateErrorNumber(language));
 }
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            try {
                productId = Utility.GetIntParameter("productId");
                view      = Utility.GetParameter("view");
                if (productId > 0)
                {
                    product             = new Product(productId);
                    lblProductEdit.Text = LocalizationUtility.GetText("lblProductEdit") + " >> " + product.Name;
                    if (!product.IsEnabled)
                    {
                        lblProductEdit.Text += " " + LocalizationUtility.GetText("lblProductNotEnabled");
                    }
                    productNavigation.Visible = true;
                }
                else
                {
                    lblProductEdit.Text = LocalizationUtility.GetText("lblProductAdd");
                }
                switch (view)
                {
                case "g":
                    generalInformation.Visible = true;
                    break;

                case "d":
                    descriptors.Visible = true;
                    break;

                case "c":
                    categories.Visible = true;
                    break;

                case "a":
                    attributes.Visible = true;
                    break;

                case "i":
                    images.Visible = true;
                    break;

                case "s":
                    skus.Visible = true;
                    break;

                case "cs":
                    crossSells.Visible = true;
                    break;

                case "r":
                    reviews.Visible = true;
                    break;

                case "n":
                    notes.Visible = true;
                    break;

                case "dl":
                    downloads.Visible = true;
                    break;

                default:
                    generalInformation.Visible = true;
                    break;
                }
            }
            catch (Exception ex) {
                Logger.Error(typeof(productedit).Name + ".Page_Load", ex);
                Master.MessageCenter.DisplayCriticalMessage(ex.Message);
            }
        }
 /// <summary>
 /// Sets the notifications properties.
 /// </summary>
 private void SetNotificationsProperties()
 {
     this.Title = LocalizationUtility.GetText("titleNotifications");
 }
Exemple #12
0
 /// <summary>
 /// Sets the general settings properties.
 /// </summary>
 private void SetGeneralSettingsProperties()
 {
     this.Page.Title             = LocalizationUtility.GetText("titleSiteSettingsGeneralLayout");
     hlImageSelector.NavigateUrl = string.Format("~/admin/imageselector.aspx?view=s&controlId={0}", txtLogo.ClientID);
 }
Exemple #13
0
 /// <summary>
 /// Handles the Load event of the Page control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
 protected void Page_Load(object sender, EventArgs e)
 {
     dcProviderConfiguration.ProviderType = ProviderType.ShippingProvider;
     this.Title = LocalizationUtility.GetText("titleShippingConfiguration");
 }
Exemple #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.Title = LocalizationUtility.GetText("titleLoading");
 }
 /// <summary>
 /// Handles the Load event of the Page control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
 protected void Page_Load(object sender, EventArgs e)
 {
     Page.Title = LocalizationUtility.GetText("titleManageCouponProviders");
 }
        /// <summary>
        /// ItemDataBound
        /// </summary>
        protected void rptResult_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                string        img, alt, publishedTask;
                HtmlTableRow  tr  = (HtmlTableRow)e.Item.FindControl("trList");
                HtmlInputText txt = null;
                if (e.Item.ItemIndex % 2 == 0)
                {
                    tr.Attributes.Add("class", "even");
                }
                else
                {
                    tr.Attributes.Add("class", "old");
                }

                try
                {
                    PNK_Product data = (PNK_Product)e.Item.DataItem;

                    //Role
                    Literal ltr = null;
                    ltr      = (Literal)e.Item.FindControl("ltrchk");
                    ltr.Text = string.Format(@"<INPUT class='txt' TYPE='checkbox' ID='cb{0}' NAME='cid[]' value='{1}' onclick='isChecked(this.checked);' >",
                                             e.Item.ItemIndex, data.Id);

                    //ltrNewsCategory
                    ltr      = (Literal)e.Item.FindControl("ltrNewsCategory");
                    ltr.Text = data.CategoryNameDesc;

                    //Sort
                    ltr = (Literal)e.Item.FindControl("ltrSort");
                    string strOrder = string.Empty;
                    string onclick  = string.Empty;

                    //orderDown
                    if (indexItem < this.pager.ItemCount - 1)
                    {
                        onclick   = string.Format("onclick=\"listItemTask('cb{0}', 'orderdown')\"", e.Item.ItemIndex);
                        strOrder += string.Format("<a title='{0}' {1} runat='server' class=\"center-block text-center\" style='cursor:pointer;color:#3C8DBC'><i class=\"fa fa-long-arrow-down\"></i></a> ", Constant.UI.admin_Down, onclick);
                    }
                    //orderUp
                    if (indexItem > 0)
                    {
                        onclick   = string.Format("onclick=\"listItemTask('cb{0}', 'orderup')\"", e.Item.ItemIndex);
                        strOrder += string.Format("<a title='{0}' {1} runat='server' class=\"center-block text-center\" style='cursor:pointer;color:#3C8DBC'><i class=\"fa fa-long-arrow-up\"></i> </a> ", Constant.UI.admin_Up, onclick);
                    }
                    indexItem++;
                    ltr.Text = strOrder;

                    //publish
                    if (data.Published == "1")
                    {
                        img           = "tick.png";
                        alt           = LocalizationUtility.GetText(ltrAdminPublish.Text);
                        publishedTask = "unpublish";
                    }
                    else
                    {
                        img           = "publish_x.png";
                        alt           = LocalizationUtility.GetText(ltrAminUnPublish.Text);
                        publishedTask = "publish";
                    }

                    //Id
                    HtmlInputButton btId = (HtmlInputButton)e.Item.FindControl("btId");
                    btId.Value = DBConvert.ParseString(data.Id);

                    //Base img
                    HtmlImage baseImage = (HtmlImage)e.Item.FindControl("baseImage");
                    baseImage.Src = WebUtils.GetUrlImage(ConfigurationManager.AppSettings["ProductUpload"], data.Image);
                    HtmlAnchor hypBaseImage = (HtmlAnchor)e.Item.FindControl("hypBaseImage");

                    //set link
                    HyperLink hdflink = new HyperLink();
                    hdflink           = (HyperLink)e.Item.FindControl("hdflink");
                    hypBaseImage.HRef = hdflink.NavigateUrl = template_path + LinkHelper.GetAdminLink("edit_product", data.CategoryId.ToString(), data.Id.ToString());
                    //HtmlTableCell td = (HtmlTableCell)e.Item.FindControl("tdName");
                    //td.Attributes.Add("onclick", string.Format("listItemTask('cb{0}', 'edit')", e.Item.ItemIndex));
                    //td = (HtmlTableCell)e.Item.FindControl("trUpdateDate");
                    //td.Attributes.Add("onclick", string.Format("listItemTask('cb{0}', 'edit')", e.Item.ItemIndex));
                    ImageButton imgctr = (ImageButton)e.Item.FindControl("btnPublish");
                    imgctr.ImageUrl = string.Format("/Admin/images/{0}", img);
                    imgctr.Attributes.Add("alt", alt);
                    HtmlTableCell btn = (HtmlTableCell)e.Item.FindControl("tdbtn");
                    btn.Attributes.Add("onclick", string.Format(" return listItemTask('cb{0}', '{1}')", e.Item.ItemIndex, publishedTask));

                    //Name
                    ltr = (Literal)e.Item.FindControl("ltrName");
                    hypBaseImage.Attributes["title"] = baseImage.Alt = baseImage.Attributes["title"] = ltr.Text = data.ProductDesc.Title;
                    //Server.HtmlDecode(getScmplit(data.Lvl) + "&bull; | " + data.Lvl + " | " + data.ProductCategoryDesc.Name);
                }
                catch { }
            }
        }
 public string TranslateExtendedErrorNumber()
 {
     return(TranslateExtendedErrorNumber(LocalizationUtility.GetDefaultLanguage()));
 }
Exemple #18
0
 /// <summary>
 /// Sets the general settings properties.
 /// </summary>
 private void SetImageSettingsProperties()
 {
     this.Page.Title = LocalizationUtility.GetText("titleSiteSettingsImages");
 }
Exemple #19
0
 /// <summary>
 /// Sets the database properties.
 /// </summary>
 private void SetDatabaseProperties()
 {
     chkWindowsAuth.Text = LocalizationUtility.GetText("lblWindowsAuth");
 }
 /// <summary>
 /// Sets the checkout properties.
 /// </summary>
 private void SetCheckoutProperties()
 {
     btnBillingAddress.Text = btnShippingAddress.Text = btnShippingMethod.Text = btnCoupon.Text = LocalizationUtility.GetText("lblContinue");
 }
 /// <summary>
 /// Handles the Load event of the Page control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
 protected void Page_Load(object sender, EventArgs e)
 {
     dcProviderConfiguration.ProviderType = ProviderType.PaymentProvider;
     Page.Title = LocalizationUtility.GetText("titlePaymentConfiguration");
 }
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (order.OrderItemCollection == null || order.OrderItemCollection.Count <= 0)
            {
                Response.Redirect("~/cart.aspx", true);
            }
            Page.Title = string.Format(WebUtility.MainTitleTemplate, Master.SiteSettings.SiteName, LocalizationUtility.GetText("titleCheckout"));
            SetCheckoutProperties();
            if (!shippingService.ShippingServiceSettings.UseShipping)
            {
                chkUseForShipping.Visible = false;
            }

            orderSummary.Order = order;
            SetProcessOrderEnablement();
        }
 /// <summary>
 /// Handles the Load event of the Page control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
 protected void Page_Load(object sender, EventArgs e)
 {
     dcProviderManagement.ProviderType = ProviderType.PaymentProvider;
     this.Title = LocalizationUtility.GetText("titlePaymentProviderManagement");
 }
Exemple #24
0
        /// <summary>
        /// ItemDataBound
        /// </summary>
        protected void rptResult_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                string        img, alt, publishedTask;
                HtmlTableRow  tr  = (HtmlTableRow)e.Item.FindControl("trList");
                HtmlInputText txt = null;
                if (e.Item.ItemIndex % 2 == 0)
                {
                    tr.Attributes.Add("class", "even");
                }
                else
                {
                    tr.Attributes.Add("class", "old");
                }

                try
                {
                    PNK_Banner data = (PNK_Banner)e.Item.DataItem;

                    //Role
                    Literal ltr = null;
                    ltr      = (Literal)e.Item.FindControl("ltrchk");
                    ltr.Text = string.Format(@"<INPUT class='txt' TYPE='checkbox' ID='cb{0}' NAME='cid[]' value='{1}' onclick='isChecked(this.checked);' >",
                                             e.Item.ItemIndex, data.Id);
                    //Name
                    ltr      = (Literal)e.Item.FindControl("ltrName");
                    ltr.Text = data.Name; //Server.HtmlDecode(getScmplit(data.Lvl) + "&bull; | " + data.Lvl + " | " + data.ProductCategoryDesc.Name);

                    //Sort
                    ltr = (Literal)e.Item.FindControl("ltrSort");
                    string strOrder = string.Empty;
                    string onclick  = string.Empty;
                    //orderDown
                    if (indexItem < this.pager.ItemCount - 1)
                    {
                        onclick   = string.Format("onclick=\"listItemTask('cb{0}', 'orderdown')\"", e.Item.ItemIndex);
                        strOrder += string.Format("<a title='{0}' {1} runat='server' style='cursor:pointer'><i class=\"glyphicon glyphicon-arrow-down\"></i></a> ", Constant.UI.admin_Down, onclick);
                    }
                    //orderUp
                    if (indexItem > 0)
                    {
                        onclick   = string.Format("onclick=\"listItemTask('cb{0}', 'orderup')\"", e.Item.ItemIndex);
                        strOrder += string.Format("<a title='{0}' {1} runat='server' style='cursor:pointer'><i class=\"glyphicon glyphicon-arrow-up\"></i> </a> ", Constant.UI.admin_Up, onclick);
                    }
                    indexItem++;
                    ltr.Text = strOrder;

                    //Position
                    ltr      = (Literal)e.Item.FindControl("ltrPosition");
                    ltr.Text = GetPosition(data.Position);

                    //image
                    if (data.Published == "1")
                    {
                        img           = "tick.png";
                        alt           = LocalizationUtility.GetText(ltrAdminPublish.Text); // Constant.UI.admin_publish;
                        publishedTask = "unpublish";
                    }
                    else
                    {
                        img           = "publish_x.png";
                        alt           = ""; //LocalizationUtility.GetText(ltrAdminUnPublish.Text);
                        publishedTask = "publish";
                    }

                    DGCBannerControl banner = e.Item.FindControl("ucBanner") as DGCBannerControl;
                    banner.FilePath = WebUtils.GetUrlImage("SliderUpload", data.Image, "SrcNoImage");

                    //Id
                    HtmlInputButton btId = (HtmlInputButton)e.Item.FindControl("btId");
                    btId.Value = DBConvert.ParseString(data.Id);

                    //set link
                    HtmlAnchor hypImg  = e.Item.FindControl("hypImg") as HtmlAnchor;
                    HyperLink  hdflink = new HyperLink();
                    hdflink             = (HyperLink)e.Item.FindControl("hdflink");
                    hdflink.NavigateUrl = hypImg.HRef = template_path + LinkHelper.GetAdminLink("edit_slider", data.Id);

                    //HtmlTableCell td = (HtmlTableCell)e.Item.FindControl("tdName");
                    //td.Attributes.Add("onclick", string.Format("listItemTask('cb{0}', 'edit')", e.Item.ItemIndex));
                    //td = (HtmlTableCell)e.Item.FindControl("trUpdateDate");
                    //td.Attributes.Add("onclick", string.Format("listItemTask('cb{0}', 'edit')", e.Item.ItemIndex));
                    ImageButton imgctr = (ImageButton)e.Item.FindControl("btnPublish");
                    imgctr.ImageUrl = string.Format("/Admin/images/{0}", img);
                    imgctr.Attributes.Add("alt", alt);
                    HtmlTableCell btn = (HtmlTableCell)e.Item.FindControl("tdbtn");
                    btn.Attributes.Add("onclick", string.Format(" return listItemTask('cb{0}', '{1}')", e.Item.ItemIndex, publishedTask));
                }
                catch { }
            }
        }
Exemple #25
0
 /// <summary>
 /// Sets the attributes properties.
 /// </summary>
 private void SetAttributesProperties()
 {
     this.Page.Title = LocalizationUtility.GetText("titleProductEditAttributes");
 }
Exemple #26
0
 /// <summary>
 /// Sets the manufacturers properties.
 /// </summary>
 private void SetManufacturersProperties()
 {
     this.Title = LocalizationUtility.GetText("titleProductManufacturers");
 }
 /// <summary>
 /// Sets the region code configuration properties.
 /// </summary>
 private void SetRegionCodeConfigurationProperties()
 {
     ltDescription.Text       = HttpUtility.HtmlDecode(base.Provider.Description);
     lblDescriptionTitle.Text = LocalizationUtility.GetText("lblRegionCodeDecriptionTitle");
 }
 /// <summary>
 /// Handles the Load event of the Page control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 protected void Page_Load(object sender, EventArgs e)
 {
     Page.Title = LocalizationUtility.GetText("titlePaymentSelection");
 }
 /// <summary>
 /// Handles the Load event of the Page control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
 protected void Page_Load(object sender, EventArgs e)
 {
     dcProviderSettings.ProviderType = ProviderType.TaxProvider;
     this.Title = LocalizationUtility.GetText("titleTaxSettings");
 }
 /// <summary>
 /// Sets the pay pal pro configuration properties.
 /// </summary>
 private void SetPayPalProConfigurationProperties()
 {
     ltDescription.Text       = HttpUtility.HtmlDecode(base.Provider.Description);
     pnlSettings.GroupingText = LocalizationUtility.GetText("pnlPayPalProConfiguration");
     lblDescriptionTitle.Text = LocalizationUtility.GetText("lblPayPalProDescriptionTitle");
 }