コード例 #1
0
 private void backgroundWorkerAdd_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_Card.GetResult(m_ClientEvent, CEnum.ServiceKey.CARD_MOBILEINFO_UPDATE, (CEnum.Message_Body[])e.Argument);
     }
 }
コード例 #2
0
        private void ReadKeyWords()
        {
            try
            {
                C_Global.CEnum.Message_Body[] messageBody = new C_Global.CEnum.Message_Body[2];

                messageBody[0].eTag     = C_Global.CEnum.TagFormat.TLV_STRING;
                messageBody[0].eName    = C_Global.CEnum.TagName.CARD_username;
                messageBody[0].oContent = TxtAccount.Text.Trim();

                messageBody[1].eTag     = C_Global.CEnum.TagFormat.TLV_TIMESTAMP;
                messageBody[1].eName    = C_Global.CEnum.TagName.CARD_PayStartDate;
                messageBody[1].oContent = Convert.ToDateTime(DptStart.Text);;


                doResult = m_ClientEvent.RequestResult(CEnum.ServiceKey.CARD_DanceItem_QUERY, C_Global.CEnum.Msg_Category.CARD_ADMIN, messageBody);

                if (doResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
                {
                    MessageBox.Show(doResult[0, 0].oContent.ToString());
                    return;
                }
                else
                {
                    Operation_Card.BuildDataTable(m_ClientEvent, doResult, this.GrdResult, out RolePage);
                }
            }
            catch
            { }
        }
コード例 #3
0
        private void backgroundWorkerSerch_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            try
            {
                btnSearch.Enabled             = true;
                Cursor                        = Cursors.Default;
                CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;

                if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
                {
                    MessageBox.Show(mResult[0, 0].oContent.ToString());
                    return;
                }
                Operation_Card.BuildDataTable(this.m_ClientEvent, mResult, dgAccountInfo, out iPage);

                if (iPage <= 0)
                {
                    DivPage.Visible = false;
                }
                else
                {
                    for (int i = 0; i < iPage; i++)
                    {
                        CmbPage.Items.Add(i + 1);
                    }

                    CmbPage.SelectedIndex = 0;
                    bFirst          = true;
                    DivPage.Visible = true;
                }
            }
            catch { }
        }
コード例 #4
0
        private void CmbPage_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (bFirst)
            {
                if (bFirst)
                {
                    //构造查询条件
                    CEnum.Message_Body[] mContent = new CEnum.Message_Body[4];

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

                    mContent[1].eName    = CEnum.TagName.CARD_username;
                    mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
                    mContent[1].oContent = TxtName.Text;

                    mContent[2].eName    = CEnum.TagName.Index;
                    mContent[2].eTag     = CEnum.TagFormat.TLV_INTEGER;
                    mContent[2].oContent = (int.Parse(CmbPage.Text) - 1) * Operation_Card.iPageSize + 1;

                    mContent[3].eName    = CEnum.TagName.PageSize;
                    mContent[3].eTag     = CEnum.TagFormat.TLV_INTEGER;
                    mContent[3].oContent = Operation_Card.iPageSize;

                    CEnum.Message_Body[,] mResult = Operation_Card.GetResult(this.m_ClientEvent, CEnum.ServiceKey.CARD_USERCONSUME_QUERY, mContent);

                    Operation_Card.BuildDataTable(this.m_ClientEvent, mResult, GrdResult, out iPageCount);
                }
            }
        }
コード例 #5
0
 private void backgroundWorkerSearch_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_Card.GetResult(this.m_ClientEvent, CEnum.ServiceKey.CARD_UserCashExp_Query, (CEnum.Message_Body[])e.Argument);
     }
 }
コード例 #6
0
        private void backgroundWorkerPageChanged_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            CmbPage.Enabled = true;
            Cursor          = Cursors.Default;

            Operation_Card.BuildDataTable(this.m_ClientEvent, (CEnum.Message_Body[, ])e.Result, GrdResult, out iPageCount);
        }
コード例 #7
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;
            }
        }
