Esempio n. 1
0
        private void RoadForm_Load(object sender, EventArgs e)
        {
            if (SingleApp.AppExist("2571EFFE-7388-4990-AAC3-B645329DDBCE"))
            {
                Application.Exit();
            }

            strParkID = ConfigurationManager.AppSettings.Get("ParkID");

            mainSC     = SynchronizationContext.Current;
            scCallback = new SendOrPostCallback(MainScCallback);

            tcpClient               = new WcfCommonLib.TcpClient();
            tcpClient.QueryEvent   += new WcfCommonLib.TcpClient.QueryEventHandler(tcpClient_QueryEvent);
            tcpClient.MessageEvent += new WcfCommonLib.TcpClient.MessageEventHandler(tcpClient_MessageEvent);

            dataCallback = new WaitCallback(GetUploadData);

            wcfClient = new CenterServiceClient();
            webServer = new SimpleWebSerer();
            webServer.StartServer();
            ConnectServer();

            SetTimer(timerReconnect, "ReconnectTimer");
            SetTimer(timerUploadData, "UploadTimer");

            GetInitializeData();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     int result = 2;
     try
     {
         bool state = bool.Parse(Request["state"]);
         if (ValidLoginIP(Context.Request.UserHostAddress))
         {
             using (CenterServiceClient temp = new CenterServiceClient())
             {
                 if (temp.AASUpdateState(state))
                 {
                     result = 0;
                 }
                 else
                 {
                     result = 1;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         log.Error("ASSUpdateState:", ex);
     }
     Response.Write(result);
 }
Esempio n. 3
0
        public int KitoffUser(int id, string msg)
        {
            int result;

            try
            {
                using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                {
                    if (centerServiceClient.KitoffUser(id, msg))
                    {
                        result = 0;
                    }
                    else
                    {
                        result = 3;
                    }
                }
            }
            catch (Exception exception)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error("KitoffUser", exception);
                }
                result = 1;
            }
            return(result);
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int result = 1;
            try
            {
                if (ValidLoginIP(Context.Request.UserHostAddress))
                {
                    string content = HttpUtility.UrlDecode(Request["content"]); //"Server is maintenance!";

                    if (!string.IsNullOrEmpty(content))
                    {
                        using (CenterServiceClient temp = new CenterServiceClient())
                        {
                            if (temp.SystemNotice(content))
                            {
                                result = 0;
                            }
                        }
                    }
                }
                else
                {
                    result = 2;
                }
            }
            catch (Exception ex)
            {
                log.Error("SystemNotice:", ex);
            }
            Response.Write(result);
        }
Esempio n. 5
0
 public int KitoffUser(int id, string msg)
 {
     try
     {
         using (CenterServiceClient temp = new CenterServiceClient())
         {
             if (temp.KitoffUser(id, msg))
             {
                 return(0);
             }
             else
             {
                 return(3);
             }
         }
     }
     catch (Exception e)
     {
         if (log.IsErrorEnabled)
         {
             log.Error("KitoffUser", e);
         }
         return(1);
     }
 }
Esempio n. 6
0
        public bool SystemNotice(string msg)
        {
            bool result = false;

            try
            {
                if (!string.IsNullOrEmpty(msg))
                {
                    using (CenterServiceClient temp = new CenterServiceClient())
                    {
                        if (temp.SystemNotice(msg))
                        {
                            result = true;
                        }
                    }
                }
            }
            catch (Exception e)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("SystemNotice", e);
                }
            }
            return(result);
        }
        public bool SystemNotice(string msg)
        {
            bool flag = false;

            try
            {
                if (!string.IsNullOrEmpty(msg))
                {
                    using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                    {
                        if (centerServiceClient.SystemNotice(msg))
                        {
                            flag = true;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error((object)"SystemNotice", ex);
                }
            }
            return(flag);
        }
Esempio n. 8
0
        public bool SystemNotice(string msg)
        {
            bool result = false;

            try
            {
                if (!string.IsNullOrEmpty(msg))
                {
                    using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                    {
                        if (centerServiceClient.SystemNotice(msg))
                        {
                            result = true;
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error("SystemNotice", exception);
                }
            }
            return(result);
        }
Esempio n. 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int result = 1;

            try
            {
                if (ValidLoginIP(Context.Request.UserHostAddress))
                {
                    string content = HttpUtility.UrlDecode(Request["content"]); //"Server is maintenance!";

                    if (!string.IsNullOrEmpty(content))
                    {
                        using (CenterServiceClient temp = new CenterServiceClient())
                        {
                            if (temp.SystemNotice(content))
                            {
                                result = 0;
                            }
                        }
                    }
                }
                else
                {
                    result = 2;
                }
            }
            catch (Exception ex)
            {
                log.Error("SystemNotice:", ex);
            }
            Response.Write(result);
        }
Esempio n. 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int result = 2;

            try
            {
                bool state = bool.Parse(Request["state"]);
                if (ValidLoginIP(Context.Request.UserHostAddress))
                {
                    using (CenterServiceClient temp = new CenterServiceClient())
                    {
                        if (temp.AASUpdateState(state))
                        {
                            result = 0;
                        }
                        else
                        {
                            result = 1;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error("ASSUpdateState:", ex);
            }
            Response.Write(result);
        }
Esempio n. 11
0
        public virtual PlayerInfo CreateLogin(string name, string password, ref string message, ref int isFirst, string IP, ref bool isError, bool firstValidate, ref bool isActive, string site, string nickname)
        {
            try
            {
                using (PlayerBussiness playerBussiness = new PlayerBussiness())
                {
                    bool       flag       = true;
                    DateTime   now        = DateTime.Now;
                    PlayerInfo playerInfo = playerBussiness.LoginGame(name, ref isFirst, ref flag, ref isError, firstValidate, ref now, nickname, IP);
                    if (playerInfo == null)
                    {
                        if (!playerBussiness.ActivePlayer(ref playerInfo, name, password, true, this.ActiveGold, this.ActiveMoney, IP, site))
                        {
                            playerInfo = null;
                            message    = LanguageMgr.GetTranslation("BaseInterface.LoginAndUpdate.Fail", new object[0]);
                            goto IL_11B;
                        }
                        isActive = true;
                        using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                        {
                            centerServiceClient.ActivePlayer(true);
                            goto IL_11B;
                        }
                    }
                    if (flag)
                    {
                        using (CenterServiceClient centerServiceClient2 = new CenterServiceClient())
                        {
                            centerServiceClient2.CreatePlayer(playerInfo.ID, name, password, isFirst == 0);
                            goto IL_11B;
                        }
                    }
                    message = LanguageMgr.GetTranslation("ManageBussiness.Forbid1", new object[]
                    {
                        now.Year,
                        now.Month,
                        now.Day,
                        now.Hour,
                        now.Minute
                    });
                    PlayerInfo result = null;
                    return(result);

IL_11B:
                    result = playerInfo;
                    return(result);
                }
            }
            catch (Exception exception)
            {
                BaseInterface.log.Error("LoginAndUpdate", exception);
            }
            return(null);
        }
Esempio n. 12
0
 public virtual PlayerInfo CreateLogin(string name, string password, ref string message, ref int isFirst, string IP, ref bool isError, bool firstValidate, ref bool isActive, string site, string nickname)
 {
     try
     {
         using (PlayerBussiness db = new PlayerBussiness())
         {
             bool       isExist    = true;
             DateTime   forbidDate = DateTime.Now;
             PlayerInfo info       = db.LoginGame(name, ref isFirst, ref isExist, ref isError, firstValidate, ref forbidDate, nickname);
             if (info == null)
             {
                 if (!db.ActivePlayer(ref info, name, password, true, ActiveGold, ActiveMoney, IP, site))
                 {
                     info = null;
                     // message = "Active is fail!";
                     message = LanguageMgr.GetTranslation("BaseInterface.LoginAndUpdate.Fail");
                 }
                 else
                 {
                     isActive = true;
                     using (CenterServiceClient client = new CenterServiceClient())
                     {
                         client.ActivePlayer(true);
                     }
                 }
             }
             else
             {
                 if (isExist)
                 {
                     using (CenterServiceClient client = new CenterServiceClient())
                     {
                         client.CreatePlayer(info.ID, name, password, isFirst == 0);
                     }
                 }
                 else
                 {
                     message = LanguageMgr.GetTranslation("ManageBussiness.Forbid1", forbidDate.Year, forbidDate.Month, forbidDate.Day, forbidDate.Hour, forbidDate.Minute);
                     return(null);
                 }
             }
             return(info);
         }
     }
     catch (Exception ex)
     {
         log.Error("LoginAndUpdate", ex);
     }
     return(null);
 }
Esempio n. 13
0
 public int GetConfigState(int type)
 {
     int result = 2;
     try
     {
         using (CenterServiceClient temp = new CenterServiceClient())
         {
             return temp.GetConfigState(type);
         }
     }
     catch (Exception e)
     {
         if (log.IsErrorEnabled)
             log.Error("GetConfigState", e);
     }
     return result;
 }
Esempio n. 14
0
        public void ProcessRequest(HttpContext context)
        {
            bool   value   = false;
            string message = "Fail!";
            int    total   = 0;

            XElement result = new XElement("Result");

            try
            {
                using (CenterServiceClient temp = new CenterServiceClient())
                {
                    IList <ServerData> list = temp.GetServerList();

                    foreach (ServerData s in list)

                    {
                        if (s.State == -1)
                        {
                            continue;
                        }
                        s.Online += 5;
                        total    += s.Online;
                        result.Add(Road.Flash.FlashUtils.CreateServerInfo(s.Id, s.Name, s.Ip, s.Port, s.State, s.MustLevel, s.LowestLevel, s.Online));
                    }
                }

                value   = true;
                message = "Success!";
            }
            catch (Exception ex)
            {
                log.Error("Load server list error:", ex);
            }


            result.Add(new XAttribute("value", value));
            result.Add(new XAttribute("message", message));
            result.Add(new XAttribute("total", total));
            //agentId="318" AreaName="gn8"
            result.Add(new XAttribute("agentId", 303));
            result.Add(new XAttribute("AreaName", "gn"));
            context.Response.ContentType = "text/plain";
            context.Response.Write(result.ToString(false));
        }
Esempio n. 15
0
        public bool Reload(string type)
        {
            bool flag = false;

            try
            {
                using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                    return(centerServiceClient.Reload(type));
            }
            catch (Exception ex)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error((object)"Reload", ex);
                }
            }
            return(flag);
        }
Esempio n. 16
0
        public int GetConfigState(int type)
        {
            int num = 2;

            try
            {
                using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                    return(centerServiceClient.GetConfigState(type));
            }
            catch (Exception ex)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error((object)"GetConfigState", ex);
                }
            }
            return(num);
        }
Esempio n. 17
0
        public bool UpdateConfigState(int type, bool state)
        {
            bool flag = false;

            try
            {
                using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                    return(centerServiceClient.UpdateConfigState(type, state));
            }
            catch (Exception ex)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error((object)"UpdateConfigState", ex);
                }
            }
            return(flag);
        }
