Exemplo n.º 1
0
        public static string GetLotCode(CJDLine cjdLine)
        {
            if (cjdLine != null &&
                cjdLine.SN.IsNotNullOrWhiteSpace()
                )
            {
                // *110377*f0701006*j2914n1h-010*
                // *供应商*批次号*料号*
                string[] arr = cjdLine.SN.Split(new char[] { '*' }, StringSplitOptions.None);

                if (arr.Length >= 3)
                {
                    return(arr[2]);
                }
            }

            return(string.Empty);
        }
Exemplo n.º 2
0
        private static string GetItemCode(CJDLine cjdLine)
        {
            string strItemCode = cjdLine.ItemMaster.Code;

            // 品名="驾驶室总成" 的取 "-"的前两段
            if (cjdLine.ItemMaster.Name == Const_CabName)
            {
                string[] arr = strItemCode.Split(new char[] { '-' }, StringSplitOptions.None);

                if (arr.Length > 2)
                {
                    strItemCode = string.Format("{0}-{1}"
                                                , arr[0]
                                                , arr[1]
                                                );
                }
            }

            return(strItemCode);
        }