//zaki - Insert record and get Scope_Identity()
        public object SaveDataCollectionThroughCollection(Boolean requiredTransaction, String conName, Util.CrudType opMode, IEnumerable saveItem)
        {
            CommandExecutor command;
            Boolean blnBeginTrans = false;

            CustomList<BaseItem> itemNew;

            try
            {

                if (saveItem.IsNull())
                {
                    throw new Exception("Collection not Initialized");
                }

                if (requiredTransaction.IsFalse())
                {
                    if (conName.Length > 0)
                    {
                        OpenConnection(conName);
                    }
                    else
                    {
                        OpenConnection(String.Empty);
                    }
                }

                if (disconnection.IsNotNull())
                {
                    if (requiredTransaction.IsFalse())
                    {
                        transaction = disconnection.BeginTransaction(IsolationLevel.ReadUncommitted);
                        blnBeginTrans = true;
                    }
                    else
                    {
                        if (transaction.IsNull())
                        {
                            throw new Exception("Transaction is not initialized");
                        }
                        blnBeginTrans = true;
                    }
                }
                else
                {
                    throw new Exception("Connection is not initialized");
                }

                CustomList<BaseItem> saveItemBase = saveItem.ToCustomList<BaseItem>();
                itemNew = saveItemBase.GetChanges(ItemState.Added);
                object retVal = null;

                switch (ProviderType)
                {
                    case Util.ConnectionLibrary.SQlClient:
                        command = new CommandExecutor(transaction, ProviderType);
                        if (itemNew.IsNotNull() && itemNew.Count.NotEquals(0))
                        {
                            retVal = command.Insert(itemNew, Util.OperationType.Insert);
                        }
                        break;

                    default: break;
                }

                if (requiredTransaction.IsFalse())
                {
                    if (blnBeginTrans)
                    {
                        transaction.Commit();
                        blnBeginTrans = false;
                    }
                    disconnection.Close();
                    disconnection.Dispose();
                    disconnection = null;
                }

                return retVal;
            }
            catch (OleDbException exOleDb)
            {
                if (blnBeginTrans && requiredTransaction.IsFalse())
                {
                    transaction.Rollback();
                    if (disconnection.IsNotNull())
                    {
                        if (disconnection.State == ConnectionState.Open)
                        {
                            disconnection.Close();
                        }
                        disconnection.Dispose();
                        disconnection = null;
                    }
                }

                throw (exOleDb);
            }
            catch (DBConcurrencyException exDbce)
            {
                if (blnBeginTrans && requiredTransaction.IsFalse())
                {
                    transaction.Rollback();
                    if (disconnection.IsNotNull())
                    {
                        if (disconnection.State == ConnectionState.Open)
                        {
                            disconnection.Close();
                        }
                        disconnection.Dispose();
                        disconnection = null;
                    }
                }
                throw (exDbce);
            }
            catch (Exception ex)
            {
                if (blnBeginTrans && requiredTransaction.IsFalse())
                {
                    transaction.Rollback();
                    if (disconnection.IsNotNull())
                    {
                        if (disconnection.State == ConnectionState.Open)
                        {
                            disconnection.Close();
                        }
                        disconnection.Dispose();
                        disconnection = null;
                    }
                }
                throw (ex);
            }
        }