/// <summary>
        /// 
        /// </summary>
        /// <param name="objVirtualDealer"></param>
        /// <returns></returns>
        internal string UpdateVirtualDealerInfo(Business.VirtualDealer objVirtualDealer)
        {
            string result = "";
            System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(DBConnection.DBConnection.Connection);
            DSTableAdapters.VirtualDealerTableAdapter virtualDealerAdap = new DSTableAdapters.VirtualDealerTableAdapter();
            DSTableAdapters.VirtualDealerConfigTableAdapter dealerConfigAdap = new DSTableAdapters.VirtualDealerConfigTableAdapter();
            System.Data.SqlClient.SqlTransaction trans = null;
            try
            {
                conn.Open();
                trans = conn.BeginTransaction();

                virtualDealerAdap.Connection = conn;
                virtualDealerAdap.Transaction = trans;
                int resultUpdate = virtualDealerAdap.UpdateVirtualDealer(objVirtualDealer.Name, "", objVirtualDealer.ID);
                result = resultUpdate.ToString();
                if (resultUpdate == 0)
                {
                    throw new Exception("Data error");
                }

                dealerConfigAdap.Connection = conn;
                dealerConfigAdap.Transaction = trans;
                resultUpdate = dealerConfigAdap.DeleteVirtualConfigByVirtualDealerID(objVirtualDealer.ID);
                if (resultUpdate == 0)
                {
                    throw new Exception("Data error");
                }
                DateTime DateValue = DateTime.Parse("1753-01-01 00:00:00.000");
                dealerConfigAdap.Insert(null, "Profit max pip", objVirtualDealer.ID, "VD01", -1, "NaN", objVirtualDealer.ProfitMaxPip.ToString(), DateValue);
                dealerConfigAdap.Insert(null, "Loss max pip", objVirtualDealer.ID, "VD02", -1, "NaN", objVirtualDealer.LossMaxPip.ToString(), DateValue);
                dealerConfigAdap.Insert(null, "Min volume", objVirtualDealer.ID, "VD03", -1, "NaN", objVirtualDealer.StartVolume.ToString(), DateValue);
                dealerConfigAdap.Insert(null, "Max volume", objVirtualDealer.ID, "VD04", -1, "NaN", objVirtualDealer.EndVolume.ToString(), DateValue);
                dealerConfigAdap.Insert(null, "Delay", objVirtualDealer.ID, "VD05", -1, "NaN", objVirtualDealer.Delay.ToString(), DateValue);
                dealerConfigAdap.Insert(null, "Additional pip", objVirtualDealer.ID, "VD06", -1, "NaN", objVirtualDealer.AdditionalPip.ToString(), DateValue);
                dealerConfigAdap.Insert(null, "Mode", objVirtualDealer.ID, "VD07", -1, "NaN", objVirtualDealer.Mode.ToString(), DateValue);
                dealerConfigAdap.Insert(null, "IsEnable", objVirtualDealer.ID, "VD08", objVirtualDealer.IsEnable ? 1 : 0, "NaN", "NaN", DateValue);
                dealerConfigAdap.Insert(null, "IsLimitAuto", objVirtualDealer.ID, "VD09", objVirtualDealer.IsLimitAuto ? 1 : 0, "NaN", "NaN", DateValue);
                dealerConfigAdap.Insert(null, "IsStopAuto", objVirtualDealer.ID, "VD10", objVirtualDealer.IsStopAuto ? 1 : 0, "NaN", "NaN", DateValue);
                dealerConfigAdap.Insert(null, "IsStopSlippage", objVirtualDealer.ID, "VD11", objVirtualDealer.IsStopSlippage ? 1 : 0, "NaN", "NaN", DateValue);
                dealerConfigAdap.Insert(null, "GroupCondition", objVirtualDealer.ID, "VD12", -1, objVirtualDealer.GroupCondition, "NaN", DateValue);
                dealerConfigAdap.Insert(null, "SymbolCodition", objVirtualDealer.ID, "VD13", -1, objVirtualDealer.SymbolCondition, "NaN", DateValue);
                trans.Commit();
            }
            catch (Exception ex)
            {
                trans.Rollback();
                result = "Data error";
            }
            finally
            {
                virtualDealerAdap.Connection.Close();
                dealerConfigAdap.Connection.Close();
                conn.Close();
            }
            return result;
        }