public void ReportBySelectionDescriptionTestDataFound()
      {
          clsOrderLineCollection FilteredOrderLines = new clsOrderLineCollection();
          Boolean OK = true;

          FilteredOrderLines.ReportBySelectionDescription("Adidas");
          if (FilteredOrderLines.Count == 3)
          {
              if (FilteredOrderLines.OrderLineList[0].orderLineID != 3)
              {
                  OK = false;
              }
              if (FilteredOrderLines.OrderLineList[1].orderLineID != 13)
              {
                  OK = false;
              }
              if (FilteredOrderLines.OrderLineList[2].orderLineID != 16)
              {
                  OK = false;
              }
          }
          else
          {
              OK = false;
          }
          Assert.IsTrue(OK);
      }
      public void ReportBySelectionDescriptionNoneFound()
      {
          clsOrderLineCollection FilteredOrderLines = new clsOrderLineCollection();

          FilteredOrderLines.ReportBySelectionDescription("xxx xxx");
          Assert.AreEqual(0, FilteredOrderLines.Count);
      }
      public void ReportBySelectionDescriptionMethodOK()
      {
          clsOrderLineCollection AllOrderLines      = new clsOrderLineCollection();
          clsOrderLineCollection FilteredOrderLines = new clsOrderLineCollection();

          FilteredOrderLines.ReportBySelectionDescription("");
          Assert.AreEqual(AllOrderLines.Count, FilteredOrderLines.Count);
      }
예제 #4
0
    protected void btnApply_Click(object sender, EventArgs e)
    {
        clsOrderLineCollection OrderLines = new clsOrderLineCollection();

        OrderLines.ReportBySelectionDescription(txtFilter.Text);
        lstOrderLine.DataSource     = OrderLines.OrderLineList;
        lstOrderLine.DataValueField = "orderLineID";
        lstOrderLine.DataTextField  = "selectionDescription";
        lstOrderLine.DataBind();
    }