This commit is contained in:
2024-11-20 09:08:00 +08:00
parent f1abdbc6d0
commit 9300d77ab0
181 changed files with 28244 additions and 119 deletions
+26
View File
@@ -927,5 +927,31 @@ namespace BLL
return q;
}
}
public static string getUnitNamesUnitIdsForApi(object unitIds)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
string unitName = string.Empty;
if (unitIds != null)
{
string[] ids = unitIds.ToString().Split(',');
foreach (string id in ids)
{
var q = db.Base_Unit.FirstOrDefault(x => x.UnitId == id);
if (q != null)
{
unitName += q.UnitName + ",";
}
}
if (unitName != string.Empty)
{
unitName = unitName.Substring(0, unitName.Length - 1); ;
}
}
return unitName;
}
}
}
}