Exemplo n.º 1
0
        public DataSet GetAllTransactionDataSources(String StockTransID)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
               Boolean blnTranStarted = false;
               String spName = String.Empty;
               try
               {

               DataSet dsLoad = new DataSet();
               DataSet dsReturn = new DataSet();

               conManager.BeginTransaction();
               blnTranStarted = true;

               spName = String.Format("Exec sprptStorckTransactionAll  @StockTransID = '{0}'", StockTransID);
               conManager.OpenDataSetThroughAdapter(spName, ref dsLoad, true);
               dsLoad.Tables[0].TableName = "sprptStorckTransactionAll";
               dsReturn.Tables.Add(dsLoad.Tables[0].Copy());

               conManager.CommitTransaction();
               blnTranStarted = false;
               return dsReturn;
               }
               catch (Exception ex)
               {
               if (blnTranStarted)
               {
                   conManager.RollBack();
               }
               throw (ex);
               }
        }