Exemplo n.º 1
0
 public int Add(DataColumnModel model, DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("insert into DB_DATACOLUMN(");
     builder.Append("TABLEPK,COLUMNREMARK,COLUMNNAME,REMARK");
     builder.Append(")");
     builder.Append(" values (");
     builder.Append("'" + model.TABLEPK + "',");
     builder.Append("'" + model.COLUMNREMARK + "',");
     builder.Append("'" + model.COLUMNNAME + "',");
     builder.Append("'" + model.REMARK + "'");
     builder.Append(")");
     return dbo.ExecutionIsSucess(builder.ToString(), null);
 }
Exemplo n.º 2
0
 public DataColumnModel[] GetModels(string strWhere, DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append(this.GetSql());
     if (strWhere != "")
     {
         builder.Append(" where " + strWhere);
     }
     OracleParameter[] parameters = null;
     DataSet set = dbo.BackDataSet(builder.ToString(), parameters, "");
     DataColumnModel[] modelArray = null;
     if (set.Tables[0].Rows.Count <= 0)
     {
         return null;
     }
     modelArray = new DataColumnModel[set.Tables[0].Rows.Count];
     for (int i = 0; i < set.Tables[0].Rows.Count; i++)
     {
         modelArray[i] = new DataColumnModel();
         modelArray[i] = this.GetModel(set.Tables[0].Rows[i]);
     }
     return modelArray;
 }
Exemplo n.º 3
0
 public int Update(DataColumnModel model, DB_OPT dbo)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("update DB_DATACOLUMN set ");
     builder.Append("TABLEPK='" + model.TABLEPK + "',");
     builder.Append("COLUMNREMARK='" + model.COLUMNREMARK + "',");
     builder.Append("COLUMNNAME='" + model.COLUMNNAME + "',");
     builder.Append("REMARK='" + model.REMARK + "'");
     builder.Append(" where PK='" + model.PK + "' ");
     return dbo.ExecutionIsSucess(builder.ToString(), null);
 }