Ejemplo n.º 1
0
 public int Add(news model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("insert into pd_project_regulate(");
     builder.Append("PD_PROJECT_CODE,PD_PROJECT_SUBJECTS,PD_PROJECT_CONTENTS,PD_PROJECT_SYSDATE,PD_PROJECT_TYPE)");
     builder.Append(" values (");
     builder.Append(":PD_PROJECT_CODE,:PD_PROJECT_SUBJECTS,:PD_PROJECT_CONTENTS,:PD_PROJECT_SYSDATE,:PD_PROJECT_TYPE)");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":PD_PROJECT_CODE", OracleType.Char, 0x24), new OracleParameter(":PD_PROJECT_SUBJECTS", OracleType.VarChar, 220), new OracleParameter(":PD_PROJECT_CONTENTS", OracleType.LongVarChar), new OracleParameter(":PD_PROJECT_SYSDATE", OracleType.DateTime), new OracleParameter(":PD_PROJECT_TYPE", OracleType.Number, 4) };
     cmdParms[0].Value = model.newid;
     cmdParms[1].Value = model.subjects;
     cmdParms[2].Value = model.contents;
     cmdParms[3].Value = model.sysdate_;
     cmdParms[4].Value = model.type;
     return DbHelperOra.ExecuteSql(builder.ToString(), cmdParms);
 }
Ejemplo n.º 2
0
 public int Update(news model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("update PD_PROJECT_REGULATE set ");
     builder.Append("PD_PROJECT_SUBJECTS=:PD_PROJECT_SUBJECTS,");
     builder.Append("PD_PROJECT_CONTENTS=:PD_PROJECT_CONTENTS,");
     builder.Append("PD_PROJECT_SYSDATE=:PD_PROJECT_SYSDATE,");
     builder.Append("PD_PROJECT_TYPE=:PD_PROJECT_TYPE");
     builder.Append(" where PD_PROJECT_CODE=:PD_PROJECT_CODE ");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":PD_PROJECT_SUBJECTS", OracleType.VarChar, 220), new OracleParameter(":PD_PROJECT_CONTENTS", OracleType.LongVarChar), new OracleParameter(":PD_PROJECT_SYSDATE", OracleType.DateTime), new OracleParameter(":PD_PROJECT_TYPE", OracleType.Number, 4), new OracleParameter(":PD_PROJECT_CODE", OracleType.Char, 100) };
     cmdParms[0].Value = model.subjects;
     cmdParms[1].Value = model.contents;
     cmdParms[2].Value = model.sysdate_;
     cmdParms[3].Value = model.type;
     cmdParms[4].Value = model.newid;
     return DbHelperOra.ExecuteSql(builder.ToString(), cmdParms);
 }
Ejemplo n.º 3
0
 public int Update(news model)
 {
     return this.dal.Update(model);
 }
Ejemplo n.º 4
0
 public int Add(news model)
 {
     return this.dal.Add(model);
 }