Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SalesSvc.SalesServiceClient client = new SalesSvc.SalesServiceClient();

            SalesSvc.Quote[] quotes = client.GetQuotes();

            List <SalesSvc.Quote> newQuotes                = new List <SalesSvc.Quote>();
            List <SalesSvc.Quote> quotesCheckStock         = new List <SalesSvc.Quote>();
            List <SalesSvc.Quote> quotesPendingApprovalETA = new List <SalesSvc.Quote>();

            foreach (SalesSvc.Quote q in quotes)
            {
                switch (q.Status)
                {
                case SalesSvc.StatusCode.New:
                    newQuotes.Add(q);
                    break;

                case SalesSvc.StatusCode.ApprovedCheckStock:
                    quotesCheckStock.Add(q);
                    break;

                case SalesSvc.StatusCode.ETAPendingApproval:
                    quotesPendingApprovalETA.Add(q);
                    break;

                default:
                    break;
                }
            }

            CheckStockCountLabel.Text = quotesCheckStock.Count.ToString();
            NewQuotesCountLabel.Text  = newQuotes.Count.ToString();
            ETACountLabel.Text        = quotesPendingApprovalETA.Count.ToString();
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     quotes    = client.GetQuotes();
     quotes    = quotes.Reverse().ToArray();
     customers = client.GetCustomers();
     QuotesListLiteral.Text = "";
     foreach (SalesSvc.Quote q in quotes)
     {
         int i = findIndex(customers, q.CustomerID);
         QuotesListLiteral.Text += "<a href=\"EditQuote.aspx?quote=" + q.ID + "\"><li>" + customers[i].Name + "<br />" + q.Status + "<br />" + q.ServiceDescription + "</li></a>";
     }
 }