コード例 #8
0
 private void backgroundWorkerSysPwd_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_Card.GetResult(m_ClientEvent, CEnum.ServiceKey.CARD_TOKENPASSWD_SYNC, (CEnum.Message_Body[])e.Argument);
     }
 }
コード例 #9
0
 private void backgroundWorkerByCard_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_Card.GetResult(m_ClientEvent, CEnum.ServiceKey.CARD_USERCARDLOCK_QUERY, (CEnum.Message_Body[])e.Argument);
     }
 }
コード例 #10
0
        private void backgroundWorkerSearch_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            this.BtnSearch.Enabled        = true;
            this.Cursor                   = Cursors.Default;
            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;
            if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(mResult[0, 0].oContent.ToString());
                return;
            }

            //CmbServer.Enabled = false;
            TxtAccount.Enabled        = false;
            this.buttonSaveAS.Enabled = true;

            //if (mResult[0, 8].eName == C_Global.CEnum.TagName.SDO_ActiveStatus && mResult[0, 8].oContent.ToString() == "1")
            //{
            //    LblDetail.Text = config.ReadConfigValue("MSDO", "AF_Code_UserEnabledDes").Replace("{Account}", TxtAccount.Text).Replace("{Server}", CmbServer.Text);
            //}

            //if (mResult[0, 8].eName == C_Global.CEnum.TagName.Status && mResult[0, 0].oContent.ToString() == "ERROR")
            //{
            //    LblDetail.Text = config.ReadConfigValue("MSDO", "AF_Code_UserNotEnabledDes").Replace("{Account}", TxtAccount.Text).Replace("{Server}", CmbServer.Text);
            //}

            PnlDetail.Visible = false;
            Operation_Card.SaveTxt(config, mResult, this.Name, "MAU");
            for (int i = 0; i < mResult.GetLength(1); i++)
            {
                LabelTextBox mDisplay = new LabelTextBox();
                mDisplay.Parent   = PnlDetail;
                mDisplay.Position = C_Controls.LabelTextBox.LabelTextBox.ELABELPOSITION.LEFT;
                mDisplay.Width    = 222;

                if (i % 2 == 0)
                {
                    mDisplay.Top  = 20 * i + 30;
                    mDisplay.Left = 44;
                }
                else
                {
                    mDisplay.Top  = 20 * (i - 1) + 30;
                    mDisplay.Left = mDisplay.Width + 111;
                }
                mDisplay.Font        = new Font("幼圆", 12);
                mDisplay.LabelText   = config.ReadConfigValue("MAU", mResult[0, i].eName.ToString()) + ":";
                mDisplay.TextBoxText = mResult[0, i].oContent.ToString();
            }
            PnlDetail.Visible = true;

            for (int i = 0; i < PnlDetail.Controls.Count; i++)
            {
                if (PnlDetail.Controls[i].GetType() == typeof(LabelTextBox))
                {
                    LabelTextBox mControls = (LabelTextBox)PnlDetail.Controls[i];
                    mControls.ReadOnly = true;
                }
            }
        }
コード例 #11
0
        private void backgroundWorkerSearch_DoWork(object sender, DoWorkEventArgs e)
        {
            ArrayList resultList = new ArrayList();

            lock (typeof(C_Event.CSocketEvent))
            {
                resultList.Add(Operation_Card.GetResult(this.m_ClientEvent, CEnum.ServiceKey.CARD_USERCHARGEDETAIL_QUERY, (CEnum.Message_Body[])e.Argument));
                //resultList.Add(Operation_Card.GetResult(this.m_ClientEvent, CEnum.ServiceKey.CARD_USERDETAIL_SUM_QUERY, (CEnum.Message_Body[])e.Argument));
                e.Result = resultList;
            }
        }
コード例 #12
0
        private void backgroundWorkerPageChanged_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;

            if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(mResult[0, 0].oContent.ToString());
                return;
            }
            Operation_Card.BuildDataTable(this.m_ClientEvent, mResult, dgAccountInfo, out iPage);
        }
