Exemple #1
0
        public short EkleBanka(TBLBANKALAR ptBankalar)
        {
            try
            {
                DbCommand dbCommand = db.GetSqlStringCommand("INSERT INTO TBLBANKALAR(BANKA_ADI,KULLANICI_ADI,SIFRE,MAGAZA_NO,AKTIF,TAKSIT,HOST) VALUES(@BANKA_ADI,@KULLANICI_ADI,@SIFRE,@MAGAZA_NO,@AKTIF,@TAKSIT,@HOST) SELECT @@IDENTITY");
                db.AddInParameter(dbCommand, "BANKA_ADI", DbType.String, ptBankalar.BANKA_ADI);
                db.AddInParameter(dbCommand, "KULLANICI_ADI", DbType.String, ptBankalar.KULLANICI_ADI);
                db.AddInParameter(dbCommand, "SIFRE", DbType.String, ptBankalar.SIFRE);
                db.AddInParameter(dbCommand, "MAGAZA_NO", DbType.String, ptBankalar.MAGAZA_NO);
                db.AddInParameter(dbCommand, "AKTIF", DbType.Int16, (short)ptBankalar.AKTIF);
                db.AddInParameter(dbCommand, "TAKSIT", DbType.Int16, (short)ptBankalar.TAKSIT);
                db.AddInParameter(dbCommand, "HOST", DbType.String, ptBankalar.HOST);

                return(db.ExecuteScalar(dbCommand).ToShort(0));
            }
            catch (Exception ex)
            {
                cLog.Write(ex, _iKullaniciID);
                return(0);
            }
        }
Exemple #2
0
 public short DuzenleBanka(TBLBANKALAR ptBankalar)
 {
     try
     {
         DbCommand dbCommand = db.GetSqlStringCommand("UPDATE TBLBANKALAR SET BANKA_ADI=@BANKA_ADI, KULLANICI_ADI=@KULLANICI_ADI, SIFRE=@SIFRE, MAGAZA_NO=@MAGAZA_NO, AKTIF=@AKTIF, TAKSIT=@TAKSIT,HOST=@HOST WHERE ID=@ID");
         db.AddInParameter(dbCommand, "ID", DbType.Int16, ptBankalar.ID);
         db.AddInParameter(dbCommand, "BANKA_ADI", DbType.String, ptBankalar.BANKA_ADI);
         db.AddInParameter(dbCommand, "KULLANICI_ADI", DbType.String, ptBankalar.KULLANICI_ADI);
         db.AddInParameter(dbCommand, "SIFRE", DbType.String, ptBankalar.SIFRE);
         db.AddInParameter(dbCommand, "MAGAZA_NO", DbType.String, ptBankalar.MAGAZA_NO);
         db.AddInParameter(dbCommand, "AKTIF", DbType.Int16, (short)ptBankalar.AKTIF);
         db.AddInParameter(dbCommand, "TAKSIT", DbType.Int16, (short)ptBankalar.TAKSIT);
         db.AddInParameter(dbCommand, "HOST", DbType.String, ptBankalar.HOST);
         db.ExecuteNonQuery(dbCommand);
         return(1);
     }
     catch (Exception ex)
     {
         cLog.Write(ex, _iKullaniciID);
         return(0);
     }
 }