⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 productbatchmodify.aspx.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
📖 第 1 页 / 共 3 页
字号:
namespace PowerEasy.WebSite.Admin.Shop
{
    using PowerEasy.Common;
    using PowerEasy.CommonModel;
    using PowerEasy.Contents;
    using PowerEasy.Controls;
    using PowerEasy.Controls.Editor;
    using PowerEasy.Enumerations;
    using PowerEasy.Model.CommonModel;
    using PowerEasy.Model.Shop;
    using PowerEasy.ModelControls;
    using PowerEasy.Shop;
    using PowerEasy.Web.UI;
    using PowerEasy.WebSite.Controls;
    using PowerEasy.WebSite.Controls.FieldControl;
    using PowerEasy.WebSite.Controls.Shop;
    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.Data;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class ProductBatchModify : AdminPage
    {
        protected Button BtnChoose;
        protected Button BtnDelChoose;
        protected Button BtnSearch;
        protected CheckBox ChkEnableBuyWhenOutofstock;
        protected CheckBox ChkEnableSale;
        protected CheckBox ChkEnableWholesale;
        protected CheckBox ChkIsBest;
        protected CheckBox ChkIsHot;
        protected CheckBox ChkIsNew;
        protected PowerEasy.WebSite.Controls.Shop.DependentProduct DependentProduct;
        protected DataList DlstProductList;
        protected DropDownList DropProductModel;
        protected DropDownList DropSearchType;
        protected DropDownList DropServiceTermUnit;
        protected DropDownList DropStars;
        protected TemplateSelectControl FscTemplate;
        protected ListBox LstField;
        protected ListBox LstSourceProduct;
        protected ListBox LstTargetProduct;
        protected Literal LtrMsg;
        private string[] m_SystemFields = new string[] { 
            "BarCode|条形码", "Unit|商品单位", "Keyword|关键字", "StocksProject|前台库存计算方式", "AlarmNum|库存报警下限", "IncludeTax|税率设置", "TaxRate|商品税率", "Weight|商品重量", "ProductType|商品类型", "IsNew|是否新品", "IsHot|是否热销", "IsBest|是否精品", "ServiceTerm|服务期限", "DownloadUrl|下载地址", "DownloadUrlRemark|下载说明", "EnableSale|销售操作", 
            "ProductIntro|商品简介", "ProductExplain|详细介绍", "ProductPic|商品图片设置", "Producer|生产商", "Trademark|品牌/商标", "EnableBuyWhenOutofstock|缺货时允许购买", "LimitNum|限购数量", "Stars|商品推荐等级", "Price_Market|市场参考价", "Price|当前零售价", "Wholesale|批发设置", "SingleSell|单独销售", "SalePromotion|促销方案", ("PresentPoint|赠送" + SiteConfig.UserConfig.PointName), "PresentExp|购物积分", "PresentMoney|赠送现金券", 
            "EliteLevel|推荐级别", "Priority|优先级", "Hits|点击数", "DayHits|日点击数", "WeekHits|周点击数", "MonthHits|月点击数", "UpdateTime|更新时间", "Template|内容页模板"
         };
        protected DatePicker PickDate;
        protected ProductManageNavigation Pmn;
        protected PEeditor ProductExplain;
        protected ProductUnitPicker ProductUnitPick;
        protected RadioButton RadDisabledSingleSell;
        protected RadioButton RadEnableSingleSell;
        protected RadioButtonList RadlEditType;
        protected RadioButtonList RadlProductType;
        protected RadioButtonList RadlStocksProject;
        protected Repeater RepModel;
        protected PowerEasy.Controls.RequiredFieldValidator ReqPickDate;
        protected PowerEasy.Controls.RequiredFieldValidator RequiredFieldValidator1;
        protected PowerEasy.WebSite.Controls.Shop.SalePromotion SalePromotion;
        protected ScriptManager ScriptManager1;
        protected ShowPointName ShowPointName1;
        protected ShowPointName ShowPointName2;
        protected ExtendedSiteMapPath SmpNavigator;
        protected TaxRateSetting TaxRateTypeSetting;
        protected HtmlTable tbWholesale;
        protected HtmlTableRow trAlarmNum;
        protected HtmlTableRow trBarCode;
        protected HtmlTableRow trDayHits;
        protected HtmlTableRow trDependentProducts;
        protected HtmlTableRow trDownloadUrl;
        protected HtmlTableRow trDownloadUrlRemark;
        protected HtmlTableRow trEliteLevel;
        protected HtmlTableRow trEnableBuyWhenOutofstock;
        protected HtmlTableRow trEnableSale;
        protected HtmlTableRow trHits;
        protected HtmlTableRow trIncludeTax;
        protected HtmlTableRow trIsBest;
        protected HtmlTableRow trIsHot;
        protected HtmlTableRow trIsNew;
        protected KeywordType trKeyword;
        protected HtmlTableRow trLimitNum;
        protected HtmlTableRow trMonthHits;
        protected HtmlTableRow trPresentExp;
        protected HtmlTableRow trPresentMoney;
        protected HtmlTableRow trPresentPoint;
        protected HtmlTableRow trPrice;
        protected HtmlTableRow trPrice_Market;
        protected HtmlTableRow trPriority;
        protected PowerEasy.WebSite.Controls.FieldControl.Producer trProducer;
        protected HtmlTableRow trProductExplain;
        protected HtmlTableRow trProductIntro;
        protected ProductPic trProductPic;
        protected HtmlTableRow trProductType;
        protected HtmlTableRow trSalePromotion;
        protected HtmlTableRow trServiceTerm;
        protected HtmlTableRow trSingleSell;
        protected HtmlTableRow trStars;
        protected HtmlTableRow trStocksProject;
        protected HtmlTableRow trTaxRate;
        protected HtmlTableRow trTemplate;
        protected PowerEasy.WebSite.Controls.FieldControl.Trademark trTrademark;
        protected HtmlTableRow trUnit;
        protected HtmlTableRow trUpdateTime;
        protected HtmlTableRow trWeekHits;
        protected HtmlTableRow trWeight;
        protected HtmlTableRow trWholesale;
        protected TextBox TxtAlarmNum;
        protected TextBox TxtBarCode;
        protected TextBox TxtDayHits;
        protected TextBox TxtDownloadUrl;
        protected TextBox TxtDownloadUrlRemark;
        protected TextBox TxtEliteLevel;
        protected TextBox TxtHits;
        protected TextBox TxtKeyWord;
        protected TextBox TxtKeyWord2;
        protected TextBox TxtLimitNum;
        protected TextBox TxtMonthHits;
        protected TextBox TxtNumber_Wholesale1;
        protected TextBox TxtNumber_Wholesale2;
        protected TextBox TxtNumber_Wholesale3;
        protected TextBox TxtPresentExp;
        protected TextBox TxtPresentMoney;
        protected TextBox TxtPresentPoint;
        protected TextBox TxtPrice;
        protected TextBox TxtPrice_Market;
        protected TextBox TxtPrice_Wholesale1;
        protected TextBox TxtPrice_Wholesale2;
        protected TextBox TxtPrice_Wholesale3;
        protected TextBox TxtPriority;
        protected TextBox TxtProductIntro;
        protected TextBox TxtServiceTerm;
        protected TextBox TxtTaxRate;
        protected TextBox TxtWeekHits;
        protected TextBox TxtWeight;
        protected System.Web.UI.UpdatePanel UpdatePanel1;
        protected System.Web.UI.UpdatePanel UpdatePanel2;
        protected System.Web.UI.UpdatePanel UpnlChooseProduct;
        protected System.Web.UI.UpdatePanel UpnlLimitNum;
        protected System.Web.UI.UpdatePanel UpnlSearchType;
        protected System.Web.UI.UpdatePanel UpnlWholesale;
        protected PowerEasy.Controls.RequiredFieldValidator ValrDayHits;
        protected PowerEasy.Controls.RequiredFieldValidator ValrEliteLevel;
        protected PowerEasy.Controls.RequiredFieldValidator ValrField;
        protected PowerEasy.Controls.RequiredFieldValidator ValrHits;
        protected PowerEasy.Controls.RequiredFieldValidator ValrMonthHits;
        protected PowerEasy.Controls.RequiredFieldValidator ValrPriority;
        protected PowerEasy.Controls.RequiredFieldValidator ValrWeekHits;
        protected NumberValidator VnumDayHits;
        protected NumberValidator VnumEliteLevel;
        protected NumberValidator VnumHits;
        protected NumberValidator VnumMonthHits;
        protected NumberValidator VnumPriority;
        protected NumberValidator VnumWeekHits;
        protected PositiveNumValidator VpnumPrice;
        protected PositiveNumValidator VpnumPrice_Market;
        protected UrlValidator VurlDownloadUrl;
        protected WizardStep WizardStep1;
        protected WizardStep WizardStep2;
        protected Wizard WzdProductBachModify;

        private void AddNewRows(DataTable dataTable, string fieldName, string fieldValue, FieldType fieldType, int fieldLevel)
        {
            DataRow row = dataTable.NewRow();
            row["FieldName"] = fieldName;
            row["FieldValue"] = fieldValue;
            row["FieldType"] = fieldType;
            row["FieldLevel"] = fieldLevel;
            dataTable.Rows.Add(row);
        }

        protected void BtnChoose_Click(object sender, EventArgs e)
        {
            foreach (ListItem item in this.LstSourceProduct.Items)
            {
                if (item.Selected && !this.LstTargetProduct.Items.Contains(item))
                {
                    this.LstTargetProduct.Items.Add(item);
                }
            }
            this.LstTargetProduct.ClearSelection();
        }

        protected void BtnDelChoose_Click(object sender, EventArgs e)
        {
            IDictionary<int, string> dictionary = new Dictionary<int, string>();
            foreach (ListItem item in this.LstTargetProduct.Items)
            {
                if (!item.Selected)
                {
                    dictionary.Add(DataConverter.CLng(item.Value), item.Text);
                }
            }
            this.LstTargetProduct.DataSource = dictionary;
            this.LstTargetProduct.DataBind();
        }

        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            this.LstSourceProduct.DataSource = Product.GetProductList(DataConverter.CLng(this.DropProductModel.SelectedValue), DataConverter.CLng(this.DropSearchType.SelectedValue), this.TxtKeyWord.Text.Trim(), this.TxtKeyWord2.Text);
            this.LstSourceProduct.DataBind();
        }

        protected void ChkEnableWholesale_CheckedChanged(object sender, EventArgs e)
        {
            if (this.ChkEnableWholesale.Checked)
            {
                this.tbWholesale.Visible = true;
            }
            else
            {
                this.tbWholesale.Visible = false;
            }
        }

        protected void DropProductModel_SelectedIndexChanged(object sender, EventArgs e)
        {
            IDictionary<int, string> dictionary = Product.GetProductList(DataConverter.CLng(this.DropProductModel.SelectedValue), DataConverter.CLng(this.DropSearchType.SelectedValue), this.TxtKeyWord.Text.Trim(), this.TxtKeyWord2.Text);
            IDictionary<int, string> dictionary2 = new Dictionary<int, string>();
            foreach (KeyValuePair<int, string> pair in dictionary)
            {
                dictionary2.Add(pair.Key, DataSecurity.HtmlDecode(pair.Value));
            }
            this.LstSourceProduct.DataSource = dictionary2;
            this.LstSourceProduct.DataBind();
            this.LstField.DataSource = this.GetAddField();
            this.LstField.DataBind();
            this.LstTargetProduct.Items.Clear();
        }

        protected void DropSearchType_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (this.DropSearchType.SelectedValue)
            {
                case "1":
                case "4":

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -