Ejemplo n.º 1
0
        private void m_AreaCodeController_QueryEvent(object sender, ServiceEventArgs e)
        {
            if (IsDisposed || !this.IsHandleCreated)
            {
                return;
            }

            this.Invoke(new MethodInvoker(delegate()
            {
                if (e != null)
                {
                    string content = e.Content;

                    try
                    {
                        GetListResultInfo <AreaCodeInfo> result = JsonHelper.JSONToObject <GetListResultInfo <AreaCodeInfo> >(content);

                        if (result.rows != null && result.rows.Count > 0)
                        {
                            m_AreaList = result.rows;
                            this.LoadProvince(m_AreaList);
                        }
                    }
                    catch
                    {
                    }
                }
                else
                {
                    MessageBox.Show(sender.ToString(), "获取行政区出错", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }));
        }
Ejemplo n.º 2
0
        private void m_ArtificiallakeController_QueryEvent(object sender, ServiceEventArgs e)
        {
            this.Invoke(new MethodInvoker(delegate()
            {
                if (e != null)
                {
                    string content = e.Content;
                    try
                    {
                        GetListResultInfo <Fire_Artificiallake> result = JsonHelper.JSONToObject <GetListResultInfo <Fire_Artificiallake> >(content);

                        if (result.rows != null && result.rows.Count > 0)
                        {
                            this.m_ArtificiallakeList = result.rows;

                            this.pagerControl1.NMax = result.total;
                            this.FillData(m_ArtificiallakeList);
                        }
                        else
                        {
                            this.pagerControl1.NMax = 0;
                            this.FillData(null);
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(this, ex.Message, "提示");
                    }
                }
                else
                {
                    MessageBox.Show(this, sender.ToString(), "提示");
                }
            }));
        }
Ejemplo n.º 3
0
        private void m_UserController_QueryEvent(object sender, ServiceEventArgs e)
        {
            if (IsDisposed || !this.IsHandleCreated)
            {
                return;
            }

            this.Invoke(new MethodInvoker(delegate()
            {
                if (e != null)
                {
                    string content = e.Content;

                    try
                    {
                        GetListResultInfo <UserInfo> result = JsonHelper.JSONToObject <GetListResultInfo <UserInfo> >(content);


                        if (result.rows != null && result.rows.Count > 0)
                        {
                            this.m_UserList = result.rows;

                            this.pagerControl1.NMax = result.total;
                            this.FillData(m_UserList);
                        }
                        else
                        {
                            this.pagerControl1.NMax = 0;
                            this.FillData(null);
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
                else
                {
                    MessageBox.Show(sender.ToString(), "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

                    this.Close();
                }
            }));
        }
        public void m_LicenseController_QueryEvent(object sender, ServiceEventArgs e)
        {
            if (IsDisposed || !this.IsHandleCreated)
            {
                return;
            }

            this.Invoke(new MethodInvoker(delegate()
            {
                if (e != null)
                {
                    string content = e.Content;

                    try
                    {
                        GetListResultInfo <LicenceInfo> result = JsonHelper.JSONToObject <GetListResultInfo <LicenceInfo> >(content);

                        if (result != null && result.rows != null && result.rows.Count > 0)
                        {
                            List <LicenceInfo> licenceList = result.rows;

                            this.FillData(licenceList);
                        }
                        else
                        {
                            this.FillData(null);
                        }
                    }
                    catch
                    {
                    }
                }
                else
                {
                    MessageBox.Show(sender.ToString(), "获取许可列表出错", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }));
        }