예제 #1
0
        private void GetVotesFromBillIndex(XPathNavigator bills, Hashtable votes)
        {
            if (!bills.MoveToFirstChild())
            {
                return;
            }
            if (!bills.MoveToFirstChild())
            {
                return;
            }
            while (true)
            {
                int    session    = int.Parse(bills.GetAttribute("session", ""));
                string billtype   = bills.GetAttribute("type", "");
                int    billnumber = int.Parse(bills.GetAttribute("number", ""));
                string status     = (string)bills.Evaluate("string(name(*))");
                string billtitle  = bills.GetAttribute("title", "");
                string rolls      = bills.GetAttribute("rolls", "");
                string statusstr  = Bills.GetStatusIndexed(bills.Select("."));

                if (rolls != "")
                {
                    AddBillInfo(billtype, session, billnumber, rolls.Split(','),
                                billtitle, statusstr, votes);
                }

                if (!bills.MoveToNext())
                {
                    break;
                }
            }
        }