/// <summary> /// 获取商品的打印条码的后三位 /// </summary> /// <param name="product"></param> /// <param name="prcou">打印数量</param> /// <returns></returns> private List <string> GetPrintBarcodeNumbs(ProductBarcodePrintInfo product, int prcou) { List <string> li = new List <string>(); string starFlg = "0"; if (product != null) { starFlg = product.CurPrintFlag; } lock (objlock) { string _key = "cur_barcode_flgnum_1109"; var tecurNum = CacheAccess.Get(_key) as string; if (!string.IsNullOrEmpty(tecurNum)) { starFlg = tecurNum; } } Math36 math = new Math36(); int curstar = (int)(math.To10(starFlg, 0)); for (int i = 0; i < prcou; i++) { curstar += 1; li.Add((math.To36(curstar)).PadLeft(3, '0')); } lock (objlock) { string _key = "cur_barcode_flgnum_1109"; CacheAccess.Set(_key, curstar, 2); } return(li); }
public override DataTable GetAllCity() { DataTable dt = CacheAccess.Get <DataTable>("ALLCITY"); if (dt == null) { string strSql = "SELECT CityID,ECity,City FROM TN_City WHERE IsDisplay=1 ORDER BY OrderID"; DataSet ds = SqlHelper.ExecuteQuery(CommandType.Text, strSql); if (ds != null && ds.Tables.Count > 0) { dt = ds.Tables[0]; CacheAccess.Set("ALLCITY", dt); } else { return(null); } } return(dt); }