コード例 #13
0
 private void backgroundWorkerSearch_RunWorkerCompleted_1(object sender, RunWorkerCompletedEventArgs e)
 {
     this.BtnSearch.Enabled        = true;
     this.Cursor                   = Cursors.Default;
     CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;
     if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
     {
         MessageBox.Show(mResult[0, 0].oContent.ToString());
         return;
     }
     Operation_Card.BuildDataTable(this.m_ClientEvent, mResult, RoleInfoView, out iPageCount);
 }
コード例 #14
0
        //重置身份证
        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);
            }
        }
コード例 #15
0
        private void backgroundWorkerSearch_DoWork(object sender, DoWorkEventArgs e)
        {
            lock (typeof(C_Event.CSocketEvent))
            {
                mResult = Operation_Card.GetResult(this.m_ClientEvent, CEnum.ServiceKey.CARD_USER_QUERY, (CEnum.Message_Body[])e.Argument);

                if (mResult[0, 0].eName != CEnum.TagName.ERROR_Msg)
                {
                    CEnum.Message_Body[] mContent = new CEnum.Message_Body[8];

                    mContent[0].eName    = CEnum.TagName.TOKEN_provide;
                    mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                    mContent[0].oContent = "viewTokenUser";

                    mContent[1].eName    = CEnum.TagName.TOKEN_Type;
                    mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
                    mContent[1].oContent = "username";


                    mContent[2].eName    = CEnum.TagName.TOKEN_code;
                    mContent[2].eTag     = CEnum.TagFormat.TLV_STRING;
                    mContent[2].oContent = mResult[0, 1].oContent;

                    mContent[3].eName    = CEnum.TagName.TOKEN_Start;
                    mContent[3].eTag     = CEnum.TagFormat.TLV_DATE;
                    mContent[3].oContent = new DateTime(2001, 1, 1);

                    mContent[4].eName    = CEnum.TagName.TOKEN_End;
                    mContent[4].eTag     = CEnum.TagFormat.TLV_DATE;
                    mContent[4].oContent = DateTime.Now;

                    mContent[5].eName    = CEnum.TagName.PageSize;
                    mContent[5].eTag     = CEnum.TagFormat.TLV_INTEGER;
                    mContent[5].oContent = 10;

                    mContent[6].eName    = CEnum.TagName.Index;
                    mContent[6].eTag     = CEnum.TagFormat.TLV_INTEGER;
                    mContent[6].oContent = 1;

                    mContent[7].eName    = CEnum.TagName.TOKEN_authType;
                    mContent[7].eTag     = CEnum.TagFormat.TLV_STRING;
                    mContent[7].oContent = "";

                    e.Result = Operation_Card.GetResult(m_ClientEvent, CEnum.ServiceKey.CARD_USERTOKEN_QUERY, mContent);

                    isTokenUser = (((CEnum.Message_Body[, ])e.Result)[0, 0].eName == CEnum.TagName.ERROR_Msg) ? false : true;
                }
            }
        }
コード例 #16
0
        private void backgroundWorkerByCard_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            Cursor = Cursors.Default;
            this.button3.Enabled = true;
            int pg = 0;

            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])e.Result;
            if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(mResult[0, 0].oContent.ToString());
                return;
            }
            else
            {
                Operation_Card.BuildDataTable(m_ClientEvent, mResult, dgvCard, out pg);
            }
        }
コード例 #17
0
        private void BtnLock_Click(object sender, EventArgs e)
        {
            LblStatus.Text = "";
            if (txtUser.Text.Trim().Length > 0 && Txtesn.Text.Trim().Length > 0)
            {
                CEnum.Message_Body[] mContent = new CEnum.Message_Body[3];

                mContent[0].eName    = CEnum.TagName.TOKEN_service;
                mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[0].oContent = "lockUser";

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

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

                CEnum.Message_Body[,] mResult = null;
                lock (typeof(C_Event.CSocketEvent))
                {
                    mResult = Operation_Card.GetResult(m_ClientEvent, CEnum.ServiceKey.TOKEN_MODIFYUSER_QUERY, mContent);
                }
                if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
                {
                    MessageBox.Show(mResult[0, 0].oContent.ToString());
                    return;
                }

                if (mResult[0, 0].oContent.ToString().Equals("FAILURE"))
                {
                    LblStatus.Text = "操作失败";
                    // LblStatus.Text = config.ReadConfigValue("MSOCCER", "FAA_Code_lbltxtsuccess").Replace("{user}", TxtAccount.Text.Trim()).Replace("{server}", CmbServer.Text.Trim());
                }
                else
                {
                    LblStatus.Text = mResult[0, 0].oContent.ToString();
                    //LblStatus.Text = config.ReadConfigValue("MSOCCER", "FAA_Code_lbltxtfailed").Replace("{user}", TxtAccount.Text.Trim()).Replace("{server}", CmbServer.Text.Trim());
                }
            }
            else
            {
                MessageBox.Show("请输入用户名或ESN序列号");
            }
        }
