public Hcontractdetail CreateHcontractdetail(Hcontractdetail info) { try { this.Database.AddInParameter(":Instanceid", info.Instanceid);//DBType:NUMBER this.Database.AddInParameter(":Fainstanceid", info.Fainstanceid);//DBType:NUMBER this.Database.AddInParameter(":Detailname", info.Detailname);//DBType:VARCHAR2 this.Database.AddInParameter(":Modal", info.Modal);//DBType:VARCHAR2 this.Database.AddInParameter(":Type", info.Type);//DBType:NUMBER this.Database.AddInParameter(":Sl", info.Sl);//DBType:NUMBER this.Database.AddInParameter(":Dj", info.Dj);//DBType:NUMBER this.Database.AddInParameter(":Pp", info.Pp);//DBType:VARCHAR2 string sqlCommand = @"INSERT INTO ""H_CONTRACT_DETAIL"" (""INSTANCEID"",""FAINSTANCEID"",""DETAILNAME"",""MODAL"",""TYPE"",""SL"",""DJ"",""PP"") VALUES (:Instanceid,:Fainstanceid,:Detailname,:Modal,:Type,:Sl,:Dj,:Pp)"; this.Database.ExecuteNonQuery(sqlCommand); } finally { this.Database.ClearParameter(); } return info; }
public Hcontractdetail UpdateHcontractdetailByInstanceid(Hcontractdetail info) { try { this.Database.AddInParameter(":Instanceid", info.Instanceid);//DBType:NUMBER this.Database.AddInParameter(":Fainstanceid", info.Fainstanceid);//DBType:NUMBER this.Database.AddInParameter(":Detailname", info.Detailname);//DBType:VARCHAR2 this.Database.AddInParameter(":Modal", info.Modal);//DBType:VARCHAR2 this.Database.AddInParameter(":Type", info.Type);//DBType:NUMBER this.Database.AddInParameter(":Sl", info.Sl);//DBType:NUMBER this.Database.AddInParameter(":Dj", info.Dj);//DBType:NUMBER this.Database.AddInParameter(":Pp", info.Pp);//DBType:VARCHAR2 string sqlCommand = @"UPDATE ""H_CONTRACT_DETAIL"" SET ""FAINSTANCEID""=:Fainstanceid , ""DETAILNAME""=:Detailname , ""MODAL""=:Modal , ""TYPE""=:Type , ""SL""=:Sl , ""DJ""=:Dj , ""PP""=:Pp WHERE ""INSTANCEID""=:Instanceid"; this.Database.ExecuteNonQuery(sqlCommand); } finally { this.Database.ClearParameter(); } return info; }