Esempio n. 18
0
 public int KitoffUser(int id, string msg)
 {
     try
     {
         using (CenterServiceClient temp = new CenterServiceClient())
         {
             if (temp.KitoffUser(id, msg))
                 return 0;
             else
                 return 3;
         }
     }
     catch (Exception e)
     {
         if (log.IsErrorEnabled)
             log.Error("KitoffUser", e);
         return 1;
     }
 }
Esempio n. 19
0
        public int KitoffUser(int id, string msg)
        {
            int num;

            try
            {
                using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                    num = !centerServiceClient.KitoffUser(id, msg) ? 3 : 0;
            }
            catch (Exception ex)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error((object)"KitoffUser", ex);
                }
                num = 1;
            }
            return(num);
        }
Esempio n. 20
0
 public virtual PlayerInfo CreateLogin(string name, string password, ref string message, ref int isFirst, string IP, ref bool isError, bool firstValidate, ref bool isActive, string site, string nickname)
 {
     try
     {
         using (PlayerBussiness playerBussiness = new PlayerBussiness())
         {
             bool       isExist = true;
             DateTime   now     = DateTime.Now;
             PlayerInfo player  = playerBussiness.LoginGame(name, ref isFirst, ref isExist, ref isError, firstValidate, ref now, nickname, IP);
             if (player == null)
             {
                 if (!playerBussiness.ActivePlayer(ref player, name, password, true, this.ActiveGold, this.ActiveMoney, IP, site))
                 {
                     player  = (PlayerInfo)null;
                     message = LanguageMgr.GetTranslation("BaseInterface.LoginAndUpdate.Fail", new object[0]);
                 }
                 else
                 {
                     isActive = true;
                     using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                         centerServiceClient.ActivePlayer(true);
                 }
             }
             else if (isExist)
             {
                 using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                     centerServiceClient.CreatePlayer(player.ID, name, password, isFirst == 0);
             }
             else
             {
                 message = LanguageMgr.GetTranslation("ManageBussiness.Forbid1", (object)now.Year, (object)now.Month, (object)now.Day, (object)now.Hour, (object)now.Minute);
                 return((PlayerInfo)null);
             }
             return(player);
         }
     }
     catch (Exception ex)
     {
         BaseInterface.log.Error((object)"LoginAndUpdate", ex);
     }
     return((PlayerInfo)null);
 }
