예제 #1
0
        //private void RefreshHouseData(object state)
        //{
        //    while (true)
        //    {
        //        string sHouseRefreshTime = ConfigurationManager.AppSettings["DonateHouseRefreshTime"];
        //        int nHouseRefreshTime = Convert.ToInt16(sHouseRefreshTime);
        //        if (m_nCountDonateHouse % nHouseRefreshTime == 0)
        //        {
        //            App.Current.Dispatcher.BeginInvoke(new updateDelegate(getDonateHouseContent));
        //            m_nCountDonateHouse = 0;
        //        }
        //        m_nCountDonateHouse++;
        //    }
        //}


        private void DataExchange()
        {
            for (int i = 1; i < (PayListHistorys.Count); i++)
            {
                PayListHistorys.Move(i - 1, i);
            }
        }
예제 #2
0
        private async void getDonateListContent()
        {
            try
            {
                //PayListHistorys.Clear();
                await GetDonatlistbyWebService();

                //pWebData.GetTemplePayHistorybyWebService();
                //pWebData.GetHousePayHistorybyWebService
                if (pWebData != null &&
                    m_pDonatelistData != null &&
                    m_pDonatelistData.body != null &&
                    m_pDonatelistData.body.data != null)
                {
                    List <PayListHistory> PayListTemp = new List <PayListHistory>();
                    foreach (TemplePayHistoryDatabody payHistTemp in m_pDonatelistData.body.data)
                    {
                        PayListHistory pTemp = new PayListHistory();
                        pTemp.amount = payHistTemp.amount;
                        if (payHistTemp.name != null)
                        {
                            pTemp.Name = payHistTemp.name;
                        }

                        if (payHistTemp.payTypeName != null)
                        {
                            pTemp.payTypeName = payHistTemp.payTypeName;
                        }
                        PayListTemp.Add(pTemp);
                        //PayListHistorys.Add(pTemp);
                    }

                    int i = 0;
                    foreach (PayListHistory datatemp in PayListTemp)
                    {
                        if (i < PayListHistorys.Count)
                        {
                            PayListHistorys[i] = datatemp;
                        }
                        else
                        {
                            PayListHistorys.Add(datatemp);
                        }
                        i++;
                    }
                    PayListTemp.Clear();
                }
            }
            catch (Exception ex) { }
        }