| | |
| | | string HProduceDate = "";//生产日期 |
| | | string HExpiryDate = "";//保质期至 |
| | | |
| | | if (str.Length == 8 && HISKFPERIOD == "1") |
| | | if (str.Length == 9 && HISKFPERIOD == "1") |
| | | { |
| | | if (!string.IsNullOrWhiteSpace(str[7])) |
| | | { |
| | |
| | | } |
| | | |
| | | HProduceDate = HDate.ToString(); |
| | | |
| | | //if (!DateTime.TryParse(str[8], out HDate)) |
| | | //{ |
| | | // sErrMsg = "条码解析失败," + str[8] + ",保质期格式不正确!"; |
| | | // return false; |
| | | //} |
| | | //HExpiryDate = HDate.ToString(); |
| | | //HISKFPERIOD = 1; |
| | | |
| | | if (!string.IsNullOrWhiteSpace(str[8])) |
| | | { |
| | | try |
| | | { |
| | | HDate = DateTime.ParseExact(str[8], "yyyyMMdd", CultureInfo.InvariantCulture); |
| | | } |
| | | catch |
| | | { |
| | | sErrMsg = "条码解析失败," + str[8] + ",生产日期格式不正确!"; |
| | | return false; |
| | | } |
| | | } |
| | | HExpiryDate = HDate.ToString(); |
| | | } |
| | | |
| | | string HSupIDs = "0"; |