private void backgroundWorkerSearch_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            BtnSearch.Enabled             = true;
            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_Shop.BuildDataTable(this.m_ClientEvent, mResult, GrdResult, out iPageCount);
            LblSum.Text = config.ReadConfigValue("MAU", "CL_Code_sum") + Operation_Shop.Total;
            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;
            }
        }
        private void GrdResult_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                DataTable mTable = (DataTable)GrdResult.DataSource;

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

                mContent[0].eName    = CEnum.TagName.AU_ServerIP;
                mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[0].oContent = "61.152.150.205";

                mContent[1].eName    = CEnum.TagName.AuShop_orderid;
                mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[1].oContent = mTable.Rows[e.RowIndex][3].ToString();

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

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

                ExchangeMoreInfo mInfoFrm = new ExchangeMoreInfo(TxtName.Text, mResult, this.m_ClientEvent);
                mInfoFrm.ShowDialog();
            }
            catch
            {
            }
        }
 private void backgroundWorkerSearch_DoWork(object sender, DoWorkEventArgs e)
 {
     lock (typeof(C_Event.CSocketEvent))
     {
         e.Result = Operation_Shop.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AUSHOP_USERGPURCHASE_QUERY, (CEnum.Message_Body[])e.Argument);
     }
 }
        private void btnSearch_Click(object sender, EventArgs e)
        {
            CmbPage.Items.Clear();

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

            mContent[0].eName    = CEnum.TagName.AU_ServerIP;
            mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[0].oContent = "61.152.150.205";

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

            mContent[2].eName    = CEnum.TagName.AuShop_BeginDate;
            mContent[2].eTag     = CEnum.TagFormat.TLV_DATE;
            mContent[2].oContent = DpkStar.Value;

            mContent[3].eName    = CEnum.TagName.AuShop_EndDate;
            mContent[3].eTag     = CEnum.TagFormat.TLV_DATE;
            mContent[3].oContent = DptStop.Value;

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

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

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

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

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

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

                lblPageCount.Text     = iPageCount.ToString();
                CmbPage.SelectedIndex = 0;
                bFirst          = true;
                PnlPage.Visible = true;
            }

            GrdResult.Columns[3].Visible = false;
        }
        public ExchangeMoreInfo(string sss, CEnum.Message_Body[,] val, CSocketEvent m_ClientEvent)
        {
            InitializeComponent();

            LblUser.Text = "玩家 " + sss + " 的兑换记录详细信息:";

            Operation_Shop.BuildDataTable(m_ClientEvent, val, GrdInfo, out iPageCount);
        }
        public ExchangeMoreInfo(string sss, CEnum.Message_Body[,] val, CSocketEvent m_ClientEvent)
        {
            ConfigValue config = (ConfigValue)m_ClientEvent.GetInfo("INI");

            this.Text = config.ReadConfigValue("MAUDITION", "EMI_UI_ExchangeMoreInfo");
            InitializeComponent();

            LblUser.Text = config.ReadConfigValue("MAUDITION", "EMI_Code_LblUser").Replace("{user}", sss);
            //LblUser.Text = "玩家 " + sss + " 的兑换记录详细信息:";

            Operation_Shop.BuildDataTable(m_ClientEvent, val, GrdInfo, out iPageCount);
        }
예제 #7
0
        private void CmbPage_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (bFirst)
            {
                lblCurrPage.Text = CmbPage.Text;
                CEnum.Message_Body[] mContent = new CEnum.Message_Body[6];

                mContent[0].eName    = CEnum.TagName.AU_ServerIP;
                mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[0].oContent = "61.152.150.205";

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

                mContent[2].eName    = CEnum.TagName.AuShop_BeginDate;
                mContent[2].eTag     = CEnum.TagFormat.TLV_DATE;
                mContent[2].oContent = DpkStar.Value;

                mContent[3].eName    = CEnum.TagName.AuShop_EndDate;
                mContent[3].eTag     = CEnum.TagFormat.TLV_DATE;
                mContent[3].oContent = DptStop.Value;

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

                mContent[5].eName             = CEnum.TagName.PageSize;
                mContent[5].eTag              = CEnum.TagFormat.TLV_INTEGER;
                mContent[5].oContent          = Operation_Card.iPageSize;
                CEnum.Message_Body[,] mResult = null;
                lock (typeof(C_Event.CSocketEvent))
                {
                    mResult = Operation_Shop.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, "61.152.150.205"), CEnum.ServiceKey.AUSHOP_AVATARECOVER_QUERY, mContent);
                }
                if (mResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
                {
                    MessageBox.Show(mResult[0, 0].oContent.ToString());
                    return;
                }

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

                GrdResult.Columns[3].Visible = false;
            }
            else
            {
                lblCurrPage.Text = "1";
            }
        }
