public DataTable SelectRecord() { DataTable DataTb = null; string sql = string.Empty; int len = 0; // 新增 len = this.fields.Count / 2; sql = sql + "select * from " + this.tableName; DataTb = DBControl.GetTable(sql); return(DataTb); }
public List <string> Getlist() { string sql = "select NAME from ComboBoxSet where FieldId = '" + this.ControlID + "'"; DataTable tb = DBControl.GetTable(sql); List <string> list = new List <string>(); int count = tb.Rows.Count; for (int i = 0; i < count; i++) { list.Add(tb.Rows[i]["NAME"].ToString()); } return(list); }
public void Load(decimal id) { this.id = id; string sql = "select * from " + this.tableName + " where id = " + id; DataTable tb = DBControl.GetTable(sql); if (tb.Rows.Count == 0) { return; } int len = this.fields.Count; for (int i = 0; i < len; i++) { this.fields[i].FieldValue = tb.Rows[0][this.fields[i].FieldName].ToString(); } }
public DataTable SelectTabsBySql(string sql) { return(DBControl.GetTable(sql)); }