本文整理汇总了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;
}
}
示例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) +
//.........这里部分代码省略.........