当前位置: 首页>>代码示例>>C#>>正文


C# Products.TagActive方法代码示例

本文整理汇总了C#中AceSoft.RetailPlus.Data.Products.TagActive方法的典型用法代码示例。如果您正苦于以下问题:C# Products.TagActive方法的具体用法?C# Products.TagActive怎么用?C# Products.TagActive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AceSoft.RetailPlus.Data.Products的用法示例。


在下文中一共展示了Products.TagActive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: lstItem_ItemCommand

		protected void lstItem_ItemCommand(object source, System.Web.UI.WebControls.DataListCommandEventArgs e)
		{
            HtmlInputCheckBox chkList = (HtmlInputCheckBox)e.Item.FindControl("chkList");
            HtmlInputCheckBox chkMatrixID = (HtmlInputCheckBox)e.Item.FindControl("chkMatrixID");
            string stParam = "?task=" + Common.Encrypt("list", Session.SessionID) +
                                "&prodid=" + Common.Encrypt(chkList.Value, Session.SessionID);
            
			switch(e.CommandName)
			{
                case "imgProductTag":
                    {
                        ImageButton imgProductTag = (ImageButton)e.Item.FindControl("imgProductTag");
                        Products clsProduct = new Products();

                        if (imgProductTag.ToolTip == "Tag this product as INACTIVE.")
                        {
                            clsProduct.TagInactive(long.Parse(chkList.Value));
                            imgProductTag.ImageUrl = Constants.ROOT_DIRECTORY + "/_layouts/images/prodtaginact.gif";
                            imgProductTag.ToolTip = "Tag this product as ACTIVE.";
                        }
                        else
                        {
                            clsProduct.TagActive(long.Parse(chkList.Value));
                            imgProductTag.ImageUrl = Constants.ROOT_DIRECTORY + "/_layouts/images/prodtagact.gif";
                            imgProductTag.ToolTip = "Tag this product as INACTIVE.";
                        }
                        clsProduct.CommitAndDispose();
                    }
                    break;
                case "imgSaveActualQuantity":
                    {
                        TextBox txtActualQuantity = (TextBox)e.Item.FindControl("txtActualQuantity");
                        try { decimal.Parse(txtActualQuantity.Text); }
                        catch 
                        {
                            string stScript = "<Script>";
                            stScript += "window.alert('Please enter a VALID actual quantity.')";
                            stScript += "</Script>";
                            Response.Write(stScript);
                            break;
                        }
                        ProductInventories clsProductInventories = new ProductInventories();
                        clsProductInventories.UpdateActualQuantity(int.Parse(cboBranch.SelectedItem.Value), long.Parse(chkList.Value), long.Parse(chkMatrixID.Value), decimal.Parse(txtActualQuantity.Text));
                        clsProductInventories.CommitAndDispose();
                    }
                    break;

			}
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:49,代码来源:_closeinventoryproduct.ascx.cs

示例2: lstItem_ItemCommand

        protected void lstItem_ItemCommand(object source, System.Web.UI.WebControls.DataListCommandEventArgs e)
		{
			Common Common = new Common();
			HtmlInputCheckBox chkList = (HtmlInputCheckBox) e.Item.FindControl("chkList");
            HyperLink lnkProductCode = (HyperLink)e.Item.FindControl("lnkProductCode");
			
            string stParam = "?task=" + Common.Encrypt("list", Session.SessionID) + "&prodid=" + Common.Encrypt(chkList.Value,Session.SessionID);

			switch(e.CommandName)
			{
                case "imgProductTag":
                    {
                        ImageButton imgProductTag = (ImageButton) e.Item.FindControl("imgProductTag");
                        Products clsProduct = new Products();

                        if (imgProductTag.ToolTip == "Tag this product as INACTIVE.")
                            clsProduct.TagInactive(long.Parse(chkList.Value));
                        else
                            clsProduct.TagActive(long.Parse(chkList.Value));

                        clsProduct.CommitAndDispose();
                        LoadList();
                    }
                    break;

                case "cmdSaveVariationClick":
                    {
                        DropDownList cboVariationType = (DropDownList)e.Item.FindControl("cboVariationType");
                        SaveVariation(long.Parse(chkList.Value), int.Parse(cboVariationType.SelectedItem.Value), cboVariationType.SelectedItem.Text);
                        ProductVariations clsVariation = new ProductVariations();
                        cboVariationType.DataTextField = "VariationType";
                        cboVariationType.DataValueField = "VariationID";
                        cboVariationType.DataSource = clsVariation.AvailableVariationsDataTable(long.Parse(chkList.Value), "VariationType", SortOption.Ascending).DefaultView;
                        cboVariationType.DataBind();
                        cboVariationType.SelectedIndex = cboVariationType.Items.Count - 1;
                        clsVariation.CommitAndDispose();
                    }
                    break;
                case "imgSaveVariationClick":
                    {
                        DropDownList cboVariationType = (DropDownList)e.Item.FindControl("cboVariationType");
                        SaveVariation(long.Parse(chkList.Value), int.Parse(cboVariationType.SelectedItem.Value), cboVariationType.SelectedItem.Text);
                        ProductVariations clsVariation = new ProductVariations();
                        cboVariationType.DataTextField = "VariationType";
                        cboVariationType.DataValueField = "VariationID";
                        cboVariationType.DataSource = clsVariation.AvailableVariationsDataTable(long.Parse(chkList.Value), "VariationType", SortOption.Ascending).DefaultView;
                        cboVariationType.DataBind();
                        cboVariationType.SelectedIndex = cboVariationType.Items.Count - 1;
                        clsVariation.CommitAndDispose();	
                    }
                    break;
                case "imgVariationsClick":
                    stParam = "?task=" + Common.Encrypt("list", Session.SessionID) + "&prodid=" + Common.Encrypt(chkList.Value, Session.SessionID);
                    Response.Redirect(Constants.ROOT_DIRECTORY + "/MasterFiles/_Product/_Variations/Default.aspx" + stParam);
                    break;
                case "imgVariationsMatrixClick":
                    stParam = "?task=" + Common.Encrypt("list", Session.SessionID) + "&prodid=" + Common.Encrypt(chkList.Value, Session.SessionID);
                    Response.Redirect(Constants.ROOT_DIRECTORY + "/MasterFiles/_Product/_VariationsMatrix/Default.aspx" + stParam);
                    break;
                case "imgUnitsMatrixClick":
                    stParam = "?task=" + Common.Encrypt("list", Session.SessionID) + "&prodid=" + Common.Encrypt(chkList.Value, Session.SessionID);
                    Response.Redirect(Constants.ROOT_DIRECTORY + "/MasterFiles/_Product/_UnitsMatrix/Default.aspx" + stParam);
                    break;
                case "imgVariationsAddClick":
                    stParam = "?task=" + Common.Encrypt("add", Session.SessionID) +
                        "&prodid=" + Common.Encrypt(chkList.Value, Session.SessionID);
                    Response.Redirect(Constants.ROOT_DIRECTORY + "/MasterFiles/_Product/_Variations/Default.aspx" + stParam);
                    break;
                case "imgVariationsMatrixAddClick":
                    stParam = "?task=" + Common.Encrypt("add", Session.SessionID) +
                        "&prodid=" + Common.Encrypt(chkList.Value, Session.SessionID);
                    Response.Redirect(Constants.ROOT_DIRECTORY + "/MasterFiles/_Product/_VariationsMatrix/Default.aspx" + stParam);
                    break;
                case "imgUnitsMatrixAddClick":
                    stParam = "?task=" + Common.Encrypt("add", Session.SessionID) +
                        "&prodid=" + Common.Encrypt(chkList.Value, Session.SessionID);
                    Response.Redirect(Constants.ROOT_DIRECTORY + "/MasterFiles/_Product/_UnitsMatrix/Default.aspx" + stParam);
                    break;
                case "imgPackageMatrixAddClick":
                    stParam = "?task=" + Common.Encrypt("add", Session.SessionID) +
                        "&prodid=" + Common.Encrypt(chkList.Value, Session.SessionID);
                    Response.Redirect(Constants.ROOT_DIRECTORY + "/MasterFiles/_Product/_Package/Default.aspx" + stParam);
                    break;
                case "imgInventoryAdjustmentClick":
                    stParam = "?task=" + Common.Encrypt("invadjustment", Session.SessionID) +
                        "&productcode=" + Common.Encrypt(Server.UrlEncode(lnkProductCode.Text), Session.SessionID);
                    Response.Redirect(Constants.ROOT_DIRECTORY + "/Inventory/Default.aspx" + stParam);
                    break;
                case "imgProductHistoryClick":
                    stParam = "?task=" + Common.Encrypt("producthistory", Session.SessionID) +
                                "&productcode=" + Common.Encrypt(Server.UrlEncode(lnkProductCode.Text), Session.SessionID);
                    Response.Redirect(Constants.ROOT_DIRECTORY + "/Reports/Default.aspx" + stParam);
                    break;
                case "imgProductPriceHistoryClick":
                    stParam = "?task=" + Common.Encrypt("pricehistory", Session.SessionID) +
                                "&productcode=" + Common.Encrypt(Server.UrlEncode(lnkProductCode.Text), Session.SessionID);
                    Response.Redirect(Constants.ROOT_DIRECTORY + "/Reports/Default.aspx" + stParam);
                    break;
                case "imgChangePriceClick":
                    stParam = "?task=" + Common.Encrypt("changeprice", Session.SessionID) +
//.........这里部分代码省略.........
开发者ID:marioricci,项目名称:erp-luma,代码行数:101,代码来源:_listdetailed.ascx.cs


注:本文中的AceSoft.RetailPlus.Data.Products.TagActive方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。