本文整理汇总了C#中AceSoft.RetailPlus.Data.Products.Delete方法的典型用法代码示例。如果您正苦于以下问题:C# Products.Delete方法的具体用法?C# Products.Delete怎么用?C# Products.Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AceSoft.RetailPlus.Data.Products
的用法示例。
在下文中一共展示了Products.Delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Delete
private bool Delete()
{
bool boRetValue = false;
string stIDs = "";
foreach(DataListItem item in lstItem.Items)
{
HtmlInputCheckBox chkList = (HtmlInputCheckBox) item.FindControl("chkList");
if (chkList!=null)
{
if (chkList.Checked == true)
{
stIDs += chkList.Value + ",";
boRetValue = true;
}
}
}
if (boRetValue)
{
Products clsProduct = new Products();
clsProduct.Delete( stIDs.Substring(0,stIDs.Length-1), Convert.ToString(Session["Name"]));
clsProduct.CommitAndDispose();
Security.AuditTrailDetails clsAuditDetails = new Security.AuditTrailDetails();
clsAuditDetails.ActivityDate = DateTime.Now;
clsAuditDetails.User = Convert.ToString(Session["Name"]);
clsAuditDetails.IPAddress = Request.UserHostAddress;
clsAuditDetails.Activity = "Products";
clsAuditDetails.Remarks = "Delete Product(s). IDs:'" + stIDs + "'";
Security.AuditTrail clsAuditTrail = new Security.AuditTrail();
clsAuditTrail.Insert(clsAuditDetails);
clsAuditTrail.CommitAndDispose();
}
return boRetValue;
}
示例2: Delete
private bool Delete()
{
bool boRetValue = false;
string stIDs = "";
foreach(DataListItem item in lstItem.Items)
{
HtmlInputCheckBox chkList = (HtmlInputCheckBox) item.FindControl("chkList");
if (chkList!=null)
{
if (chkList.Checked == true)
{
stIDs += chkList.Value + ",";
boRetValue = true;
}
}
}
if (boRetValue)
{
Products clsProduct = new Products();
clsProduct.Delete(stIDs.Substring(0, stIDs.Length - 1), Convert.ToString(Session["Name"]));
clsProduct.CommitAndDispose();
}
return boRetValue;
}