44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
namespace BLL
|
|
{
|
|
using System;
|
|
using System.Collections;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using System.Data.Linq;
|
|
using System.Web.Security;
|
|
using System.Web.UI.WebControls;
|
|
using Model;
|
|
using BLL;
|
|
using System.Collections.Generic;
|
|
|
|
/// <summary>
|
|
/// 自定义下拉框通用类
|
|
/// </summary>
|
|
public class ConvertObject
|
|
{
|
|
public static string ConvertUnitNameById(object units)
|
|
{
|
|
string unit = string.Empty;
|
|
if (units != null)
|
|
{
|
|
string[] unitInto = units.ToString().Split('|');
|
|
foreach (string unitId in unitInto)
|
|
{
|
|
var q = BLL.Base_UnitService.GetUnit(unitId);
|
|
if (q != null)
|
|
{
|
|
unit = unit + q.UnitName + ",";
|
|
}
|
|
}
|
|
}
|
|
if (unit.Length > 0)
|
|
{
|
|
unit = unit.Substring(0, unit.Length - 1);
|
|
}
|
|
|
|
return unit;
|
|
}
|
|
}
|
|
}
|