private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(this.txt.Text))
                {
                    MsgForm.ShowFrom("请输入机号!");
                    this.txt.Focus();
                    return;
                }

                Model.netsetup ns = new Model.netsetup()
                {
                    jh        = this.txt.Text,
                    softpos   = "1",
                    comp_name = Dns.GetHostName(),
                    other     = Program.com_guid,
                    ip        = GetLocalIP(),
                    memo      = ""
                };

                bll.AddJH(ns);

                this.DialogResult = DialogResult.Yes;
                this.Close();
            }
            catch (Exception ex)
            {
                MsgForm.ShowFrom(ex);
            }
        }
        private void btnLogout_Click(object sender, EventArgs e)
        {
            try
            {
                if (!MyLove.PermissionsBalidation(this.Text, "14"))
                {
                    return;
                }
                if (this.dgv.SelectedRows.Count < 1)
                {
                    return;
                }

                if (YesNoForm.ShowFrom("确认要注销机号吗?") == DialogResult.Yes)
                {
                    Model.netsetup ns = new Model.netsetup()
                    {
                        jh      = dgv.CurrentRow.Cells["机号"].Value.ToString(),
                        ip      = dgv.CurrentRow.Cells["Ip地址"].Value.ToString(),
                        softpos = dgv.CurrentRow.Cells["机号类型"].Value.ToString(),
                    };

                    bll.DelJH(ns);

                    LoadDGV();
                }
            }
            catch (Exception ex)
            {
                MsgForm.ShowFrom(ex);
            }
        }