Beispiel #1
0
 public short DuzenleKurumParametreleri(TBLKURUM_PARAMETRELERI ptKurumParametreleri)
 {
     try
     {
         DbCommand dbCommand = db.GetSqlStringCommand("UPDATE TBLKURUM_PARAMETRELERI SET KURUM_ADI=@KURUM_ADI, ADRES=@ADRES, TELEFON=@TELEFON, FAX=@FAX, VERGI_DAIRESI=@VERGI_DAIRESI, VERGI_NO=@VERGI_NO, TIC_SICIL_NO=@TIC_SICIL_NO, SMTP_ADRES=@SMTP_ADRES, SMTP_PORT=@SMTP_PORT, MAIL=@MAIL, MAILSIFRE=@MAILSIFRE, AKTIF=@AKTIF WHERE ID=@ID");
         db.AddInParameter(dbCommand, "ID", DbType.String, ptKurumParametreleri.ID);
         db.AddInParameter(dbCommand, "KURUM_ADI", DbType.String, ptKurumParametreleri.KURUM_ADI);
         db.AddInParameter(dbCommand, "ADRES", DbType.String, ptKurumParametreleri.ADRES);
         db.AddInParameter(dbCommand, "TELEFON", DbType.String, ptKurumParametreleri.TELEFON);
         db.AddInParameter(dbCommand, "FAX", DbType.String, ptKurumParametreleri.FAX);
         db.AddInParameter(dbCommand, "VERGI_DAIRESI", DbType.String, ptKurumParametreleri.VERGI_DAIRESI);
         db.AddInParameter(dbCommand, "VERGI_NO", DbType.String, ptKurumParametreleri.VERGI_NO);
         db.AddInParameter(dbCommand, "TIC_SICIL_NO", DbType.String, ptKurumParametreleri.TIC_SICIL_NO);
         db.AddInParameter(dbCommand, "SMTP_ADRES", DbType.String, ptKurumParametreleri.SMTP_ADRES);
         db.AddInParameter(dbCommand, "SMTP_PORT", DbType.Int32, ptKurumParametreleri.SMTP_PORT);
         db.AddInParameter(dbCommand, "MAIL", DbType.String, ptKurumParametreleri.MAIL);
         db.AddInParameter(dbCommand, "MAILSIFRE", DbType.String, ptKurumParametreleri.MAILSIFRE);
         db.AddInParameter(dbCommand, "AKTIF", DbType.Int16, (short)ptKurumParametreleri.AKTIF);
         db.ExecuteNonQuery(dbCommand);
         return(1);
     }
     catch (Exception ex)
     {
         cLog.Write(ex, _iKullaniciID);
         return(0);
     }
 }
Beispiel #2
0
        public short EkleKurumParametreleri(TBLKURUM_PARAMETRELERI ptKurumParametreleri)
        {
            try
            {
                DbCommand dbCommand = db.GetSqlStringCommand("INSERT INTO TBLKURUM_PARAMETRELERI(KURUM_ADI, ADRES, TELEFON, FAX, VERGI_DAIRESI, VERGI_NO, TIC_SICIL_NO,SMTP_ADRES,SMTP_PORT,MAIL,MAILSIFRE,AKTIF) VALUES(@KURUM_ADI, @ADRES, @TELEFON, @FAX, @VERGI_DAIRESI, @VERGI_NO, @TIC_SICIL_NO, @SMTP_ADRES, @SMTP_PORT, @MAIL, @MAILSIFRE, @AKTIF) SELECT @@IDENTITY");

                db.AddInParameter(dbCommand, "KURUM_ADI", DbType.String, ptKurumParametreleri.KURUM_ADI);
                db.AddInParameter(dbCommand, "ADRES", DbType.String, ptKurumParametreleri.ADRES);
                db.AddInParameter(dbCommand, "TELEFON", DbType.String, ptKurumParametreleri.TELEFON);
                db.AddInParameter(dbCommand, "FAX", DbType.String, ptKurumParametreleri.FAX);
                db.AddInParameter(dbCommand, "VERGI_DAIRESI", DbType.String, ptKurumParametreleri.VERGI_DAIRESI);
                db.AddInParameter(dbCommand, "VERGI_NO", DbType.String, ptKurumParametreleri.VERGI_NO);
                db.AddInParameter(dbCommand, "TIC_SICIL_NO", DbType.String, ptKurumParametreleri.TIC_SICIL_NO);
                db.AddInParameter(dbCommand, "SMTP_ADRES", DbType.String, ptKurumParametreleri.SMTP_ADRES);
                db.AddInParameter(dbCommand, "SMTP_PORT", DbType.Int32, ptKurumParametreleri.SMTP_PORT);
                db.AddInParameter(dbCommand, "MAIL", DbType.String, ptKurumParametreleri.MAIL);
                db.AddInParameter(dbCommand, "MAILSIFRE", DbType.String, ptKurumParametreleri.MAILSIFRE);
                db.AddInParameter(dbCommand, "AKTIF", DbType.Int16, (short)ptKurumParametreleri.AKTIF);
                return(db.ExecuteScalar(dbCommand).ToShort(0));
            }
            catch (Exception ex)
            {
                cLog.Write(ex, _iKullaniciID);
                return(0);
            }
        }