示例#1
0
        public static CostCode getCostCodeFromCSI2018(List <string> lineData)
        {
            CostCode costCode = new CostCode();

            costCode = getCostCodeFromText(lineData[2], "", "", lineData[3]);

            return(costCode);
        }
示例#2
0
        //Procore standard for code
        public static CostCode getCostCodeFromProcore(List <string> lineData)
        {
            CostCode costCode = new CostCode();

            costCode = getCostCodeFromText(lineData[0], lineData[1], "", lineData[2]);

            return(costCode);
        }
示例#3
0
        public static string getCostCodeString(CostCode code)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(code.code);
            builder.Append(", ");
            builder.Append(code.codeDescription);

            return(builder.ToString());
        }
示例#4
0
        public static CostCode getCostCodeFromText(string divisionText, string subDivisionText, string codeText, string codeDescription)
        {
            CostCode codeData = new CostCode();

            if (string.IsNullOrEmpty(divisionText))
            {
                divisionText = "";
            }
            if (string.IsNullOrEmpty(subDivisionText))
            {
                subDivisionText = "";
            }
            if (string.IsNullOrEmpty(codeText))
            {
                codeText = "";
            }

            codeData.code = divisionText + subDivisionText + codeText;

            codeData.codeDescription = codeDescription;

            return(codeData);
        }