예제 #8
0
        private void backgroundWorkerLoad_DoWork(object sender, DoWorkEventArgs e)
        {
            lock (typeof(C_Event.CSocketEvent))
            {
                ItemResult = Operation_Shop.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AUSHOP_USERINTERGRAL_QUERY, (CEnum.Message_Body[])e.Argument);
            }

            if (ItemResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(ItemResult[0, 0].oContent.ToString());
                return;
            }
            else
            {
                AUServerIP      = ItemResult[0, 14].oContent.ToString();
                AuShopItemTable = ItemResult[0, 13].oContent.ToString();
                AuShopReceiveSN = ItemResult[0, 11].oContent.ToString();
                AuShopPresentID = ItemResult[0, 12].oContent.ToString();
            }
            //¹ºÂòµÀ¾ß¼Ç¼
            CEnum.Message_Body[] mContent = new CEnum.Message_Body[3];

            mContent[0].eName    = CEnum.TagName.ServerInfo_GameDBID;
            mContent[0].eTag     = CEnum.TagFormat.TLV_INTEGER;
            mContent[0].oContent = int.Parse(AUServerIP);

            mContent[1].eName    = CEnum.TagName.AuShop_ReceiveSN;
            mContent[1].eTag     = CEnum.TagFormat.TLV_INTEGER;
            mContent[1].oContent = int.Parse(AuShopReceiveSN);

            mContent[2].eName    = CEnum.TagName.AuShop_PresentID;
            mContent[2].eTag     = CEnum.TagFormat.TLV_INTEGER;
            mContent[2].oContent = int.Parse(AuShopPresentID);

            lock (typeof(C_Event.CSocketEvent))
            {
                ItemBuyResult = Operation_Shop.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AUSHOP_AVATARECOVER_DETAIL_QUERY, mContent);
            }
            if (ItemBuyResult[0, 0].eName == CEnum.TagName.ERROR_Msg)
            {
                MessageBox.Show(ItemBuyResult[0, 0].oContent.ToString());
                return;
            }
        }
        private void GrdResult_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.ColumnIndex == 4)
                {
                    DataTable mTable = (DataTable)GrdResult.DataSource;

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

                    mContent[0].eName    = CEnum.TagName.AuShop_userid;
                    mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                    mContent[0].oContent = mTable.Rows[e.RowIndex][4].ToString();

                    mContent[1].eName    = CEnum.TagName.AU_ServerIP;
                    mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
                    mContent[1].oContent = "61.152.150.205";

                    lock (typeof(C_Event.CSocketEvent))
                    {
                        mUserStat = Operation_Shop.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, "61.152.150.205"), CEnum.ServiceKey.AUSHOP_USERINTERGRAL_QUERY, mContent);
                    }

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

                    UserstatFrm mUserStatFrm = new UserstatFrm(mUserStat, m_ClientEvent);
                    //mUserStatFrm.MdiParent = this.MdiParent;
                    mUserStatFrm.ShowDialog();
                }
            }
            catch
            {
                MessageBox.Show(config.ReadConfigValue("MAUDITION", "FSI_Code_InputName"));
            }
        }
        private void GrdResult_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.ColumnIndex == 4)
                {
                    DataTable mTable = (DataTable)GrdResult.DataSource;

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

                    mContent[0].eName    = CEnum.TagName.AuShop_userid;
                    mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                    mContent[0].oContent = mTable.Rows[e.RowIndex][4].ToString();

                    mContent[1].eName    = CEnum.TagName.AU_ServerIP;
                    mContent[1].eTag     = CEnum.TagFormat.TLV_STRING;
                    mContent[1].oContent = "61.152.150.205";

                    mUserStat = Operation_Shop.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AUSHOP_USERINTERGRAL_QUERY, mContent);

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

                    UserstatFrm mUserStatFrm = new UserstatFrm(mUserStat, m_ClientEvent);
                    //mUserStatFrm.MdiParent = this.MdiParent;
                    mUserStatFrm.ShowDialog();
                }
            }
            catch
            {
                MessageBox.Show("请选择一个玩家的名字");
            }
        }
        private void CmbPage_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (bFirst)
            {
                lblCurrPage.Text = CmbPage.Text;
                CEnum.Message_Body[] mContent = new CEnum.Message_Body[11];

                mContent[0].eName    = CEnum.TagName.AU_ServerIP;
                mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[0].oContent = "61.152.150.205";

                mContent[1].eName = CEnum.TagName.AuShop_getusername;
                mContent[1].eTag  = CEnum.TagFormat.TLV_STRING;
                if (iSort == 0)
                {
                    mContent[1].oContent = "";
                }
                else
                {
                    mContent[1].oContent = TxtName.Text;
                }

                mContent[2].eName = CEnum.TagName.AuShop_username;
                mContent[2].eTag  = CEnum.TagFormat.TLV_STRING;
                if (iSort == 1)
                {
                    mContent[2].oContent = "";
                }
                else
                {
                    mContent[2].oContent = TxtName.Text;
                }

                mContent[3].eName    = CEnum.TagName.AuShop_BeginDate;
                mContent[3].eTag     = CEnum.TagFormat.TLV_DATE;
                mContent[3].oContent = DpkStar.Value;

                mContent[4].eName    = CEnum.TagName.AuShop_EndDate;
                mContent[4].eTag     = CEnum.TagFormat.TLV_DATE;
                mContent[4].oContent = DptStop.Value;

                mContent[5].eName    = CEnum.TagName.AuShop_psex;
                mContent[5].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[5].oContent = iSex;

                mContent[6].eName    = CEnum.TagName.AuShop_ispresent;
                mContent[6].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[6].oContent = iSend;

                mContent[7].eName    = CEnum.TagName.AuShop_islover;
                mContent[7].eTag     = CEnum.TagFormat.TLV_STRING;
                mContent[7].oContent = iGift;

                mContent[8].eName    = CEnum.TagName.AuShop_pcategory;
                mContent[8].eTag     = CEnum.TagFormat.TLV_INTEGER;
                mContent[8].oContent = iItem;

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

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

                CEnum.Message_Body[,] mResult = null;

                lock (typeof(C_Event.CSocketEvent))
                {
                    if (iBuy == 0)
                    {
                        mResult = Operation_Shop.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, "61.152.150.205"), CEnum.ServiceKey.AUSHOP_USERMPURCHASE_QUERY, mContent);
                    }
                    else
                    {
                        mResult = Operation_Shop.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, "61.152.150.205"), CEnum.ServiceKey.AUSHOP_USERGPURCHASE_QUERY, mContent);
                    }

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

                Operation_Shop.BuildDataTable(m_ClientEvent.GetSocket(m_ClientEvent, "61.152.150.205"), mResult, GrdResult, out iPageCount);
            }
            else
            {
                lblCurrPage.Text = "1";
            }
        }
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            if (CmbSort.Text == "" ||
                TxtName.Text == "" ||
                CmbItem.Text == "" ||
                CmbBuy.Text == "" ||
                CmbSex.Text == "")
            {
                MessageBox.Show(config.ReadConfigValue("MAUDITION", "FSI_Code_Full"));
                return;
            }

            CmbPage.Items.Clear();
            //列表附值
            //switch (CmbSort.Text)
            //{
            //    case "购买者":
            //        iSort = 0;
            //        break;
            //    case "接受者":
            //        iSort = 1;
            //        break;
            //    default:
            //        iSort = 0;
            //        break;
            //}
            if (CmbSort.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbSort1"))
            {
                iSort = 0;
            }
            else if (CmbSort.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbSort2"))
            {
                iSort = 1;
            }
            else
            {
                iSort = 0;
            }
            //switch (CmbItem.Text)
            //{
            //    case "所有":
            //        iItem = 0;
            //        break;
            //    case "发型":
            //        iItem = 1;
            //        break;
            //    case "上衣":
            //        iItem = 2;
            //        break;
            //    case "下衣":
            //        iItem = 3;
            //        break;
            //    case "鞋子":
            //        iItem = 4;
            //        break;
            //    case "套装":
            //        iItem = 5;
            //        break;
            //    case "特殊道具":
            //        iItem = 6;
            //        break;
            //    default:
            //        iItem = 0;
            //        break;
            //}
            if (CmbItem.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbItem1"))
            {
                iItem = 0;
            }
            else if (CmbItem.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbItem2"))
            {
                iItem = 1;
            }
            else if (CmbItem.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbItem3"))
            {
                iItem = 2;
            }
            else if (CmbItem.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbItem4"))
            {
                iItem = 3;
            }
            else if (CmbItem.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbItem5"))
            {
                iItem = 4;
            }
            else if (CmbItem.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbItem6"))
            {
                iItem = 5;
            }
            else if (CmbItem.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbItem7"))
            {
                iItem = 6;
            }
            else
            {
                iItem = 0;
            }


            //switch (CmbBuy.Text)
            //{
            //    case "M币购买":
            //        iBuy = 0;
            //        break;
            //    case "G币购买":
            //        iBuy = 1;
            //        break;
            //    default:
            //        iBuy = 0;
            //        break;
            //}
            if (CmbBuy.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbBuy1"))
            {
                iBuy = 0;
            }
            else if (CmbBuy.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbBuy2"))
            {
                iBuy = 1;
            }
            else
            {
                iBuy = 0;
            }
            //switch (CmbSex.Text)
            //{
            //    case "所有":
            //        iSex = "full";
            //        break;
            //    case "男女共用":
            //        iSex = "all";
            //        break;
            //    case "男":
            //        iSex = "m";
            //        break;
            //    case "女":
            //        iSex = "f";
            //        break;
            //    default:
            //        iSex = "all";
            //        break;
            //}
            if (CmbSex.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbSex1"))
            {
                iSex = "full";
            }
            else if (CmbSex.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbSex2"))
            {
                iSex = "all";
            }
            else if (CmbSex.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbSex3"))
            {
                iSex = "m";
            }
            else if (CmbSex.Text == config.ReadConfigValue("MAUDITION", "FSI_UI_CmbSex4"))
            {
                iSex = "f";
            }
            else
            {
                iSex = "all";
            }

            iGift = ChkGift.Checked ? "y" : "n";
            iSend = ChkSend.Checked ? "y" : "n";

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

            mContent[0].eName    = CEnum.TagName.AU_ServerIP;
            mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[0].oContent = "61.152.150.205";

            mContent[1].eName = CEnum.TagName.AuShop_getusername;
            mContent[1].eTag  = CEnum.TagFormat.TLV_STRING;
            if (iSort == 0)
            {
                mContent[1].oContent = "";
            }
            else
            {
                mContent[1].oContent = TxtName.Text;
            }

            mContent[2].eName = CEnum.TagName.AuShop_username;
            mContent[2].eTag  = CEnum.TagFormat.TLV_STRING;
            if (iSort == 1)
            {
                mContent[2].oContent = "";
            }
            else
            {
                mContent[2].oContent = TxtName.Text;
            }

            mContent[3].eName    = CEnum.TagName.AuShop_BeginDate;
            mContent[3].eTag     = CEnum.TagFormat.TLV_DATE;
            mContent[3].oContent = DpkStar.Value;

            mContent[4].eName    = CEnum.TagName.AuShop_EndDate;
            mContent[4].eTag     = CEnum.TagFormat.TLV_DATE;
            mContent[4].oContent = DptStop.Value;

            mContent[5].eName    = CEnum.TagName.AuShop_psex;
            mContent[5].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[5].oContent = iSex;

            mContent[6].eName    = CEnum.TagName.AuShop_ispresent;
            mContent[6].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[6].oContent = iSend;

            mContent[7].eName    = CEnum.TagName.AuShop_islover;
            mContent[7].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[7].oContent = iGift;

            mContent[8].eName    = CEnum.TagName.AuShop_pcategory;
            mContent[8].eTag     = CEnum.TagFormat.TLV_INTEGER;
            mContent[8].oContent = iItem;

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

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

            CEnum.Message_Body[,] mResult    = null;
            CEnum.Message_Body[,] mResultSum = null;

            lock (typeof(C_Event.CSocketEvent))
            {
                //if (iBuy == 0)
                //{
                //    mResult = Operation_Shop.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, "61.152.150.205"), CEnum.ServiceKey.AUSHOP_USERMPURCHASE_QUERY, mContent);
                //    mResultSum = Operation_Shop.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, "61.152.150.205"), CEnum.ServiceKey.AUSHOP_USERMPURCHASE_SUM_QUERY, mContent);
                //}
                //else
                //{
                //    mResult = Operation_Shop.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, "61.152.150.205"), CEnum.ServiceKey.AUSHOP_USERGPURCHASE_QUERY, mContent);
                //    mResultSum = Operation_Shop.GetResult(m_ClientEvent.GetSocket(m_ClientEvent, "61.152.150.205"), CEnum.ServiceKey.AUSHOP_USERGPURCHASE_SUM_QUERY, mContent);
                //}
            }

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

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

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

            if (mResultSum[0, 0].oContent != null)
            {
                LblSum.Text = config.ReadConfigValue("MAUDITION", "FSI_Code_Total") + mResultSum[0, 0].oContent.ToString();
            }

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

                lblPageCount.Text     = iPageCount.ToString();
                CmbPage.SelectedIndex = 0;
                bFirst          = true;
                PnlPage.Visible = true;
            }
        }
예제 #13
0
        private void backgroundWorkerSearch_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            try
            {
                if (!isBat)
                {
                    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;
                    }

                    buttonSaveAS.Enabled = true;
                    result = "";
                    for (int j = 0; j < mResult.GetLength(0); j++)
                    {
                        for (int i = 0; i < mResult.GetLength(1); i++)
                        {
                            if (TxtPwd.Text.Trim() == "" && mResult[j, i].eName == CEnum.TagName.CARD_PDgetusername && mResult[j, i].oContent.ToString() == "" && Operation_Shop.findIdx(mResult, CEnum.TagName.TOEKN_BindDate) != -1 && DateTime.Parse(mResult[j, Operation_Shop.findIdx(mResult, CEnum.TagName.TOEKN_BindDate)].oContent.ToString()).Date >= DateTime.Parse("2006-6-1").Date)
                            {
                                result += config.ReadConfigValue("MAU", mResult[j, i].eName.ToString()) + ":";
                                result += config.ReadConfigValue("MAU", "CARD_ERROR");
                                result += "\r\n";
                            }
                            else
                            {
                                if (mResult[j, i].eName != CEnum.TagName.CARD_PDip)
                                {
                                    result += config.ReadConfigValue("MAU", mResult[j, i].eName.ToString()) + ":";
                                    result += mResult[j, i].oContent.ToString();
                                    result += "\r\n";
                                }
                            }
                        }
                    }
                    FileStream   fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + this.Name + ".txt", FileMode.Create, FileAccess.ReadWrite);
                    StreamWriter sw = new StreamWriter(fs);
                    sw.Write(result);
                    sw.Close();
                    fs.Close();
                    DataTable dt = new DataTable();
                    for (int i = 0; i < mResult.GetLength(1); i++)
                    {
                        dt.Columns.Add(config.ReadConfigValue("MAU", mResult[0, i].eName.ToString()));
                    }

                    for (int j = 0; j < mResult.GetLength(0); j++)
                    {
                        DataRow dr = dt.NewRow();
                        for (int i = 0; i < mResult.GetLength(1); i++)
                        {
                            if (TxtPwd.Text.Trim() == "" && mResult[0, i].eName == CEnum.TagName.CARD_PDgetusername && mResult[0, i].oContent.ToString() == "" && 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, i].eName.ToString())] = config.ReadConfigValue("MAU", "CARD_ERROR");
                            }
                            else
                            {
                                dr[config.ReadConfigValue("MAU", mResult[0, i].eName.ToString())] = mResult[0, i].oContent.ToString();
                            }
                        }
                        dt.Rows.Add(dr);
                    }
                    dataGridViewResult.DataSource = dt;
                }
                else
                {
                    this.BtnSearch.Enabled        = true;
                    this.Cursor                   = Cursors.Default;
                    buttonSaveAS.Enabled          = true;
                    dataGridViewResult.DataSource = dataResult;
                    dataGridViewError.DataSource  = dataErr;
                    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();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #14
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)
            {
            }
        }
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            CmbPage.Items.Clear();
            //列表附值
            switch (CmbSort.Text)
            {
            case "购买者":
                iSort = 0;
                break;

            case "接受者":
                iSort = 1;
                break;

            default:
                iSort = 0;
                break;
            }
            switch (CmbItem.Text)
            {
            case "所有":
                iItem = 0;
                break;

            case "发型":
                iItem = 1;
                break;

            case "上衣":
                iItem = 2;
                break;

            case "下衣":
                iItem = 3;
                break;

            case "鞋子":
                iItem = 4;
                break;

            case "套装":
                iItem = 5;
                break;

            case "特殊道具":
                iItem = 6;
                break;

            default:
                iItem = 0;
                break;
            }
            switch (CmbBuy.Text)
            {
            case "M币购买":
                iBuy = 0;
                break;

            case "G币购买":
                iBuy = 1;
                break;

            default:
                iBuy = 0;
                break;
            }
            switch (CmbSex.Text)
            {
            case "所有":
                iSex = "full";
                break;

            case "男女共用":
                iSex = "all";
                break;

            case "男":
                iSex = "m";
                break;

            case "女":
                iSex = "f";
                break;

            default:
                iSex = "all";
                break;
            }

            iGift = ChkGift.Checked ? "y" : "n";
            iSend = ChkSend.Checked ? "y" : "n";

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

            mContent[0].eName    = CEnum.TagName.AU_ServerIP;
            mContent[0].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[0].oContent = "61.152.150.205";

            mContent[1].eName = CEnum.TagName.AuShop_getusername;
            mContent[1].eTag  = CEnum.TagFormat.TLV_STRING;
            if (iSort == 0)
            {
                mContent[1].oContent = "";
            }
            else
            {
                mContent[1].oContent = TxtName.Text;
            }

            mContent[2].eName = CEnum.TagName.AuShop_username;
            mContent[2].eTag  = CEnum.TagFormat.TLV_STRING;
            if (iSort == 1)
            {
                mContent[2].oContent = "";
            }
            else
            {
                mContent[2].oContent = TxtName.Text;
            }

            mContent[3].eName    = CEnum.TagName.AuShop_BeginDate;
            mContent[3].eTag     = CEnum.TagFormat.TLV_DATE;
            mContent[3].oContent = DpkStar.Value;

            mContent[4].eName    = CEnum.TagName.AuShop_EndDate;
            mContent[4].eTag     = CEnum.TagFormat.TLV_DATE;
            mContent[4].oContent = DptStop.Value;

            mContent[5].eName    = CEnum.TagName.AuShop_psex;
            mContent[5].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[5].oContent = iSex;

            mContent[6].eName    = CEnum.TagName.AuShop_ispresent;
            mContent[6].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[6].oContent = iSend;

            mContent[7].eName    = CEnum.TagName.AuShop_islover;
            mContent[7].eTag     = CEnum.TagFormat.TLV_STRING;
            mContent[7].oContent = iGift;

            mContent[8].eName    = CEnum.TagName.AuShop_pcategory;
            mContent[8].eTag     = CEnum.TagFormat.TLV_INTEGER;
            mContent[8].oContent = iItem;

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

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

            CEnum.Message_Body[,] mResult    = null;
            CEnum.Message_Body[,] mResultSum = null;

            if (iBuy == 0)
            {
                mResult    = Operation_Shop.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AUSHOP_USERMPURCHASE_QUERY, mContent);
                mResultSum = Operation_Shop.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AUSHOP_USERMPURCHASE_SUM_QUERY, mContent);
            }
            else
            {
                mResult    = Operation_Shop.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AUSHOP_USERGPURCHASE_QUERY, mContent);
                mResultSum = Operation_Shop.GetResult(this.m_ClientEvent, CEnum.ServiceKey.AUSHOP_USERGPURCHASE_SUM_QUERY, mContent);
            }

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

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

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

            if (mResultSum[0, 0].oContent != null)
            {
                LblSum.Text = "合计:" + mResultSum[0, 0].oContent.ToString();
            }

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

                lblPageCount.Text     = iPageCount.ToString();
                CmbPage.SelectedIndex = 0;
                bFirst          = true;
                PnlPage.Visible = true;
            }
        }