Esempio n. 21
0
        public void ProcessRequest(HttpContext context)
        {
            bool value = false;
            string message = "Fail!";
            int total = 0;

            XElement result = new XElement("Result");

            try
            {
                using (CenterServiceClient temp = new CenterServiceClient())
                {
                    IList<ServerData> list = temp.GetServerList();

                    foreach (ServerData s in list)

                    {
                        if (s.State == -1)
                            continue;
                        s.Online += 5;
                        total += s.Online;
                        result.Add(Road.Flash.FlashUtils.CreateServerInfo(s.Id, s.Name, s.Ip, s.Port, s.State, s.MustLevel, s.LowestLevel,s.Online));
                    }
                }

                value = true;
                message = "Success!";
            }
            catch(Exception ex)
            {
                log.Error("Load server list error:",ex);
            }

            result.Add(new XAttribute("value", value));
            result.Add(new XAttribute("message", message));
            result.Add(new XAttribute("total", total));
            //agentId="318" AreaName="gn8"
            result.Add(new XAttribute("agentId", 303));
            result.Add(new XAttribute("AreaName", "gn"));
            context.Response.ContentType = "text/plain";
            context.Response.Write(result.ToString(false));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            int result = 2;
            try
            {
                int serverID = int.Parse(Context.Request["serverID"]);
                int type = int.Parse(Context.Request["type"]);

                if (ValidLoginIP(Context.Request.UserHostAddress))
                {
                    using (CenterServiceClient temp = new CenterServiceClient())
                    {
                        result = temp.NoticeServerUpdate(serverID, type);
                    }

                    switch (type)
                    {
                        case (int)eReloadType.mapserver:
                            //serverID = param1
                            if (result == 0)
                            {
                                result = HandleServerMapUpdate();
                            }
                            break;
                        default:
                            break;
                    }
                }
                else
                {
                    result = 5;
                }


            }
            catch (Exception ex)
            {
                log.Error("ExperienceRateUpdate:", ex);
                result = 4;
            }
            Response.Write(result);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            int result = 2;

            try
            {
                int serverID = int.Parse(Context.Request["serverID"]);
                int type     = int.Parse(Context.Request["type"]);

                if (ValidLoginIP(Context.Request.UserHostAddress))
                {
                    using (CenterServiceClient temp = new CenterServiceClient())
                    {
                        result = temp.NoticeServerUpdate(serverID, type);
                    }

                    switch (type)
                    {
                    case (int)eReloadType.mapserver:
                        //serverID = param1
                        if (result == 0)
                        {
                            result = HandleServerMapUpdate();
                        }
                        break;

                    default:
                        break;
                    }
                }
                else
                {
                    result = 5;
                }
            }
            catch (Exception ex)
            {
                log.Error("ExperienceRateUpdate:", ex);
                result = 4;
            }
            Response.Write(result);
        }
Esempio n. 24
0
        public int GetConfigState(int type)
        {
            int result = 2;

            try
            {
                using (CenterServiceClient temp = new CenterServiceClient())
                {
                    return(temp.GetConfigState(type));
                }
            }
            catch (Exception e)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("GetConfigState", e);
                }
            }
            return(result);
        }
Esempio n. 25
0
        public bool UpdateConfigState(int type, bool state)
        {
            bool result = false;

            try
            {
                using (CenterServiceClient temp = new CenterServiceClient())
                {
                    return(temp.UpdateConfigState(type, state));
                }
            }
            catch (Exception e)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("UpdateConfigState", e);
                }
            }
            return(result);
        }
Esempio n. 26
0
        public bool Reload(string type)
        {
            bool result = false;

            try
            {
                using (CenterServiceClient temp = new CenterServiceClient())
                {
                    return(temp.Reload(type));
                }
            }
            catch (Exception e)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("Reload", e);
                }
            }
            return(result);
        }
Esempio n. 27
0
        public bool Reload(string type)
        {
            bool result = false;

            try
            {
                using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                {
                    return(centerServiceClient.Reload(type));
                }
            }
            catch (Exception exception)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error("Reload", exception);
                }
            }
            return(result);
        }
Esempio n. 28
0
        public bool UpdateConfigState(int type, bool state)
        {
            bool result = false;

            try
            {
                using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                {
                    return(centerServiceClient.UpdateConfigState(type, state));
                }
            }
            catch (Exception exception)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error("UpdateConfigState", exception);
                }
            }
            return(result);
        }
