Пример #1
0
 /// <summary>
 /// ÜYE ID, OLUSMA_ZAMANI,GUID GÜNCELLENMEZ
 /// </summary>
 /// <param name="ptSiparis"></param>
 /// <returns></returns>
 public short DuzenleSiparis(TBLSIPARIS ptSiparis)
 {
     try
     {
         DbCommand dbCommand = db.GetSqlStringCommand("UPDATE TBLSIPARIS SET FATURA_ADI=@FATURA_ADI, FATURA_VERGINO=@FATURA_VERGINO, ADRES=@ADRES, BANKAID=@BANKAID, SPOSSONUC=@SPOSSONUC,ODEMETIPI=@ODEMETIPI,KARGOID=@KARGOID,KARGOKODU=@KARGOKODU,SIPARISDURUMU=@SIPARISDURUMU, DEGISTIREN=@DEGISTIREN, DEGISME_ZAMANI=@DEGISME_ZAMANI WHERE ID=@ID");
         db.AddInParameter(dbCommand, "ID", DbType.Int64, ptSiparis.ID);
         db.AddInParameter(dbCommand, "FATURA_ADI", DbType.String, ptSiparis.FATURA_ADI);
         db.AddInParameter(dbCommand, "FATURA_VERGINO", DbType.String, ptSiparis.FATURA_VERGINO);
         //db.AddInParameter(dbCommand, "TUTAR", DbType.Decimal, ptSiparis.TUTAR);
         db.AddInParameter(dbCommand, "ADRES", DbType.String, ptSiparis.ADRES);
         db.AddInParameter(dbCommand, "BANKAID", DbType.Int16, ptSiparis.BANKAID);
         db.AddInParameter(dbCommand, "KARGOID", DbType.Int16, ptSiparis.KARGOID);
         db.AddInParameter(dbCommand, "KARGOKODU", DbType.String, ptSiparis.KARGOKODU);
         db.AddInParameter(dbCommand, "SPOSSONUC", DbType.String, ptSiparis.SPOSSONUC);
         db.AddInParameter(dbCommand, "ODEMETIPI", DbType.Int16, (short)ptSiparis.ODEMETIPI);
         db.AddInParameter(dbCommand, "SIPARISDURUMU", DbType.Int16, (short)ptSiparis.SIPARISDURUMU);
         db.AddInParameter(dbCommand, "DEGISTIREN", DbType.Int32, ptSiparis.DEGISTIREN);
         db.AddInParameter(dbCommand, "DEGISME_ZAMANI", DbType.DateTime, DateTime.Now);
         db.ExecuteNonQuery(dbCommand);
         return(1);
     }
     catch (Exception ex)
     {
         cLog.Write(ex, _iKullaniciID);
         return(0);
     }
 }
Пример #2
0
 /// <summary>
 /// ilk başta kargo bilgisi ve değişme bilgisieklenmez
 /// </summary>
 /// <param name="ptSiparis"></param>
 /// <returns></returns>
 public long EkleSparis(TBLSIPARIS ptSiparis)
 {
     try
     {
         DbCommand dbCommand = db.GetSqlStringCommand("INSERT INTO TBLSIPARIS(UYEID,FATURA_ADI, FATURA_VERGINO,TUTAR,ADRES,BANKAID,SPOSSONUC,ODEMETIPI,SIPARISDURUMU,OLUSMA_ZAMANI,GUID) VALUES(@UYEID,@FATURA_ADI,@FATURA_VERGINO,@TUTAR,@ADRES,@BANKAID,@SPOSSONUC, @ODEMETIPI, @SIPARISDURUMU, @OLUSMA_ZAMANI,@GUID) SELECT @@IDENTITY");
         db.AddInParameter(dbCommand, "UYEID", DbType.Int32, ptSiparis.UYEID);
         db.AddInParameter(dbCommand, "FATURA_ADI", DbType.String, ptSiparis.FATURA_ADI);
         db.AddInParameter(dbCommand, "FATURA_VERGINO", DbType.String, ptSiparis.FATURA_VERGINO);
         db.AddInParameter(dbCommand, "TUTAR", DbType.Decimal, ptSiparis.TUTAR);
         db.AddInParameter(dbCommand, "ADRES", DbType.String, ptSiparis.ADRES);
         db.AddInParameter(dbCommand, "BANKAID", DbType.Int16, ptSiparis.BANKAID);
         db.AddInParameter(dbCommand, "SPOSSONUC", DbType.String, ptSiparis.SPOSSONUC);
         db.AddInParameter(dbCommand, "ODEMETIPI", DbType.Int16, (short)ptSiparis.ODEMETIPI);
         db.AddInParameter(dbCommand, "SIPARISDURUMU", DbType.Int16, (short)ptSiparis.SIPARISDURUMU);
         db.AddInParameter(dbCommand, "OLUSMA_ZAMANI", DbType.DateTime, DateTime.Now);
         db.AddInParameter(dbCommand, "GUID", DbType.String, Guid.NewGuid().ToString());
         return(db.ExecuteScalar(dbCommand).ToLong(0));
     }
     catch (Exception ex)
     {
         cLog.Write(ex, _iKullaniciID);
         return(0);
     }
 }