コード例 #18
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;
            }
        }
コード例 #19
0
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            if (TxtAccount.Text.Trim().Length > 0)
            {
                CEnum.Message_Body[] mContent = new CEnum.Message_Body[2];

                mContent[0].eName    = CEnum.TagName.TOKEN_service;
                mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[0].oContent = "keyStatus";

                mContent[1].eName    = CEnum.TagName.TOKEN_esn;
                mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[1].oContent = TxtAccount.Text;


                //this.backgroundWorkerSearch.RunWorkerAsync(mContent);
                CEnum.Message_Body[,] mResult = null;
                lock (typeof(C_Event.CSocketEvent))
                {
                    mResult = Operation_Card.GetResult(m_ClientEvent, CEnum.ServiceKey.TOKEN_TOKENSTATUS_QUERY, mContent);
                }
                if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
                {
                    MessageBox.Show(mResult[0, 0].oContent.ToString());
                    return;
                }

                if (mResult[0, 0].oContent.ToString().Equals("FAILURE"))
                {
                    LblStatus.Text = "操作失败";
                    // LblStatus.Text = config.ReadConfigValue("MSOCCER", "FAA_Code_lbltxtsuccess").Replace("{user}", TxtAccount.Text.Trim()).Replace("{server}", CmbServer.Text.Trim());
                }
                else
                {
                    LblStatus.Text = mResult[0, 0].oContent.ToString();
                    //LblStatus.Text = config.ReadConfigValue("MSOCCER", "FAA_Code_lbltxtfailed").Replace("{user}", TxtAccount.Text.Trim()).Replace("{server}", CmbServer.Text.Trim());
                }
            }
            else
            {
                MessageBox.Show("请输入要查询的ESN序列号");
            }
        }
コード例 #20
0
        private void backgroundWorkerSearch_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            BtnSearch.Enabled             = true;
            Cursor                        = Cursors.Default;
            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])(((ArrayList)e.Result)[0]);
            //CEnum.Message_Body[,] mResultSum = (CEnum.Message_Body[,])(((ArrayList)e.Result)[1]);
            if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(mResult[0, 0].oContent.ToString());
                return;
            }

            Operation_Card.BuildDataTable(this.m_ClientEvent, mResult, GrdResult, out iPageCount);

            if (iPageCount <= 0)
            {
                PnlPage.Visible = false;
            }
            else
            {
                for (int i = 0; i < iPageCount; i++)
                {
                    CmbPage.Items.Add(i + 1);
                }

                CmbPage.SelectedIndex = 0;
                bFirst          = true;
                PnlPage.Visible = true;
            }
            //if (mResultSum[0, 0].eName == CEnum.TagName.ERROR_Msg)
            //{
            //    MessageBox.Show(mResult[0, 0].oContent.ToString());
            //    return;
            //}

            LblSum.Text = config.ReadConfigValue("MAU", "CL_Code_sum") + Operation_Card.Total;
        }
