本文整理汇总了C#中IProduct.SetExtendedProperty方法的典型用法代码示例。如果您正苦于以下问题:C# IProduct.SetExtendedProperty方法的具体用法?C# IProduct.SetExtendedProperty怎么用?C# IProduct.SetExtendedProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IProduct
的用法示例。
在下文中一共展示了IProduct.SetExtendedProperty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: genOneMEI
private void genOneMEI(Session session, IProduct curProd,
string name, string imeiInfo,
string preFixIMEICode, string imeiCode)
{
ActivityCommonImpl utl = ActivityCommonImpl.Instance;
//找取回收IMEI
string IMEI = utl.AstNum.CheckAndSetReleaseAstNumber(curProd.ProId, imeiCode, "IMEI", this.Station, this.Editor);
if (string.IsNullOrEmpty(IMEI) || !IMEI.StartsWith(preFixIMEICode))
{
string seq = getIMEISeq(curProd.Model, imeiCode.Trim(), this.Customer);
if (string.IsNullOrEmpty(seq))
{
throw new FisException("CHK1087", new string[] { curProd.Model });
}
string code = preFixIMEICode.Trim() + seq.Substring(6, 6);
IMEI = code + getIMEICheckCode(code);
ActivityCommonImpl.Instance.AstNum.InsertCombinedAstNumber(session, curProd.ProId, imeiCode, "IMEI", IMEI, this.Station, this.Editor);
}
curProd.SetExtendedProperty(name, IMEI, this.Editor);
//1.有ProductInfo 有IMEI 的值,release old IMEI
if (!string.IsNullOrEmpty(imeiInfo))
{
//Release old IMEI
ActivityCommonImpl.Instance.AstNum.ReleaseCombinedAstNumber(session, curProd.ProId, "IMEI", imeiInfo, this.Station, this.Editor);
}
}
示例2: genMultiIMEI
private void genMultiIMEI(Session session, IProduct curProd,
IList<string> infoTypes, IList<string> infoValues,
string preFixIMEICode, string imeiCode, int qty)
{
IList<string> seqList = getIMEISeq(curProd.Model, imeiCode.Trim(), this.Customer, qty);
for (int i = 0; i < qty; i++)
{
string name = "";
if (i < infoTypes.Count)
{
name = infoTypes[i];
//seqList[i]= code + getIMEICheckCode(code);
}
else
{
name = "IMEI_" + i.ToString("D1");
//infoTypes.Add(name);
//infoValues.Add(curProd.ProductInfoes.Where(x => x.InfoType == name).Select(y => y.InfoValue).FirstOrDefault());
}
string code = preFixIMEICode.Trim() + seqList[i].Substring(6, 6);
string IMEIcode = code + getIMEICheckCode(code);
curProd.SetExtendedProperty(name, IMEIcode, this.Editor);
ActivityCommonImpl.Instance.AstNum.InsertCombinedAstNumber(session, curProd.ProId, imeiCode, "IMEI", IMEIcode, this.Station, this.Editor);
string imeiInfo = infoValues[i];
if (!string.IsNullOrEmpty(imeiInfo))
{
//Release old IMEI
ActivityCommonImpl.Instance.AstNum.ReleaseCombinedAstNumber(session, curProd.ProId, "IMEI", imeiInfo, this.Station, this.Editor);
}
}
}