public bool Add(reportParam_Model model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("insert into reportParam(");
     builder.Append("name,tabelName,tbtype,ShowReportName,columndata,IsOpenShow,ReportSpanRow,IsColumnWhere)");
     builder.Append(" values (");
     builder.Append(":name,:tabelName,:tbtype,:ShowReportName,:columndata,:IsOpenShow,:ReportSpanRow,:IsColumnWhere)");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":name", OracleType.VarChar, 50), new OracleParameter(":tabelName", OracleType.VarChar, 50), new OracleParameter(":tbtype", OracleType.VarChar,1), new OracleParameter(":ShowReportName", OracleType.VarChar, 50), new OracleParameter(":columndata", OracleType.VarChar, 0), new OracleParameter(":IsOpenShow", OracleType.Number,4), new OracleParameter(":ReportSpanRow", OracleType.Number,4), new OracleParameter(":IsColumnWhere", OracleType.Number,4) };
     cmdParms[0].Value = model.name;
     cmdParms[1].Value = model.tabelName;
     cmdParms[2].Value = model.tbtype;
     cmdParms[3].Value = model.ShowReportName;
     cmdParms[4].Value = model.columndata;
     cmdParms[5].Value = model.IsOpenShow;
     cmdParms[6].Value = model.ReportSpanRow;
     cmdParms[7].Value = model.IsColumnWhere;
     return (DbHelperOra.ExecuteSql(builder.ToString(), cmdParms) > 0);
 }
 public reportParam_Model DataRowToModel(DataRow row)
 {
     reportParam_Model model = new reportParam_Model();
     if (row != null)
     {
         if ((row["id"] != null) && (row["id"].ToString() != ""))
         {
             model.id = int.Parse(row["id"].ToString());
         }
         if (row["name"] != null)
         {
             model.name = row["name"].ToString();
         }
         if (row["tabelName"] != null)
         {
             model.tabelName = row["tabelName"].ToString();
         }
         if (row["tbtype"] != null)
         {
             model.tbtype = row["tbtype"].ToString();
         }
         if (row["ShowReportName"] != null)
         {
             model.ShowReportName = row["ShowReportName"].ToString();
         }
         if (row["columndata"] != null)
         {
             model.columndata = row["columndata"].ToString();
         }
         if ((row["IsOpenShow"] != null) && (row["IsOpenShow"].ToString().Trim() != ""))
         {
             model.IsOpenShow = byte.Parse(row["IsOpenShow"].ToString());
         }
         if ((row["ReportSpanRow"] != null) && (row["ReportSpanRow"].ToString().Trim() != ""))
         {
             model.ReportSpanRow = int.Parse(row["ReportSpanRow"].ToString());
         }
         if ((row["IsColumnWhere"] != null) && (row["IsColumnWhere"].ToString().Trim() != ""))
         {
             model.IsColumnWhere = byte.Parse(row["IsColumnWhere"].ToString());
         }
     }
     return model;
 }
 public bool Update(reportParam_Model model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("update reportParam set ");
     builder.Append("name=:name,");
     builder.Append("tabelName=:tabelName,");
     builder.Append("tbtype=:tbtype,");
     builder.Append("ShowReportName=:ShowReportName,");
     builder.Append("columndata=;columndata,");
     builder.Append("IsOpenShow=:IsOpenShow,");
     builder.Append("ReportSpanRow=:ReportSpanRow,");
     builder.Append("IsColumnWhere=:IsColumnWhere");
     builder.Append(" where id=:id");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":name", OracleType.VarChar, 50), new OracleParameter(":tabelName", OracleType.VarChar, 50), new OracleParameter(":tbtype", OracleType.VarChar,1), new OracleParameter(":ShowReportName", OracleType.VarChar, 50), new OracleParameter("@columndata", OracleType.VarChar, 0), new OracleParameter(":IsOpenShow", OracleType.Number,4), new OracleParameter(":ReportSpanRow", OracleType.Number), new OracleParameter(":IsColumnWhere", OracleType.Number,4), new OracleParameter(":id", OracleType.Number, 4) };
     cmdParms[0].Value = model.name;
     cmdParms[1].Value = model.tabelName;
     cmdParms[2].Value = model.tbtype;
     cmdParms[3].Value = model.ShowReportName;
     cmdParms[4].Value = model.columndata;
     cmdParms[5].Value = model.IsOpenShow;
     cmdParms[6].Value = model.ReportSpanRow;
     cmdParms[7].Value = model.IsColumnWhere;
     cmdParms[8].Value = model.id;
     return (DbHelperOra.ExecuteSql(builder.ToString(), cmdParms) > 0);
 }
 public bool Update(reportParam_Model model)
 {
     return this.dal.Update(model);
 }
 public bool Add(reportParam_Model model)
 {
     return this.dal.Add(model);
 }