33 lines
907 B
C#
33 lines
907 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DOAN.Common.Mobile
|
|
{
|
|
public class ParselabelHelper
|
|
{
|
|
/// <summary>
|
|
/// 解析某一类标签
|
|
/// </summary>
|
|
/// <param name="materialCode"></param>
|
|
/// <returns></returns>
|
|
public static string ParseLabel01(string materialCode)
|
|
{
|
|
string materialCode_true = "";
|
|
if(string.IsNullOrEmpty(materialCode))
|
|
{
|
|
throw new ArgumentException("标签不合法,解析失败");
|
|
}
|
|
string[] materialCodeArray = materialCode.Split('/');
|
|
if (materialCodeArray != null && materialCode.Length > 0)
|
|
{
|
|
materialCode_true = materialCodeArray[0];
|
|
}
|
|
|
|
return materialCode_true;
|
|
}
|
|
}
|
|
}
|