示例#1
0
        private void btnsyspwd_Click(object sender, EventArgs e)
        {
            if (this.textBox7.Text.Trim() != "" &&
                this.textBox8.Text.Trim() != "")
            {
                btnsyspwd.Enabled = false;
                Cursor            = Cursors.WaitCursor;

                CEnum.Message_Body[] mContent = new CEnum.Message_Body[4];

                mContent[0].eName    = CEnum.TagName.UserByID;
                mContent[0].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[0].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString());


                mContent[1].eName    = CEnum.TagName.TOKEN_esn;
                mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[1].oContent = textBox7.Text.Trim();

                mContent[2].eName    = CEnum.TagName.TOKEN_dpsw;
                mContent[2].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[2].oContent = textBox8.Text.Trim();

                mContent[3].eName    = CEnum.TagName.CARD_address;
                mContent[3].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[3].oContent = Operation_Card.ReturnClientIp();

                this.backgroundWorkerSysPwd.RunWorkerAsync(mContent);
            }
            else
            {
                MessageBox.Show(config.ReadConfigValue("MAU", "FT_UI_Msg1"));
                return;
            }
        }
        //重置身份证
        private void ResetID()
        {
            try
            {
                C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[4];

                messageBody[0].eTag     = C_Global.CEnum.TagFormat.TLV_STRING;
                messageBody[0].eName    = C_Global.CEnum.TagName.CARD_username;
                messageBody[0].oContent = ((DataTable)dgvResult.DataSource).Rows[0][1].ToString();

                messageBody[1].eTag     = C_Global.CEnum.TagFormat.TLV_INTEGER;
                messageBody[1].eName    = C_Global.CEnum.TagName.UserByID;
                messageBody[1].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString());

                messageBody[2].eTag     = C_Global.CEnum.TagFormat.TLV_STRING;
                messageBody[2].eName    = C_Global.CEnum.TagName.CARD_cardtype;
                messageBody[2].oContent = "IDCard";

                messageBody[3].eName    = CEnum.TagName.CARD_address;
                messageBody[3].eTag     = CEnum.TagFormat.TLV_STRING;
                messageBody[3].oContent = Operation_Card.ReturnClientIp();

                lock (typeof(C_Event.CSocketEvent))
                {
                    modiInfoResult = m_ClientEvent.RequestResult(CEnum.ServiceKey.CARD_USERINFO_CLEAR, C_Global.CEnum.Msg_Category.CARD_ADMIN, messageBody);
                }

                if (modiInfoResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
                {
                    MessageBox.Show(modiInfoResult[0, 0].oContent.ToString());
                    return;
                }

                if (modiInfoResult[0, 0].oContent.ToString().Equals("FAILURE"))
                {
                    MessageBox.Show(config.ReadConfigValue("MAU", "UD_Code_Msgidfail"));
                    return;
                }

                if (modiInfoResult[0, 0].oContent.ToString().Equals("SUCCESS"))
                {
                    MessageBox.Show(config.ReadConfigValue("MAU", "UD_Code_Msgidsucc"));
                    tabControlResult.SelectedIndex = 0;
                    //ReadInfo();
                    return;
                }
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
        }
示例#3
0
        private void buttonLock_Click(object sender, EventArgs e)
        {
            if (this.textBox1.Text.Trim().Length > 0 &&
                this.textBox2.Text.Trim().Length > 0 &&
                this.textBox3.Text.Trim().Length > 0 &&
                (this.radioButton1.Checked || this.radioButton2.Checked)
                )
            {
                buttonLock.Enabled = false;
                Cursor             = Cursors.WaitCursor;

                CEnum.Message_Body[] mContent = new CEnum.Message_Body[6];

                mContent[0].eName    = CEnum.TagName.UserByID;
                mContent[0].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[0].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString());

                mContent[1].eName    = CEnum.TagName.TOKEN_username;
                mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[1].oContent = textBox1.Text.Trim();

                mContent[2].eName    = CEnum.TagName.TOKEN_esn;
                mContent[2].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[2].oContent = textBox2.Text.Trim();

                mContent[3].eName    = CEnum.TagName.TOKEN_service;
                mContent[3].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[3].oContent = textBox3.Text.Trim();

                mContent[4].eName    = CEnum.TagName.TOKEN_code;
                mContent[4].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[4].oContent = radioButton1.Checked ? "4" : "5";

                mContent[5].eName    = CEnum.TagName.CARD_address;
                mContent[5].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[5].oContent = Operation_Card.ReturnClientIp();

                this.backgroundWorkerLock.RunWorkerAsync(mContent);
            }
            else
            {
                MessageBox.Show(config.ReadConfigValue("MAU", "FT_UI_Msg1"));
                return;
            }
        }
        private void buttonUnlock_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == null || textBox1.Text == "")
            {
                MessageBox.Show(config.ReadConfigValue("MAU", "UD_Code_MsgBaninfo"));
                textBox1.Focus();
                return;
            }

            CEnum.Message_Body[] mContent = new CEnum.Message_Body[6];

            mContent[0].eName    = CEnum.TagName.CARD_username;
            mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[0].oContent = TxtID.Text;

            mContent[1].eName    = CEnum.TagName.UserByID;
            mContent[1].eTag     = CEnum.TagFormat.TLV_INTEGER;
            mContent[1].oContent = int.Parse(m_ClientEvent.GetInfo("USERID").ToString());

            mContent[2].eName    = CEnum.TagName.SDO_REASON;
            mContent[2].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[2].oContent = textBox1.Text;

            mContent[3].eName    = CEnum.TagName.CARD_cardtype;
            mContent[3].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[3].oContent = "unlock";

            mContent[4].eName    = CEnum.TagName.CARD_ActionType;
            mContent[4].eTag     = CEnum.TagFormat.TLV_INTEGER;
            mContent[4].oContent = 0;

            mContent[5].eName    = CEnum.TagName.CARD_address;
            mContent[5].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[5].oContent = Operation_Card.ReturnClientIp();

            lock (typeof(C_Event.CSocketEvent))
            {
                stopResult = Operation_Card.GetResult(this.m_ClientEvent, CEnum.ServiceKey.CARD_USERLOCK_UPDATE, mContent);
            }

            if (stopResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(stopResult[0, 0].oContent.ToString());
                return;
            }

            if (stopResult[0, 0].oContent.ToString().ToUpper().Equals("FAILURE"))
            {
                MessageBox.Show(config.ReadConfigValue("MAU", "UD_Code_Msgopfail"));
            }
            if (stopResult[0, 0].oContent.ToString().ToUpper().Equals("SUCCESS"))
            {
                foreach (Control m in PnlResult.Controls.Find("LabelTextBox", true))
                {
                    m.Dispose();
                }

                TxtID.Enabled   = true;
                TxtUser.Enabled = true;

                btnRestIDCode.Enabled = false;
                btnResetV.Enabled     = false;

                DisableBtnControl();


                MessageBox.Show(config.ReadConfigValue("MAU", "UD_Code_Msgopsucc"));
            }
        }