本文整理汇总了C#中CloudSalesDAL.ProductsDAL.UpdateProductDetails方法的典型用法代码示例。如果您正苦于以下问题:C# ProductsDAL.UpdateProductDetails方法的具体用法?C# ProductsDAL.UpdateProductDetails怎么用?C# ProductsDAL.UpdateProductDetails使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CloudSalesDAL.ProductsDAL
的用法示例。
在下文中一共展示了ProductsDAL.UpdateProductDetails方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateProductDetails
public bool UpdateProductDetails(string detailid, string productid, string productCode, string shapeCode, decimal bigPrice, string attrlist, string valuelist, string attrvaluelist, decimal price, decimal weight, string description, string productImg, string operateid, string clientid)
{
lock (SingleLock)
{
if (!string.IsNullOrEmpty(productImg) && productImg.IndexOf(TempPath) >= 0)
{
if (productImg.IndexOf("?") > 0)
{
productImg = productImg.Substring(0, productImg.IndexOf("?"));
}
FileInfo file = new FileInfo(HttpContext.Current.Server.MapPath(productImg));
productImg = FILEPATH + file.Name;
if (file.Exists)
{
file.MoveTo(HttpContext.Current.Server.MapPath(productImg));
}
}
var dal = new ProductsDAL();
return dal.UpdateProductDetails(detailid, productid, productCode, shapeCode, bigPrice, attrlist, valuelist, attrvaluelist, price, weight, description, productImg);
}
}
示例2: UpdateProductDetails
/// <summary>
/// 编辑子产品
/// </summary>
/// <param name="detailid">子产品ID</param>
/// <param name="productid">产品ID</param>
/// <param name="productCode">产品Code</param>
/// <param name="shapeCode">条形码</param>
/// <param name="attrlist">规格</param>
/// <param name="valuelist">值</param>
/// <param name="attrvaluelist"></param>
/// <param name="price">价格</param>
/// <param name="weight">重量</param>
/// <param name="description">描述</param>
/// <param name="operateid"></param>
/// <param name="clientid"></param>
/// <returns></returns>
public bool UpdateProductDetails(string detailid, string productid, string productCode, string shapeCode, decimal bigPrice, string attrlist, string valuelist, string attrvaluelist, decimal price, decimal weight, string description, string productImg, string operateid, string clientid)
{
lock (SingleLock)
{
if (!string.IsNullOrEmpty(productImg))
{
if (productImg.IndexOf("tempfile") >= 0)
{
if (productImg.IndexOf("?") > 0)
{
productImg = productImg.Substring(0, productImg.IndexOf("?"));
}
FileInfo file = new FileInfo(HttpContext.Current.Server.MapPath(productImg));
productImg = FILEPATH + file.Name;
if (file.Exists)
{
file.MoveTo(HttpContext.Current.Server.MapPath(productImg));
}
}
}
else
{
productImg = FILEPATH + DateTime.Now.ToString("yyyyMMddHHmmssms") + new Random().Next(1000, 9999).ToString() + ".png";
}
var dal = new ProductsDAL();
return dal.UpdateProductDetails(detailid, productid, productCode, shapeCode, bigPrice, attrlist, valuelist, attrvaluelist, price, weight, description, productImg);
}
}