public static CostCode getCostCodeFromCSI2018(List <string> lineData) { CostCode costCode = new CostCode(); costCode = getCostCodeFromText(lineData[2], "", "", lineData[3]); return(costCode); }
//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); }
public static string getCostCodeString(CostCode code) { StringBuilder builder = new StringBuilder(); builder.Append(code.code); builder.Append(", "); builder.Append(code.codeDescription); return(builder.ToString()); }
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); }