public Lbfgs CreateLbfgs(Lbfgs info) { try { string sqlCommand = @"INSERT INTO ""LB_FGS"" (""FGSID"",""FGS"",""FGSSORTID"",""FGLD"",""FGLDLXDH"",""WLLZGY"",""WLLZGYLXDH"") VALUES (:Fgsid,:Fgs,:Fgssortid,:Fgld,:Fgldlxdh,:Wllzgy,:Wllzgylxdh)"; this.Database.AddInParameter(":Fgsid", info.Fgsid);//DBType:NUMBER this.Database.AddInParameter(":Fgs", info.Fgs);//DBType:VARCHAR2 this.Database.AddInParameter(":Fgssortid", info.Fgssortid);//DBType:VARCHAR2 this.Database.AddInParameter(":Fgld", info.Fgld);//DBType:VARCHAR2 this.Database.AddInParameter(":Fgldlxdh", info.Fgldlxdh);//DBType:VARCHAR2 this.Database.AddInParameter(":Wllzgy", info.Wllzgy);//DBType:VARCHAR2 this.Database.AddInParameter(":Wllzgylxdh", info.Wllzgylxdh);//DBType:VARCHAR2 this.Database.ExecuteNonQuery(sqlCommand); } finally { this.Database.ClearParameter(); } return info; }
public Lbfgs UpdateLbfgsByFgsid(Lbfgs info) { try { this.Database.AddInParameter(":Fgsid", info.Fgsid);//DBType:NUMBER this.Database.AddInParameter(":Fgs", info.Fgs);//DBType:VARCHAR2 this.Database.AddInParameter(":Fgssortid", info.Fgssortid);//DBType:VARCHAR2 this.Database.AddInParameter(":Fgld", info.Fgld);//DBType:VARCHAR2 this.Database.AddInParameter(":Fgldlxdh", info.Fgldlxdh);//DBType:VARCHAR2 this.Database.AddInParameter(":Wllzgy", info.Wllzgy);//DBType:VARCHAR2 this.Database.AddInParameter(":Wllzgylxdh", info.Wllzgylxdh);//DBType:VARCHAR2 string sqlCommand = @"UPDATE ""LB_FGS"" SET ""FGS""=:Fgs , ""FGSSORTID""=:Fgssortid , ""FGLD""=:Fgld , ""FGLDLXDH""=:Fgldlxdh , ""WLLZGY""=:Wllzgy , ""WLLZGYLXDH""=:Wllzgylxdh WHERE ""FGSID""=:Fgsid"; this.Database.ExecuteNonQuery(sqlCommand); } finally { this.Database.ClearParameter(); } return info; }