public int EkleUrunStokIslemi(TBLSTOKISLEMLERI ptStokIslemleri)
 {
     try
     {
         DbCommand dbcommand = db.GetSqlStringCommand("INSERT INTO TBLSTOKISLEMLERI(URUNID,MIKTAR,ISLEMTIPI,REFERANSID,OLUSMA_ZAMANI) VALUES(@URUNID, @MIKTAR, @ISLEMTIPI, @REFERANSID, @OLUSMA_ZAMANI) SELECT @@IDENTITY");
         db.AddInParameter(dbcommand, "URUNID", DbType.Int32, ptStokIslemleri.URUNID);
         db.AddInParameter(dbcommand, "MIKTAR", DbType.Decimal, ptStokIslemleri.MIKTAR);
         db.AddInParameter(dbcommand, "ISLEMTIPI", DbType.Int16, (short)ptStokIslemleri.ISLEMTIPI);
         db.AddInParameter(dbcommand, "REFERANSID", DbType.Double, ptStokIslemleri.REFERANSID);
         db.AddInParameter(dbcommand, "OLUSMA_ZAMANI", DbType.DateTime, DateTime.Now);
         return(db.ExecuteScalar(dbcommand).ToInt(0));
     }
     catch (Exception ex)
     {
         cLog.Write(ex, _iKullaniciID);
         return(0);
     }
 }
        public short DuzenleStokIslemi(TBLSTOKISLEMLERI ptStokIslemleri)
        {
            try
            {
                DbCommand dbcommand = db.GetSqlStringCommand("UPDATE TBLSTOKISLEMLERI SET URUNID=@URUNID, MIKTAR=@MIKTAR, ISLEMTIPI=@ISLEMTIPI,REFERANSID=@REFERANSID WHERE ID=@ID");
                db.AddInParameter(dbcommand, "ID", DbType.Int64, ptStokIslemleri.ID);
                db.AddInParameter(dbcommand, "URUNID", DbType.Int32, ptStokIslemleri.URUNID);
                db.AddInParameter(dbcommand, "MIKTAR", DbType.Decimal, ptStokIslemleri.MIKTAR);
                db.AddInParameter(dbcommand, "ISLEMTIPI", DbType.Int16, (short)ptStokIslemleri.ISLEMTIPI);
                db.AddInParameter(dbcommand, "REFERANSID", DbType.Double, ptStokIslemleri.REFERANSID);

                db.ExecuteNonQuery(dbcommand);
                return(1);
            }
            catch (Exception ex)
            {
                cLog.Write(ex, _iKullaniciID);
                return(0);
            }
        }