Esempio n. 29
0
        public int GetConfigState(int type)
        {
            int result = 2;

            try
            {
                using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                {
                    return(centerServiceClient.GetConfigState(type));
                }
            }
            catch (Exception exception)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error("GetConfigState", exception);
                }
            }
            return(result);
        }
Esempio n. 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int result = 2;

            try
            {
                if (ValidLoginIP(Context.Request.UserHostAddress))
                {
                    using (CenterServiceClient temp = new CenterServiceClient())
                    {
                        result = temp.AASGetState();
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error("ASSGetState:", ex);
            }
            Response.Write(result);
        }
Esempio n. 31
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int result = 2;
            try
            {
                if (ValidLoginIP(Context.Request.UserHostAddress))
                {
                    using (CenterServiceClient temp = new CenterServiceClient())
                    {
                        result = temp.AASGetState();
                    }

                }
            }
            catch (Exception ex)
            {
                log.Error("ASSGetState:", ex);
            }
            Response.Write(result);
        }
Esempio n. 32
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int result = 2;

            try
            {
                int serverId = int.Parse(Context.Request["serverId"]);
                if (ValidLoginIP(Context.Request.UserHostAddress))
                {
                    using (CenterServiceClient temp = new CenterServiceClient())
                    {
                        result = temp.ExperienceRateUpdate(serverId);
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error("ExperienceRateUpdate:", ex);
            }
            Response.Write(result);
        }
Esempio n. 33
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int result = 2;
            try
            {
                int serverId = int.Parse(Context.Request["serverId"]);
                if (ValidLoginIP(Context.Request.UserHostAddress))
                {
                    using (CenterServiceClient temp = new CenterServiceClient())
                    {
                        result = temp.ExperienceRateUpdate(serverId);
                    }

                }
            }
            catch (Exception ex)
            {
                log.Error("ExperienceRateUpdate:", ex);
            }
            Response.Write(result);
        }
Esempio n. 34
0
        public bool ReLoadServerList()
        {
            bool flag = false;

            try
            {
                using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                {
                    if (centerServiceClient.ReLoadServerList())
                    {
                        flag = true;
                    }
                }
            }
            catch (Exception ex)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error((object)"ReLoadServerList", ex);
                }
            }
            return(flag);
        }
Esempio n. 35
0
 public virtual PlayerInfo LoginGame(string name, string pass, ref bool isFirst)
 {
     try
     {
         using (CenterServiceClient centerServiceClient = new CenterServiceClient())
         {
             int iD = 0;
             if (centerServiceClient.ValidateLoginAndGetID(name, pass, ref iD, ref isFirst))
             {
                 return(new PlayerInfo
                 {
                     ID = iD,
                     UserName = name
                 });
             }
         }
     }
     catch (Exception exception)
     {
         BaseInterface.log.Error("LoginGame", exception);
     }
     return(null);
 }
Esempio n. 36
0
        public bool ReLoadServerList()
        {
            bool result = false;

            try
            {
                using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                {
                    if (centerServiceClient.ReLoadServerList())
                    {
                        result = true;
                    }
                }
            }
            catch (Exception exception)
            {
                if (BaseBussiness.log.IsErrorEnabled)
                {
                    BaseBussiness.log.Error("ReLoadServerList", exception);
                }
            }
            return(result);
        }
Esempio n. 37
0
        public bool ReLoadServerList()
        {
            bool result = false;

            try
            {
                using (CenterServiceClient temp = new CenterServiceClient())
                {
                    if (temp.ReLoadServerList())
                    {
                        result = true;
                    }
                }
            }
            catch (Exception e)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("ReLoadServerList", e);
                }
            }
            return(result);
        }
Esempio n. 38
0
 public bool SystemNotice(string msg)
 {
     bool  result = false;
     try
     {
         if (!string.IsNullOrEmpty(msg))
         {
             using (CenterServiceClient temp = new CenterServiceClient())
             {
                 if (temp.SystemNotice(msg))
                 {
                     result = true;
                 }
             }
         }
     }
     catch (Exception e)
     {
         if (log.IsErrorEnabled)
             log.Error("SystemNotice", e);
     }
     return result;
 }
