protected virtual void dataOther(string tencot, string dulieu) { int num = this._listDataOther.FindIndex(delegate(ObjectIud o) { return (o != null) && (o.getColName == tencot.Trim().ToLower()); }); if (num != -1) { this._listDataOther[num].setData = dulieu.Trim(); } else { ObjectIud item = new ObjectIud(tencot.Trim().ToLower(), dulieu.Trim(), null); this._listDataOther.Add(item); } }
public ObjectIud data(string tencot, string dulieu) { if ((this._spKey.Rows.Count < 1) || (this._spKey == null)) { throw new ArgumentException("PrimaryKey kh\x00f4ng c\x00f3 !"); } if ((this._spColumns.Rows.Count < 1) || (this._spColumns == null)) { return null; } if ((dulieu == null) || string.IsNullOrEmpty(tencot)) { return null; } int num = this._listData.FindIndex(delegate(ObjectIud o) { return (o != null) && (o.getColName == tencot.Trim().ToLower()); }); if (num != -1) { this._listData[num].setData = dulieu.Trim(); return this._listData[num]; } DataRow[] rowArray = this._spColumns.Select("COLUMN_NAME = '" + tencot + "'"); if (rowArray.Length != 1) { this.dataOther(tencot, dulieu); return null; } ObjectIud item = new ObjectIud(tencot.Trim().ToLower(), dulieu.Trim(), rowArray[0]["TYPE_NAME"].ToString()); this._listData.Add(item); return item; }