public override void Fill(params object[] args) { FillData(args); DataSet ds = ObjectUtil.QueryObject <DataSet>(args); if (ds != null) { string regName = RegName; if (!ds.Tables.Contains(regName)) { DataTable table = fDataTable.Copy(); ds.Tables.Add(table); } return; } CodeTableContainer container = ObjectUtil.QueryObject <CodeTableContainer>(args); if (container != null) { List <CodeItem> result = new List <CodeItem>(fDataTable.Rows.Count); foreach (DataRow row in fDataTable.Rows) { CodeItem item = new CodeItem(row[DecoderConst.CODE_NICK_NAME].ToString(), row[DecoderConst.NAME_NICK_NAME].ToString()); result.Add(item); } container.Add(RegName, result); } }
public override void Fill(params object[] args) { DataSet ds = ObjectUtil.QueryObject <DataSet>(args); if (ds != null) { string regName = RegName; if (!ds.Tables.Contains(regName)) { DataTable table = fData.CreateTable(regName); ds.Tables.Add(table); } return; } CodeTableContainer container = ObjectUtil.QueryObject <CodeTableContainer>(args); if (container != null) { container.Add(RegName, fData); } }
public override void Fill(params object[] args) { DataSet ds = ObjectUtil.QueryObject <DataSet>(args); if (ds != null) { string regName = RegName; if (!ds.Tables.Contains(regName)) { var fields = from item in fList select new CodeItem(item); DataTable table = fields.CreateTable(regName); ds.Tables.Add(table); } return; } CodeTableContainer container = ObjectUtil.QueryObject <CodeTableContainer>(args); if (container != null) { container.Add(RegName, fList); } }