Esempio n. 39
0
        public virtual PlayerInfo LoginGame(string name, string pass, ref bool isFirst)
        {
            try
            {
                using (CenterServiceClient client = new CenterServiceClient())
                {
                    int userID = 0;
                    if (client.ValidateLoginAndGetID(name, pass, ref userID, ref isFirst))
                    {
                        PlayerInfo player = new PlayerInfo();
                        player.ID       = userID;
                        player.UserName = name;
                        return(player);
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error("LoginGame", ex);
            }

            return(null);
        }
Esempio n. 40
0
        public virtual PlayerInfo LoginGame(string name, string pass, ref bool isFirst)
        {
            try
            {
                using (CenterServiceClient client = new CenterServiceClient())
                {
                    int userID = 0;
                    if (client.ValidateLoginAndGetID(name, pass, ref userID, ref isFirst))
                    {
                        PlayerInfo player = new PlayerInfo();
                        player.ID = userID;
                        player.UserName = name;
                        return player;
                    }
                }

            }
            catch (Exception ex)
            {
                log.Error("LoginGame", ex);
            }

            return null;
        }
Esempio n. 41
0
        public virtual PlayerInfo CreateLogin(string name, string password, ref string message, ref int isFirst, string IP, ref bool isError, bool firstValidate, ref bool isActive, string site, string nickname)
        {
            try
            {
                using (PlayerBussiness db = new PlayerBussiness())
                {
                    bool isExist = true;
                    DateTime forbidDate = DateTime.Now;
                    PlayerInfo info = db.LoginGame(name, ref isFirst, ref isExist, ref isError, firstValidate, ref forbidDate, nickname);
                    if (info == null)
                    {
                        if (!db.ActivePlayer(ref info, name, password, true, ActiveGold, ActiveMoney, IP, site))
                        {
                            info = null;
                            // message = "Active is fail!";
                            message = LanguageMgr.GetTranslation("BaseInterface.LoginAndUpdate.Fail");
                        }
                        else
                        {
                            isActive = true;
                            using (CenterServiceClient client = new CenterServiceClient())
                            {
                                client.ActivePlayer(true);
                            }
                        }
                    }
                    else
                    {
                        if (isExist)
                        {
                            using (CenterServiceClient client = new CenterServiceClient())
                            {
                                client.CreatePlayer(info.ID, name, password, isFirst == 0);
                            }
                        }
                        else
                        {
                            message = LanguageMgr.GetTranslation("ManageBussiness.Forbid1", forbidDate.Year, forbidDate.Month, forbidDate.Day, forbidDate.Hour, forbidDate.Minute);
                            return null;
                        }
                    }
                    return info;
                }

            }
            catch (Exception ex)
            {
                log.Error("LoginAndUpdate", ex);
            }
            return null;
        }
Esempio n. 42
0
 public bool Reload(string type)
 {
     bool result = false;
     try
     {
         using (CenterServiceClient temp = new CenterServiceClient())
         {
             return temp.Reload(type);
         }
     }
     catch (Exception e)
     {
         if (log.IsErrorEnabled)
             log.Error("Reload", e);
     }
     return result;
 }
Esempio n. 43
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = Request["id"] == null ? -1 : int.Parse(Request["id"]);
            if (infos == null || date.AddMinutes(5).CompareTo(DateTime.Now) < 0)
            {
                bool value = false;
                string message = "Fail!";
                int total = 0;

                XElement result = new XElement("Result");

                try
                {
                    using (CenterServiceClient temp = new CenterServiceClient())
                    {
                        infos = temp.GetServerList();
                        date = DateTime.Now;
                    }

                    foreach (ServerData s in infos)
                    {
                        if (s.State == -1)
                            continue;

                        total += s.Online;
                        result.Add(Road.Flash.FlashUtils.CreateServerInfo(s.Id, s.Name, s.Ip, s.Port, s.State, s.MustLevel, s.LowestLevel, s.Online));
                    }

                    value = true;
                    message = "Success!";
                }
                catch (Exception ex)
                {
                    log.Error("ServerList1 error:", ex);
                }

                OnlineTotal = total;
                result.Add(new XAttribute("value", value));
                result.Add(new XAttribute("message", message));
                result.Add(new XAttribute("total", total));
                result.Add(new XAttribute("agentId", 303));
                result.Add(new XAttribute("AreaName", "gn6"));
                //agentId="303" AreaName="gn6"
                xml = result.ToString(false);

            }

            string query = "0";
            if (id == 0)
            {
                query = OnlineTotal.ToString();
            }
            else if (id > 0)
            {
                foreach (ServerData info in infos)
                {
                    if (info.Id == id)
                    {
                        query = info.Online.ToString();
                        break;
                    }
                }
            }
            else
            {
                query = xml;
            }

            Response.Write(query);

            //Response.Write(result.ToString(false));
        }
Esempio n. 44
0
 public int SendMailAndItem(string title, string content, int userID, int gold, int money, string param)
 {
     int num = 1;
     try
     {
         SqlParameter[] SqlParameters = new SqlParameter[8]
     {
       new SqlParameter("@Title", (object) title),
       new SqlParameter("@Content", (object) content),
       new SqlParameter("@UserID", (object) userID),
       new SqlParameter("@Gold", (object) gold),
       new SqlParameter("@Money", (object) money),
       new SqlParameter("@GiftToken", SqlDbType.BigInt),
       new SqlParameter("@Param", (object) param),
       new SqlParameter("@Result", SqlDbType.Int)
     };
         SqlParameters[7].Direction = ParameterDirection.ReturnValue;
         this.db.RunProcedure("SP_Admin_SendAllItem", SqlParameters);
         num = (int)SqlParameters[7].Value;
         if (num == 0)
         {
             using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                 centerServiceClient.MailNotice(userID);
         }
     }
     catch (Exception ex)
     {
         if (BaseBussiness.log.IsErrorEnabled)
             BaseBussiness.log.Error((object)"Init", ex);
     }
     return num;
 }
Esempio n. 45
0
 public bool ReLoadServerList()
 {
     bool result = false;
     try
     {
         using (CenterServiceClient temp = new CenterServiceClient())
         {
             if (temp.ReLoadServerList())
             {
                 result = true;
             }
         }
     }
     catch (Exception e)
     {
         if (log.IsErrorEnabled)
             log.Error("ReLoadServerList", e);
     }
     return result;
 }
Esempio n. 46
0
        public int SendMailAndItem(string title, string content, int userID, int gold, int money, string param)
        {
            bool result = false;
            int returnValue = 1;
            try
            {

                //SP_Admin_SendAllItem 'kenken','kenken',17,100,200,'11020,4,0,0,0,0,0,0,1|7014,2,9,400,400,400,400,400,0'
                SqlParameter[] para = new SqlParameter[8];
                //物品
                para[0] = new SqlParameter("@Title", title);
                para[1] = new SqlParameter("@Content", content);
                para[2] = new SqlParameter("@UserID", userID);
                para[3] = new SqlParameter("@Gold", gold);
                para[4] = new SqlParameter("@Money", money);
                para[5] = new SqlParameter("@GiftToken", 0);
                para[6] = new SqlParameter("@Param", param);
                para[7] = new SqlParameter("@Result", System.Data.SqlDbType.Int);
                para[7].Direction = ParameterDirection.ReturnValue;

                result = db.RunProcedure("SP_Admin_SendAllItem", para);
                returnValue = (int)para[7].Value;
                result = returnValue == 0;

                if (result)
                {
                    using (CenterServiceClient client = new CenterServiceClient())
                    {
                        client.MailNotice(userID);
                    }
                }

            }
            catch (Exception e)
            {
                if (log.IsErrorEnabled)
                    log.Error("Init", e);
            }
            finally
            {
            }
            return returnValue;
        }
Esempio n. 47
0
        public bool SendMail(MailInfo mail)
        {
            bool result = false;
            try
            {
                SqlParameter[] para = new SqlParameter[29];
                para[0] = new SqlParameter("@ID", mail.ID);
                para[0].Direction = ParameterDirection.Output;
                para[1] = new SqlParameter("@Annex1", mail.Annex1 == null ? "" : mail.Annex1);
                para[2] = new SqlParameter("@Annex2", mail.Annex2 == null ? "" : mail.Annex2);
                para[3] = new SqlParameter("@Content", mail.Content == null ? "" : mail.Content);
                para[4] = new SqlParameter("@Gold", mail.Gold);
                para[5] = new SqlParameter("@IsExist", true);
                para[6] = new SqlParameter("@Money", mail.Money);
                para[7] = new SqlParameter("@Receiver", mail.Receiver == null ? "" : mail.Receiver);
                para[8] = new SqlParameter("@ReceiverID", mail.ReceiverID);
                para[9] = new SqlParameter("@Sender", mail.Sender == null ? "" : mail.Sender);
                para[10] = new SqlParameter("@SenderID", mail.SenderID);
                para[11] = new SqlParameter("@Title", mail.Title == null ? "" : mail.Title);
                para[12] = new SqlParameter("@IfDelS", false);
                para[13] = new SqlParameter("@IsDelete", false);
                para[14] = new SqlParameter("@IsDelR", false);
                para[15] = new SqlParameter("@IsRead", false);
                para[16] = new SqlParameter("@SendTime", DateTime.Now);
                para[17] = new SqlParameter("@Type", mail.Type);
                para[18] = new SqlParameter("@Annex1Name", mail.Annex1Name == null ? "" : mail.Annex1Name);
                para[19] = new SqlParameter("@Annex2Name", mail.Annex2Name == null ? "" : mail.Annex2Name);
                para[20] = new SqlParameter("@Annex3", mail.Annex3 == null ? "" : mail.Annex3);
                para[21] = new SqlParameter("@Annex4", mail.Annex4 == null ? "" : mail.Annex4);
                para[22] = new SqlParameter("@Annex5", mail.Annex5 == null ? "" : mail.Annex5);
                para[23] = new SqlParameter("@Annex3Name", mail.Annex3Name == null ? "" : mail.Annex3Name);
                para[24] = new SqlParameter("@Annex4Name", mail.Annex4Name == null ? "" : mail.Annex4Name);
                para[25] = new SqlParameter("@Annex5Name", mail.Annex5Name == null ? "" : mail.Annex5Name);
                para[26] = new SqlParameter("@ValidDate", mail.ValidDate);
                para[27] = new SqlParameter("@AnnexRemark", mail.AnnexRemark == null ? "" : mail.AnnexRemark);
                para[28] = new SqlParameter("GiftToken", mail.GiftToken);
        //        @ID = @ID OUTPUT,
                result = db.RunProcedure("SP_Mail_Send", para);
                mail.ID = (int)para[0].Value;
                using (CenterServiceClient client = new CenterServiceClient())
                {
                    client.MailNotice(mail.ReceiverID);
                }
            }
            catch (Exception e)
            {
                if (log.IsErrorEnabled)
                    log.Error("Init", e);
            }
            finally
            {
            }
            return result;

        }
Esempio n. 48
0
        public bool SendMailAndItem(MailInfo mail, ItemInfo item, ref int returnValue)
        {
            bool result = false;
            try
            {

                SqlParameter[] para = new SqlParameter[34];
                //物品
                para[0] = new SqlParameter("@ItemID", item.ItemID);
                para[1] = new SqlParameter("@UserID", item.UserID);
                para[2] = new SqlParameter("@TemplateID", item.TemplateID);
                para[3] = new SqlParameter("@Place", item.Place);
                para[4] = new SqlParameter("@AgilityCompose", item.AgilityCompose);
                para[5] = new SqlParameter("@AttackCompose", item.AttackCompose);
                para[6] = new SqlParameter("@BeginDate", item.BeginDate);
                para[7] = new SqlParameter("@Color", item.Color == null ? "" : item.Color);
                para[8] = new SqlParameter("@Count", item.Count);
                para[9] = new SqlParameter("@DefendCompose", item.DefendCompose);
                para[10] = new SqlParameter("@IsBinds", item.IsBinds);
                para[11] = new SqlParameter("@IsExist", item.IsExist);
                para[12] = new SqlParameter("@IsJudge", item.IsJudge);
                para[13] = new SqlParameter("@LuckCompose", item.LuckCompose);
                para[14] = new SqlParameter("@StrengthenLevel", item.StrengthenLevel);
                para[15] = new SqlParameter("@ValidDate", item.ValidDate);
                para[16] = new SqlParameter("@BagType", item.BagType);
                //信箱
                para[17] = new SqlParameter("@ID", mail.ID);
                para[17].Direction = ParameterDirection.Output;
                para[18] = new SqlParameter("@Annex1", mail.Annex1 == null ? "" : mail.Annex1);
                para[19] = new SqlParameter("@Annex2", mail.Annex2 == null ? "" : mail.Annex2);
                para[20] = new SqlParameter("@Content", mail.Content == null ? "" : mail.Content);
                para[21] = new SqlParameter("@Gold", mail.Gold);
                para[22] = new SqlParameter("@Money", mail.Money);
                para[23] = new SqlParameter("@Receiver", mail.Receiver == null ? "" : mail.Receiver);
                para[24] = new SqlParameter("@ReceiverID", mail.ReceiverID);
                para[25] = new SqlParameter("@Sender", mail.Sender == null ? "" : mail.Sender);
                para[26] = new SqlParameter("@SenderID", mail.SenderID);
                para[27] = new SqlParameter("@Title", mail.Title == null ? "" : mail.Title);
                para[28] = new SqlParameter("@IfDelS", false);
                para[29] = new SqlParameter("@IsDelete", false);
                para[30] = new SqlParameter("@IsDelR", false);
                para[31] = new SqlParameter("@IsRead", false);
                para[32] = new SqlParameter("@SendTime", DateTime.Now);
                para[33] = new SqlParameter("@Result", System.Data.SqlDbType.Int);
                para[33].Direction = ParameterDirection.ReturnValue;

                result = db.RunProcedure("SP_Admin_SendUserItem", para);
                returnValue = (int)para[33].Value;
                result = returnValue == 0;

                if (result)
                {
                    using (CenterServiceClient client = new CenterServiceClient())
                    {
                        client.MailNotice(mail.ReceiverID);
                    }
                }

            }
            catch (Exception e)
            {
                if (log.IsErrorEnabled)
                    log.Error("Init", e);
            }
            finally
            {
            }
            return result;
        }
Esempio n. 49
0
 public bool SendMail(MailInfo mail)
 {
     bool flag = false;
     try
     {
         SqlParameter[] SqlParameters = new SqlParameter[29];
         SqlParameters[0] = new SqlParameter("@ID", (object)mail.ID);
         SqlParameters[0].Direction = ParameterDirection.Output;
         SqlParameters[1] = new SqlParameter("@Annex1", mail.Annex1 == null ? (object)"" : (object)mail.Annex1);
         SqlParameters[2] = new SqlParameter("@Annex2", mail.Annex2 == null ? (object)"" : (object)mail.Annex2);
         SqlParameters[3] = new SqlParameter("@Content", mail.Content == null ? (object)"" : (object)mail.Content);
         SqlParameters[4] = new SqlParameter("@Gold", (object)mail.Gold);
         SqlParameters[5] = new SqlParameter("@IsExist", (object)true);
         SqlParameters[6] = new SqlParameter("@Money", (object)mail.Money);
         SqlParameters[7] = new SqlParameter("@Receiver", mail.Receiver == null ? (object)"" : (object)mail.Receiver);
         SqlParameters[8] = new SqlParameter("@ReceiverID", (object)mail.ReceiverID);
         SqlParameters[9] = new SqlParameter("@Sender", mail.Sender == null ? (object)"" : (object)mail.Sender);
         SqlParameters[10] = new SqlParameter("@SenderID", (object)mail.SenderID);
         SqlParameters[11] = new SqlParameter("@Title", mail.Title == null ? (object)"" : (object)mail.Title);
         SqlParameters[12] = new SqlParameter("@IfDelS", (object)false);
         SqlParameters[13] = new SqlParameter("@IsDelete", (object)false);
         SqlParameters[14] = new SqlParameter("@IsDelR", (object)false);
         SqlParameters[15] = new SqlParameter("@IsRead", (object)false);
         SqlParameters[16] = new SqlParameter("@SendTime", (object)DateTime.Now);
         SqlParameters[17] = new SqlParameter("@Type", (object)mail.Type);
         SqlParameters[18] = new SqlParameter("@Annex1Name", mail.Annex1Name == null ? (object)"" : (object)mail.Annex1Name);
         SqlParameters[19] = new SqlParameter("@Annex2Name", mail.Annex2Name == null ? (object)"" : (object)mail.Annex2Name);
         SqlParameters[20] = new SqlParameter("@Annex3", mail.Annex3 == null ? (object)"" : (object)mail.Annex3);
         SqlParameters[21] = new SqlParameter("@Annex4", mail.Annex4 == null ? (object)"" : (object)mail.Annex4);
         SqlParameters[22] = new SqlParameter("@Annex5", mail.Annex5 == null ? (object)"" : (object)mail.Annex5);
         SqlParameters[23] = new SqlParameter("@Annex3Name", mail.Annex3Name == null ? (object)"" : (object)mail.Annex3Name);
         SqlParameters[24] = new SqlParameter("@Annex4Name", mail.Annex4Name == null ? (object)"" : (object)mail.Annex4Name);
         SqlParameters[25] = new SqlParameter("@Annex5Name", mail.Annex5Name == null ? (object)"" : (object)mail.Annex5Name);
         SqlParameters[26] = new SqlParameter("@ValidDate", (object)mail.ValidDate);
         SqlParameters[27] = new SqlParameter("@AnnexRemark", mail.AnnexRemark == null ? (object)"" : (object)mail.AnnexRemark);
         SqlParameters[28] = new SqlParameter("GiftToken", (object)mail.GiftToken);
         flag = this.db.RunProcedure("SP_Mail_Send", SqlParameters);
         mail.ID = (int)SqlParameters[0].Value;
         using (CenterServiceClient centerServiceClient = new CenterServiceClient())
             centerServiceClient.MailNotice(mail.ReceiverID);
     }
     catch (Exception ex)
     {
         if (BaseBussiness.log.IsErrorEnabled)
             BaseBussiness.log.Error((object)"Init", ex);
     }
     return flag;
 }
Esempio n. 50
0
 public bool SendMailAndItem(MailInfo mail, SqlDataProvider.Data.ItemInfo item, ref int returnValue)
 {
     bool flag = false;
     try
     {
         SqlParameter[] SqlParameters = new SqlParameter[34]
     {
       new SqlParameter("@ItemID", (object) item.ItemID),
       new SqlParameter("@UserID", (object) item.UserID),
       new SqlParameter("@TemplateID", (object) item.TemplateID),
       new SqlParameter("@Place", (object) item.Place),
       new SqlParameter("@AgilityCompose", (object) item.AgilityCompose),
       new SqlParameter("@AttackCompose", (object) item.AttackCompose),
       new SqlParameter("@BeginDate", (object) item.BeginDate),
       new SqlParameter("@Color", item.Color == null ? (object) "" : (object) item.Color),
       new SqlParameter("@Count", (object) item.Count),
       new SqlParameter("@DefendCompose", (object) item.DefendCompose),
       new SqlParameter("@IsBinds", (object) (int) (item.IsBinds ? 1 : 0)),
       new SqlParameter("@IsExist", (object) (int) (item.IsExist ? 1 : 0)),
       new SqlParameter("@IsJudge", (object) (int) (item.IsJudge ? 1 : 0)),
       new SqlParameter("@LuckCompose", (object) item.LuckCompose),
       new SqlParameter("@StrengthenLevel", (object) item.StrengthenLevel),
       new SqlParameter("@ValidDate", (object) item.ValidDate),
       new SqlParameter("@BagType", (object) item.BagType),
       new SqlParameter("@ID", (object) mail.ID),
       null,
       null,
       null,
       null,
       null,
       null,
       null,
       null,
       null,
       null,
       null,
       null,
       null,
       null,
       null,
       null
     };
         SqlParameters[17].Direction = ParameterDirection.Output;
         SqlParameters[18] = new SqlParameter("@Annex1", mail.Annex1 == null ? (object)"" : (object)mail.Annex1);
         SqlParameters[19] = new SqlParameter("@Annex2", mail.Annex2 == null ? (object)"" : (object)mail.Annex2);
         SqlParameters[20] = new SqlParameter("@Content", mail.Content == null ? (object)"" : (object)mail.Content);
         SqlParameters[21] = new SqlParameter("@Gold", (object)mail.Gold);
         SqlParameters[22] = new SqlParameter("@Money", (object)mail.Money);
         SqlParameters[23] = new SqlParameter("@Receiver", mail.Receiver == null ? (object)"" : (object)mail.Receiver);
         SqlParameters[24] = new SqlParameter("@ReceiverID", (object)mail.ReceiverID);
         SqlParameters[25] = new SqlParameter("@Sender", mail.Sender == null ? (object)"" : (object)mail.Sender);
         SqlParameters[26] = new SqlParameter("@SenderID", (object)mail.SenderID);
         SqlParameters[27] = new SqlParameter("@Title", mail.Title == null ? (object)"" : (object)mail.Title);
         SqlParameters[28] = new SqlParameter("@IfDelS", (object)false);
         SqlParameters[29] = new SqlParameter("@IsDelete", (object)false);
         SqlParameters[30] = new SqlParameter("@IsDelR", (object)false);
         SqlParameters[31] = new SqlParameter("@IsRead", (object)false);
         SqlParameters[32] = new SqlParameter("@SendTime", (object)DateTime.Now);
         SqlParameters[33] = new SqlParameter("@Result", SqlDbType.Int);
         SqlParameters[33].Direction = ParameterDirection.ReturnValue;
         flag = this.db.RunProcedure("SP_Admin_SendUserItem", SqlParameters);
         returnValue = (int)SqlParameters[33].Value;
         flag = returnValue == 0;
         if (flag)
         {
             using (CenterServiceClient centerServiceClient = new CenterServiceClient())
                 centerServiceClient.MailNotice(mail.ReceiverID);
         }
     }
     catch (Exception ex)
     {
         if (BaseBussiness.log.IsErrorEnabled)
             BaseBussiness.log.Error((object)"Init", ex);
     }
     return flag;
 }
Esempio n. 51
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int result = 1;
            try
            {
                string IP = Context.Request.UserHostAddress;
                if (ValidLoginIP(IP))
                {
                    string content = HttpUtility.UrlDecode(Request["content"]);
                    string site = Request["site"] == null ? "" : HttpUtility.UrlDecode(Request["site"]).ToLower();
                    string nickname = Request["nickname"] == null ? "" : HttpUtility.UrlDecode(Request["nickname"]);

                    BaseInterface inter = BaseInterface.CreateInterface();
                    string[] str = inter.UnEncryptCharge(content, ref result, site);
                    if (str.Length > 5)
                    {
                        string chargeID = str[0];
                        string userName = str[1].Trim();
                        int money = int.Parse(str[2]);
                        string payWay = str[3];
                        decimal needMoney = decimal.Parse(str[4]);

                        if (!string.IsNullOrEmpty(userName))
                        {
                            userName= BaseInterface.GetNameBySite(userName, site);
                            if (money > 0)
                            {
                                using (PlayerBussiness db = new PlayerBussiness())
                                {
                                    int userID;
                                    DateTime date = DateTime.Now;
                                    if (db.AddChargeMoney(chargeID, userName, money, payWay, needMoney, out userID, ref result, date, IP, nickname))
                                    {
                                        result = 0;
                                        using (CenterServiceClient temp = new CenterServiceClient())
                                        {
                                            temp.ChargeMoney(userID, chargeID);
                                            using (PlayerBussiness pb = new PlayerBussiness())
                                            {
                                                PlayerInfo player = pb.GetUserSingleByUserID(userID);
                                                if (player != null)
                                                    StaticsMgr.Log(date, userName, player.Sex, money, payWay,needMoney);
                                                else
                                                {
                                                    StaticsMgr.Log(date, userName, true, money, payWay, needMoney);
                                                    log.Error("ChargeMoney_StaticsMgr:Player is null!");
                                                }
                                            }

                                        }
                                    }
                                }
                            }
                            else
                            {
                                result = 3;
                            }
                        }
                        else
                        {
                            result = 2;
                        }
                    }
                }
                else
                {
                    result = 5;
                }
            }
            catch (Exception ex)
            {
                log.Error("ChargeMoney:", ex);
            }
            Response.Write(result);
        }
Esempio n. 52
0
 public bool UpdateConfigState(int type, bool state)
 {
     bool result = false;
     try
     {
         using (CenterServiceClient temp = new CenterServiceClient())
         {
             return temp.UpdateConfigState(type,state);
         }
     }
     catch (Exception e)
     {
         if (log.IsErrorEnabled)
             log.Error("UpdateConfigState", e);
     }
     return result;
 }