コード例 #21
0
        private void ReadInfo()
        {
            mResult = null;

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

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

            mContent[1].eName    = CEnum.TagName.CARD_nickname;
            mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[1].oContent = TxtUser.Text;

            mContent[2].eName    = CEnum.TagName.CARD_ActionType;
            mContent[2].eTag     = CEnum.TagFormat.TLV_INTEGER;
            mContent[2].oContent = 1;

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

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

            TxtID.Enabled   = false;
            TxtUser.Enabled = false;

            btnRestIDCode.Enabled = true;
            btnResetV.Enabled     = true;

            this.buttonSaveAS.Enabled = true;
            //LabelTextBox[] lblTextBoxArray = new LabelTextBox[mResult.GetLength(1)];
            Operation_Card.SaveTxt(config, mResult, this.Name, "GLOBAL");
            for (int i = 0; i < mResult.GetLength(1); i++)
            {
                LabelTextBox mDisplay = new LabelTextBox(false);
                //lblTextBoxArray[0] = mDisplay;

                mDisplay.Parent   = PnlResult;
                mDisplay.Position = C_Controls.LabelTextBox.LabelTextBox.ELABELPOSITION.LEFT;
                mDisplay.Width    = 222;

                //mDisplay.Visible = false;

                if (i % 2 == 0)
                {
                    mDisplay.Top  = 20 * i + 30;
                    mDisplay.Left = 44;
                }
                else
                {
                    mDisplay.Top  = 20 * (i - 1) + 30;
                    mDisplay.Left = mDisplay.Width + 111;
                }

                mDisplay.LabelText = config.ReadConfigValue("GLOBAL", mResult[0, i].eName.ToString()) + ":";
                // mDisplay.LabelText = this.m_ClientEvent.DecodeFieldName(mResult[0, i].eName) + ":";
                mDisplay.TextBoxText = mResult[0, i].oContent.ToString();

                EnableBtnControl();
            }

            /*
             * for (int i = 0; i < lblTextBoxArray.Length; i++)
             * {
             *  lblTextBoxArray[i].IsVisable = true;
             * }
             */
            //foreach (Control m in PnlResult.Controls.Find("LabelTextBox", true))
            //{
            //m.Visible = true;
            //}


            PnlResult.Visible = true;

            for (int i = 0; i < PnlResult.Controls.Count; i++)
            {
                if (PnlResult.Controls[i].GetType() == typeof(LabelTextBox))
                {
                    LabelTextBox mControls = (LabelTextBox)PnlResult.Controls[i];
                    mControls.ReadOnly  = true;
                    mControls.IsVisable = true;
                }
            }
        }
コード例 #22
0
        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"));
            }
        }
コード例 #23
0
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            if (TxtName.Text.Trim().Length <= 0)
            {
                MessageBox.Show("请输入需要查询的用户名!");
                return;
            }
            GrdResult.DataSource = null;
            PnlPage.Visible      = false;
            LblSum.Text          = "";
            bFirst = false;

            //获取查询类型

            switch (CmbSort.Text)
            {
            case "金币消费明细":
                iSort = 1;
                break;

            case "休闲币消费明细":
                iSort = 2;
                break;

            default:
                iSort = 1;
                break;
            }
            LblSum.Text = "";
            CmbPage.Items.Clear();

            //构造查询条件
            CEnum.Message_Body[] mContent = new CEnum.Message_Body[4];

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

            mContent[1].eName    = CEnum.TagName.CARD_username;
            mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[1].oContent = TxtName.Text;

            mContent[2].eName    = CEnum.TagName.Index;
            mContent[2].eTag     = CEnum.TagFormat.TLV_INTEGER;
            mContent[2].oContent = 1;

            mContent[3].eName    = CEnum.TagName.PageSize;
            mContent[3].eTag     = CEnum.TagFormat.TLV_INTEGER;
            mContent[3].oContent = Operation_Card.iPageSize;

            CEnum.Message_Body[,] mResult = Operation_Card.GetResult(this.m_ClientEvent, CEnum.ServiceKey.CARD_USERCONSUME_QUERY, mContent);

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

            Operation_Card.BuildDataTable(this.m_ClientEvent, mResult, GrdResult, out iPageCount);

            if (iPageCount <= 0)
            {
                PnlPage.Visible = false;
            }
            else
            {
                for (int i = 0; i < iPageCount; i++)
                {
                    CmbPage.Items.Add(i + 1);
                }

                CmbPage.SelectedIndex = 0;
                bFirst          = true;
                PnlPage.Visible = true;
            }
            CEnum.Message_Body[,] mResultSum = Operation_Card.GetResult(this.m_ClientEvent, CEnum.ServiceKey.CARD_USERCONSUME_SUM_QUERY, mContent);

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

            LblSum.Text = "合计:" + mResultSum[0, 0].oContent.ToString();
        }
