示例#1
0
        public override void SetupData(XmlDocument doc)
        {
            XmlNodeList hourTotals = null;

            try {
                hourTotals = doc.DocumentElement.SelectNodes("/TotalsHourlySales/Hour");

                int counter = 0;
                foreach (XmlNode hourTotalNode in hourTotals)
                {
                    csvData.Add(new List <string>());

                    csvData[counter].Add(SummaHourlyTotalsCommon.GetHourId(hourTotalNode));
                    csvData[counter].Add(SummaHourlyTotalsCommon.GetTransQty(hourTotalNode));
                    csvData[counter].Add(SummaHourlyTotalsCommon.GetHourlyTotal(hourTotalNode));
                    csvData[counter].Add(SummaHourlyTotalsCommon.GetDateTime(hourTotalNode));
                    csvData[counter].Add(SummaCommon.GetStoreId(doc));
                    csvData[counter].Add(SummaCommon.GetTillId(doc));

                    counter++;

                    csvLineData.Add(new StringBuilder());
                }
            }
            catch (Exception e) {
                SummaException se = new SummaException("Problem processing hourly sales", e);
                se.Data = doc.OuterXml;
                throw se;
            }
        }
示例#2
0
        public override void SetupData(System.Xml.XmlDocument doc)
        {
            XmlNodeList fixedListTotals = null;

            try {
                fixedListTotals = doc.DocumentElement.SelectNodes("/TotalsCalculated/Calculated");

                int counter = 0;
                foreach (XmlNode fixedListTotalNode in fixedListTotals)
                {
                    csvData.Add(new List <string>());

                    csvData[counter].Add(SummaFixedListTotals.GetId(fixedListTotalNode));
                    csvData[counter].Add(SummaFixedListTotals.GetCount(fixedListTotalNode));
                    csvData[counter].Add(SummaFixedListTotals.GetTotalSales(fixedListTotalNode));
                    csvData[counter].Add(SummaFixedListTotals.GetTimestamp(fixedListTotalNode));
                    csvData[counter].Add(SummaCommon.GetStoreId(doc));
                    csvData[counter].Add(SummaCommon.GetTillId(doc));

                    counter++;

                    csvLineData.Add(new StringBuilder());
                }
            }
            catch (Exception e) {
                SummaException se = new SummaException("Problem processing fixed list totals", e);
                se.Data = doc.OuterXml;
                throw se;
            }
        }
示例#3
0
        public override void SetupData(XmlDocument doc)
        {
            XmlNodeList operatorTotals = null;

            try {
                operatorTotals = doc.DocumentElement.SelectNodes("/TotalsStaff/Staff");

                int counter = 0;
                foreach (XmlNode operatorTotalNode in operatorTotals)
                {
                    csvData.Add(new List <string>());

                    csvData[counter].Add(SummaOperatorTotals.GetOperatorId(operatorTotalNode));
                    csvData[counter].Add(SummaOperatorTotals.GetQtySold(operatorTotalNode));
                    csvData[counter].Add(SummaOperatorTotals.GetTotalSales(operatorTotalNode));
                    csvData[counter].Add(SummaOperatorTotals.GetTimestamp(operatorTotalNode));
                    csvData[counter].Add(SummaCommon.GetStoreId(doc));
                    csvData[counter].Add(SummaCommon.GetTillId(doc));

                    counter++;

                    csvLineData.Add(new StringBuilder());
                }
            }
            catch (Exception e) {
                SummaException se = new SummaException("Problem processing operator totals", e);
                se.Data = doc.OuterXml;
                throw se;
            }
        }
