コード例 #1
0
    private void AddLanguageControl(RepeaterItemEventArgs e)
    {
        Control divControl = e.Item.FindControl("divBuyDescriptionMLI");

        if (divControl != null)
        {
            if (!isMultiLanguageEnabled)
            {
                logix_UserControls_MultiLanguagePopup ucMLI = (logix_UserControls_MultiLanguagePopup)LoadControl("~/logix/UserControls/MultiLanguagePopup.ascx");
                ucMLI.ID = "ucMLI";
                ucMLI.IsMultiLanguageEnabled = isMultiLanguageEnabled;
                divControl.Controls.Add(ucMLI);
            }
            else
            {
                logix_UserControls_MultiLanguagePopup ucMLI = (logix_UserControls_MultiLanguagePopup)LoadControl("~/logix/UserControls/MultiLanguagePopup.ascx");
                ucMLI.ID = "ucMLI";
                ucMLI.MLIdentifierValue      = Convert.ToInt64(DataBinder.Eval(e.Item.DataItem, "id"));
                ucMLI.MLTableName            = "DeliverableCouponTierTranslation";
                ucMLI.MLColumnName           = "DeliverableMessage";
                ucMLI.MLITranslationColumn   = "DeliverableCouponTierID";
                ucMLI.IsMultiLanguageEnabled = isMultiLanguageEnabled;
                //ucMLI.DisablePopup = disablePopup;
                if (DataBinder.Eval(e.Item.DataItem, "Description") != null)
                {
                    ucMLI.MLDefaultLanguageStandardValue = DataBinder.Eval(e.Item.DataItem, "Description").ToString();
                }
                divControl.Controls.Add(ucMLI);
            }
        }
    }
コード例 #2
0
 private void SetMLIPopupProperty()
 {
     //Set the popup enable\disable
     //mliOverriddenInTemplate is true when the buydescription control for multi\single language is overridden
     if (isMultiLanguageEnabled
         &&
         (Offer.FromTemplate && (couponReward.DisallowEdit && !mliOverriddenInTemplate) || (!couponReward.DisallowEdit && mliOverriddenInTemplate))
         ||
         (!Offer.FromTemplate && !Offer.IsTemplate && DisabledAttribute))  //DisabledAttribute false means edit permissions are there for offer
     {
         foreach (RepeaterItem item in repTier_Desc.Items)
         {
             if (item.FindControl("ucMLI") != null)
             {
                 logix_UserControls_MultiLanguagePopup popup = (logix_UserControls_MultiLanguagePopup)item.FindControl("ucMLI");
                 popup.DisablePopup = true;
             }
         }
     }
 }