示例#1
0
 public int RaporEkle(TBLRAPOR ptRapor)
 {
     try
     {
         DbCommand dbcommand = db.GetSqlStringCommand("INSERT INTO TBLRAPOR(AD,YOL) VALUES(@AD,@YOL) SELECT @@IDENTITY");
         db.AddInParameter(dbcommand, "AD", DbType.String, ptRapor.AD);
         db.AddInParameter(dbcommand, "YOL", DbType.String, ptRapor.YOL);
         return(db.ExecuteScalar(dbcommand).ToInt(0));
     }
     catch (Exception ex)
     {
         cLog.Write(ex, _iKullaniciID);
         return(0);
     }
 }
示例#2
0
 public short DuzenleRaporlar(TBLRAPOR ptRapor)
 {
     try
     {
         DbCommand dbCommand = db.GetSqlStringCommand("UPDATE TBLRAPOR SET AD=@AD, YOL=@YOL WHERE ID=@ID");
         db.AddInParameter(dbCommand, "AD", DbType.String, ptRapor.AD);
         db.AddInParameter(dbCommand, "YOL", DbType.String, ptRapor.YOL);
         db.AddInParameter(dbCommand, "ID", DbType.Int32, ptRapor.ID);
         db.ExecuteNonQuery(dbCommand);
         return(1);
     }
     catch (Exception ex)
     {
         cLog.Write(ex, _iKullaniciID);
         return(0);
     }
 }