예제 #1
0
        /// <summary>
        /// 游戏工具 解封用户
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public string GSSTool_SetUserNoLock(string userid)
        {
            string  sql = @"SELECT top 10 F_Name,F_Value FROM T_GameConfig WITH(NOLOCK) where F_ParentID=1000 and F_ValueGame<99 ";
            DataSet dsc = DbHelperSQL.Query(sql);

            if (dsc == null)
            {
                throw (new ApplicationException("没有大区的配置项"));
            }

            string result = string.Empty;

            foreach (DataRow drc in dsc.Tables[0].Rows)
            {
                string url     = drc["F_Value"].ToString();
                string bigzone = drc["F_Name"].ToString();

                if (url.Trim().Length == 0)
                {
                    throw (new ApplicationException("此大区的URL为空:" + bigzone));;
                }
                else
                {
                    ServiceXLJ.ServiceXLJSoapClient webserv = new ServiceXLJ.ServiceXLJSoapClient("ServiceXLJSoap", url);

                    // ServiceXLJ.ServiceXLJSoapClient webserv = new ServiceXLJ.ServiceXLJSoapClient();

                    result += " " + bigzone + " " + webserv.SetUserNoLock(userid);
                }
            }
            return(result);
        }
예제 #2
0
        /// <summary>
        /// 得到游戏用户列表,客服主页用
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public DataSet GSSTool_GetGameUser(string bigzone, string query)
        {
            string  sql = @"SELECT top 1 F_Name,F_Value FROM T_GameConfig WITH(NOLOCK) where F_ParentID=1000 and F_Name='" + bigzone + "'";
            DataSet dsc = DbHelperSQL.Query(sql);

            if (dsc == null)
            {
                throw (new ApplicationException("没有此大区的配置项:" + bigzone));
            }

            string  url = "";
            DataSet ds  = null;

            url = dsc.Tables[0].Rows[0]["F_Value"].ToString();

            if (url.Trim().Length == 0)
            {
                throw (new ApplicationException("此大区的URL为空:" + bigzone));;
            }
            else
            {
                // ServiceXLJ.ServiceXLJSoapClient webserv = new ServiceXLJ.ServiceXLJSoapClient();

                ServiceXLJ.ServiceXLJSoapClient webserv = new ServiceXLJ.ServiceXLJSoapClient("ServiceXLJSoap", url);
                //webserv.Endpoint.Address=(System.ServiceModel.EndpointAddress)url;

                byte[]  bytes  = webserv.GetGameUsersC(query);
                DataSet dstemp = DataSerialize.GetDatasetFromByte(bytes);
                if (dstemp != null)
                {
                    dstemp.Tables[0].Columns.Add("F_BigZoneName", System.Type.GetType("System.String"));
                    foreach (DataRow drt in dstemp.Tables[0].Rows)
                    {
                        drt["F_BigZoneName"] = dsc.Tables[0].Rows[0]["F_Name"].ToString();
                    }
                    if (ds == null)
                    {
                        ds = dstemp.Copy();
                    }
                    else
                    {
                        ds.Tables[0].Merge(dstemp.Tables[0]);
                    }
                }
            }

            return(ds);
        }