资源简介

网上花店网站源码

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;
using System.Data.OracleClient;
using System.Collections;
using System.Data;


    public class OrDoTrans
    {
        //执行事务处理 
        string strSql databaseName type regeditKey strsql;
        OracleConnection myConn2;
        public OrDoTrans()
        {
            myConn2 = new OracleConnection();
            RegistryKey hklm = Registry.LocalMachine;
            RegistryKey softWare = hklm.OpenSubKey(“SOFTWARE“);
            string server dbName userName passWord dbType;
            type = (string)softWare.GetValue(“a_tp“);
            server = (string)softWare.GetValue(“a_ds“);
            databaseName = dbName = (string)softWare.GetValue(“a_dn“);
            userName = (string)softWare.GetValue(“a_nm“);
            passWord = (string)softWare.GetValue(“a_ps“);
            if (type.Equals(“Oracle“))
            {
                strsql = “data source=“ + server + “/“ + databaseName + “;persist security info=true;user id=“ + userName + “;password=“ + passWord + “;“;
            }
        }
        public bool DoTran(string transactionString)
        {
            myConn2.ConnectionString = strsql;
            myConn2.Open();

            OracleCommand myComm = new OracleCommand();
            OracleTransaction myTran;
            //创建一个事务 
            myTran = myConn2.BeginTransaction(System.Data.IsolationLevel.Serializable);
            //从此开始,基于该连接的数据操作都被认为是事务的一部分 
            //下面绑定连接和事务对象 
            myComm.Connection = myConn2;
            myComm.Transaction = myTran;
            try
            {
                myComm.CommandText = transactionString;
                myComm.ExecuteNonQuery();
                //提交事务 
                myTran.Commit();
                return true;

            }
            catch (Exception err)
            {
                //更新错误,回滚到指定存储点 
                myTran.Rollback();
                return false;
            }
            finally
            {
                myConn2.Close();
            }


        }
        public bool DoManyTran(string[] tranStrs)
        {
            //建立连接并打开 
            myConn2.ConnectionString = strsql;
            myConn2.Open();
            OracleCommand myComm = new OracleCommand();
            OracleTransaction myTran;
            //创建一个事务 
            myTran = myConn2.BeginTransaction(System.Data.IsolationLevel.Serializable);
            //从此开始,基于该连接的数据操作都被认为是事务的一部分 
            //下面绑定连接和事务对象 
            myComm.Connection = myConn2;
            myComm.Transaction = myTran;
            try
            {
                if (tranStrs != null)
                {
                    for (int i = 0; i < tranStrs.Length; i++)
                    {
                        myComm.CommandText = tranStrs[i];
                        myComm.ExecuteNonQuery();
                    }
              

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4096  2009-06-15 10:53  网上花店\rw.dmp

     文件       6135  2009-06-06 23:46  网上花店\webserver\App_Code\DoTrans.cs

     文件       2094  2009-06-09 18:01  网上花店\webserver\App_Code\Service.cs

     文件         84  2004-09-29 18:46  网上花店\webserver\Service.asmx

     文件       1704  2009-06-06 23:46  网上花店\webserver\Web.Config

     文件        727  2009-06-01 22:13  网上花店\wuliu\App_WebReferences\localhost\Service.disco

     文件        588  2009-06-01 22:13  网上花店\wuliu\App_WebReferences\localhost\Service.discomap

     文件       6128  2009-06-01 22:13  网上花店\wuliu\App_WebReferences\localhost\Service.wsdl

     文件        353  2009-06-14 21:36  网上花店\wuliu\order\app.config

     文件      32768  2009-06-15 10:47  网上花店\wuliu\order\bin\Debug\order.exe

     文件        353  2009-06-15 01:03  网上花店\wuliu\order\bin\Debug\order.exe.config

     文件      40448  2009-06-15 10:47  网上花店\wuliu\order\bin\Debug\order.pdb

     文件       5632  2005-11-11 22:25  网上花店\wuliu\order\bin\Debug\order.vshost.exe

     文件        353  2009-06-15 01:03  网上花店\wuliu\order\bin\Debug\order.vshost.exe.config

     文件      32941  2009-06-15 01:03  网上花店\wuliu\order\DataSet1.Designer.cs

     文件          3  2009-06-15 01:03  网上花店\wuliu\order\DataSet1.xsc

     文件       5846  2009-06-15 01:03  网上花店\wuliu\order\DataSet1.xsd

     文件          3  2009-06-15 01:03  网上花店\wuliu\order\DataSet1.xss

     文件       6355  2009-06-15 10:47  网上花店\wuliu\order\Form1.cs

     文件      10466  2009-06-15 01:51  网上花店\wuliu\order\Form1.Designer.cs

     文件       5814  2009-06-15 01:51  网上花店\wuliu\order\Form1.resx

     文件       2275  2009-06-15 01:48  网上花店\wuliu\order\Form2.cs

     文件      13414  2009-06-15 01:48  网上花店\wuliu\order\Form2.Designer.cs

     文件       5814  2009-06-15 01:48  网上花店\wuliu\order\Form2.resx

     文件       1104  2009-06-15 08:43  网上花店\wuliu\order\login.cs

     文件       5788  2009-06-15 08:43  网上花店\wuliu\order\login.Designer.cs

     文件       5814  2009-06-15 08:43  网上花店\wuliu\order\login.resx

     文件        958  2009-06-15 10:47  网上花店\wuliu\order\obj\Debug\order.csproj.GenerateResource.Cache

     文件      32768  2009-06-15 10:47  网上花店\wuliu\order\obj\Debug\order.exe

     文件        180  2009-06-15 10:47  网上花店\wuliu\order\obj\Debug\order.Form1.resources

............此处省略276个文件信息

评论

共有 条评论