示例#4
0
        public override void SetupData(XmlDocument doc)
        {
            XmlNodeList paymentMethodTotals = null;

            try {
                paymentMethodTotals = doc.DocumentElement.SelectNodes("/TotalsPayments/TotalPayment");

                int counter = 0;
                foreach (XmlNode paymentTotalNode in paymentMethodTotals)
                {
                    csvData.Add(new List <string>());

                    csvData[counter].Add(SummaPaymentMethodTotalsCommon.GetPaymentId(paymentTotalNode));
                    csvData[counter].Add(SummaPaymentMethodTotalsCommon.GetTransactionCount(paymentTotalNode));
                    csvData[counter].Add(SummaPaymentMethodTotalsCommon.GetTotal(paymentTotalNode));
                    csvData[counter].Add(SummaPaymentMethodTotalsCommon.GetTimestamp(paymentTotalNode));
                    csvData[counter].Add(SummaCommon.GetStoreId(doc));
                    csvData[counter].Add(SummaCommon.GetTillId(doc));

                    counter++;

                    csvLineData.Add(new StringBuilder());
                }
            }
            catch (Exception e) {
                SummaException se = new SummaException("Problem processing payment method totals", e);
                se.Data = doc.OuterXml;
                throw se;
            }
        }
示例#5
0
        public override void SetupData(XmlDocument doc)
        {
            XmlNodeList productTotals = null;

            try {
                productTotals = doc.DocumentElement.SelectNodes("/TotalsProducts/Product");

                int counter = 0;
                foreach (XmlNode productTotalNode in productTotals)
                {
                    csvData.Add(new List <string>());

                    csvData[counter].Add(SummaProductTotalsCommon.GetProductId(productTotalNode));
                    csvData[counter].Add(SummaProductTotalsCommon.GetQty(productTotalNode));
                    csvData[counter].Add(SummaProductTotalsCommon.GetTotalSales(productTotalNode));
                    csvData[counter].Add(SummaProductTotalsCommon.GetTimestamp(productTotalNode));
                    csvData[counter].Add(SummaCommon.GetStoreId(doc));
                    csvData[counter].Add(SummaCommon.GetTillId(doc));

                    counter++;

                    csvLineData.Add(new StringBuilder());
                }
            }
            catch (Exception e) {
                SummaException se = new SummaException("Problem processing product totals", e);
                se.Data = doc.OuterXml;
                throw se;
            }
        }
示例#6
0
        public override void SetupData(System.Xml.XmlDocument doc)
        {
            XmlNodeList groupTotals = null;

            try {
                groupTotals = doc.DocumentElement.SelectNodes("/TotalsGroups/Group");

                int counter = 0;
                foreach (XmlNode groupTotalNode in groupTotals)
                {
                    csvData.Add(new List <string>());

                    csvData[counter].Add(SummaGroupTotals.GetGroupId(groupTotalNode));
                    csvData[counter].Add(SummaGroupTotals.GetQtySold(groupTotalNode));
                    csvData[counter].Add(SummaGroupTotals.GetTotalSales(groupTotalNode));
                    csvData[counter].Add(SummaGroupTotals.GetTimestamp(groupTotalNode));
                    csvData[counter].Add(SummaCommon.GetStoreId(doc));
                    csvData[counter].Add(SummaCommon.GetTillId(doc));

                    counter++;

                    csvLineData.Add(new StringBuilder());
                }
            }
            catch (Exception e) {
                SummaException se = new SummaException("Problem processing group totals", e);
                se.Data = doc.OuterXml;
                throw se;
            }
        }
示例#7
0
        public override void SetupData(XmlDocument doc)
        {
            XmlNodeList departmentTotals = null;

            try {
                departmentTotals = doc.DocumentElement.SelectNodes("/TotalsCategories/Category");


                int counter = 0;
                foreach (XmlNode departmentTotalNode in departmentTotals)
                {
                    csvData.Add(new List <string>());

                    csvData[counter].Add(SummaDepartmentTotals.GetDepartmentId(departmentTotalNode));
                    csvData[counter].Add(SummaDepartmentTotals.GetQtySold(departmentTotalNode));
                    csvData[counter].Add(SummaDepartmentTotals.GetTotalSales(departmentTotalNode));
                    csvData[counter].Add(SummaDepartmentTotals.GetTimestamp(departmentTotalNode));
                    csvData[counter].Add(SummaCommon.GetStoreId(doc));
                    csvData[counter].Add(SummaCommon.GetTillId(doc));

                    counter++;

                    csvLineData.Add(new StringBuilder());
                }
            }
            catch (Exception e) {
                SummaException se = new SummaException("Problem processing department totals", e);
                se.Data = doc.OuterXml;
                throw se;
            }
        }