コード例 #24
0
        private void backgroundWorkerSearch_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            BtnSearch.Enabled             = true;
            Cursor                        = Cursors.Default;
            CEnum.Message_Body[,] mResult = (CEnum.Message_Body[, ])(((ArrayList)e.Result)[0]);
            // CEnum.Message_Body[,] mResultSum = (CEnum.Message_Body[,])(((ArrayList)e.Result)[1]);
            if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(mResult[0, 0].oContent.ToString());
                return;
            }

            Operation_Card.BuildDataTable(this.m_ClientEvent, mResult, GrdResult, out iPageCount);
            for (int i = 0; i < mResult.GetLength(0); i++)
            {
                for (int j = 0; j < mResult.GetLength(1); j++)
                {
                    if (mResult[i, j].eName == CEnum.TagName.PageCount)
                    {
                        continue;
                    }
                    if (mResult[i, j].eName == CEnum.TagName.CARD_SumTotal)
                    {
                        continue;
                    }
                    if (mResult[i, j].eName == CEnum.TagName.CARD_UDtargetvalue)
                    {
                        continue;
                    }
                    if (mResult[i, j].eName == CEnum.TagName.CARD_UDip)
                    {
                        continue;
                    }
                    result += config.ReadConfigValue("GLOBAL", mResult[i, j].eName.ToString()) + ":";
                    result += mResult[i, j].oContent.ToString();
                    result += "\r\n";
                }
                result += "\r\n";
            }
            if (iPageCount <= 0)
            {
                PnlPage.Visible = false;
            }
            else
            {
                for (int i = 0; i < iPageCount; i++)
                {
                    CmbPage.Items.Add(i + 1);
                }

                CmbPage.SelectedIndex = 0;
                bFirst          = true;
                PnlPage.Visible = true;
            }

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

            LblSum.Text = config.ReadConfigValue("MAU", "CL_Code_sum") + Operation_Card.Total;

            FileStream   fs = new FileStream(AppDomain.CurrentDomain.SetupInformation.ApplicationBase + this.Name + ".txt", FileMode.Create, FileAccess.ReadWrite);
            StreamWriter sw = new StreamWriter(fs);

            sw.Write(result);
            sw.Close();
            fs.Close();
            buttonSaveAS.Enabled = true;
        }
コード例 #25
0
        private void backgroundWorkerSearch_DoWork(object sender, DoWorkEventArgs e)
        {
            try
            {
                if (!isBat)
                {
                    lock (typeof(C_Event.CSocketEvent))
                    {
                        e.Result = Operation_Card.GetResult(this.m_ClientEvent, CEnum.ServiceKey.CARD_USERNUM_QUERY, (CEnum.Message_Body[])e.Argument);
                    }
                }
                else
                {
                    CEnum.Message_Body[,] mResult;
                    result     = "";
                    dataErr    = new DataTable();
                    dataResult = new DataTable();
                    dataErr.Columns.Add(config.ReadConfigValue("MAU", "CARD_cardnum"));
                    dataErr.Columns.Add(config.ReadConfigValue("MAU", "QC_CODE_Msg3"));
                    dataResult.Columns.Add(config.ReadConfigValue("MAU", "CARD_PDCardPASS"));
                    dataResult.Columns.Add(config.ReadConfigValue("MAU", "CARD_cardnum"));
                    dataResult.Columns.Add(config.ReadConfigValue("MAU", "CARD_cardtype"));
                    dataResult.Columns.Add(config.ReadConfigValue("MAU", "CARD_price"));
                    dataResult.Columns.Add(config.ReadConfigValue("MAU", "CARD_use_status"));
                    dataResult.Columns.Add(config.ReadConfigValue("MAU", "CARD_Locktype"));
                    dataResult.Columns.Add(config.ReadConfigValue("MAU", "CARD_use_username"));
                    dataResult.Columns.Add(config.ReadConfigValue("MAU", "TOEKN_BindDate"));
                    dataResult.Columns.Add(config.ReadConfigValue("MAU", "CARD_PDgetusername"));

                    dataResult.Columns.Add(config.ReadConfigValue("MAU", "CARD_PDip"));
                    for (int i = 0; i < paramList.Count; i++)
                    {
                        CEnum.Message_Body[] mContent;
                        string[]             tmp = paramList[i].ToString().Split(' ');
                        if (tmp.GetLength(0) < 2)
                        {
                            mContent             = new CEnum.Message_Body[2];
                            mContent[0].eName    = CEnum.TagName.CARD_cardnum;
                            mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                            mContent[0].oContent = tmp[0].Trim();


                            mContent[1].eName    = CEnum.TagName.CARD_cardpass;
                            mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
                            mContent[1].oContent = "";
                        }
                        else
                        {
                            mContent             = new CEnum.Message_Body[2];
                            mContent[0].eName    = CEnum.TagName.CARD_cardnum;
                            mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                            mContent[0].oContent = tmp[0].Trim();


                            mContent[1].eName    = CEnum.TagName.CARD_cardpass;
                            mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
                            mContent[1].oContent = tmp[1].Trim();
                        }
                        lock (typeof(C_Event.CSocketEvent))
                        {
                            mResult = Operation_Card.GetResult(this.m_ClientEvent, CEnum.ServiceKey.CARD_USERNUM_QUERY, mContent);
                        }
                        if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
                        {
                            DataRow dr = dataErr.NewRow();
                            dr[0] = tmp[0].Trim();
                            dr[1] = mResult[0, 0].oContent.ToString();
                            dataErr.Rows.Add(dr);
                        }
                        else
                        {
                            for (int j = 0; j < mResult.GetLength(1); j++)
                            {
                                if (tmp.GetLength(0) < 2 && mResult[0, j].eName == CEnum.TagName.CARD_PDgetusername && mResult[0, j].oContent.ToString() == "" && Operation_Shop.findIdx(mResult, CEnum.TagName.TOEKN_BindDate) != -1 && DateTime.Parse(mResult[0, Operation_Shop.findIdx(mResult, CEnum.TagName.TOEKN_BindDate)].oContent.ToString()).Date >= DateTime.Parse("2006-6-1").Date)
                                {
                                    result += config.ReadConfigValue("MAU", mResult[0, j].eName.ToString()) + ":";
                                    result += config.ReadConfigValue("MAU", "CARD_ERROR");
                                    result += "\r\n";
                                }
                                else
                                {
                                    if (mResult[0, j].eName != CEnum.TagName.CARD_PDip)
                                    {
                                        result += config.ReadConfigValue("MAU", mResult[0, j].eName.ToString()) + ":";
                                        result += mResult[0, j].oContent.ToString();
                                        result += "\r\n";
                                    }
                                }
                            }
                            result += "\r\n";

                            DataRow dr = dataResult.NewRow();
                            for (int k = 0; k < mResult.GetLength(1); k++)
                            {
                                if (tmp.GetLength(0) < 2 && mResult[0, k].eName == CEnum.TagName.CARD_PDgetusername && mResult[0, k].oContent.ToString() == "" && Operation_Shop.findIdx(mResult, CEnum.TagName.TOEKN_BindDate) != -1 && DateTime.Parse(mResult[0, Operation_Shop.findIdx(mResult, CEnum.TagName.TOEKN_BindDate)].oContent.ToString()).Date >= DateTime.Parse("2006-6-1").Date)
                                {
                                    dr[config.ReadConfigValue("MAU", mResult[0, k].eName.ToString())] = config.ReadConfigValue("MAU", "CARD_ERROR");
                                }
                                else
                                {
                                    dr[config.ReadConfigValue("MAU", mResult[0, k].eName.ToString())] = mResult[0, k].oContent.ToString();
                                }
                            }
                            dataResult.Rows.Add(dr);
                        }
                        this.backgroundWorkerSearch.ReportProgress((int)(((float)(i + 1)) / ((float)paramList.Count) * 100));
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }