protected void btnFind_Click(object sender, EventArgs e) { //create instance of the class clsOrder AnOrder = new clsOrder(); //variable to store the primary key Int32 OrderNo; //variable to store the result Boolean Found = false; //get the primary key entered by the user OrderNo = Convert.ToInt32(txtOrderNo.Text); //find the record Found = AnOrder.Find(OrderNo); //if found if (Found == true) { //display the values in the form lblCustomerID1.Text = AnOrder.CustomerID.ToString(); lblTown1.Text = AnOrder.DeliveryTown; lblDate1.Text = AnOrder.DateAdded.ToString(); lblStatus1.Text = AnOrder.OrderStatus.ToString(); lblOrderValue1.Text = AnOrder.OrderValue.ToString(); lblEmail1.Text = AnOrder.EmailAddress; } else { lblError.Text = "Order number not found"; } }
protected void btnFind_Click(object sender, EventArgs e) { //create an instance of the address class clsOrder AnOrder = new clsOrder(); //variable to store the primary key Int32 OrderId; //variable to store the result to find operation Boolean Found = false; //get the primary key entered by the user OrderId = Convert.ToInt32(txtOrderID.Text); //find the record Found = AnOrder.Find(OrderId); //if found if (Found == true) { //display the values of the properties in the form txtCustomerID.Text = AnOrder.CustomerId.ToString(); txtDateReceived.Text = AnOrder.DateReceived.ToString(); txtOrderPrice.Text = AnOrder.OrderPrice.ToString(); txtDescription.Text = AnOrder.Description; txtQuantity.Text = AnOrder.Quantity.ToString(); lblError.Text = ""; } if (Found == false) { lblError.Text = "Order ID not found"; } }
protected void btnFind_Click(object sender, EventArgs e) { //create an instance of the address class clsOrder anOrder = new clsOrder(); //variable to store the primary key Int32 OrderNo; //variable to store the result of the find operation Boolean Found = false; //get the primary key entered by the user OrderNo = Convert.ToInt32(txtOrderNo.Text); //find the record Found = anOrder.Find(OrderNo); //if found if (Found == true) { txtEmail.Text = anOrder.OrderEmail; txtFirstName.Text = anOrder.OrderFirstName; txtLastName.Text = anOrder.OrderLastName; txtAddress.Text = anOrder.OrderAddress; txtCity.Text = anOrder.OrderCity; txtPostcode.Text = anOrder.OrderPostcode; txtPhoneNumber.Text = anOrder.OrderPhoneNumber; txtDateAdded.Text = anOrder.OrderDateAdded.ToString(); } }
protected void Button1_Click(object sender, EventArgs e) { //create an instance of the order class clsOrder AnOrder = new clsOrder(); Int32 OrderNumber; Boolean Found = false; OrderNumber = Convert.ToInt32(txtOrderNo.Text); Found = AnOrder.Find(OrderNumber); if (Found == true) { txtCustomerName.Text = AnOrder.CustomerName; txtEmail.Text = AnOrder.Email; txtTrackingNo.Text = AnOrder.TrackingNumber; txtOrderNo.Text = AnOrder.OrderNumber.ToString(); txtQuantity.Text = AnOrder.Quantity.ToString(); txtShippingDate.Text = AnOrder.ShippingDate.ToString(); txtTotalPrice.Text = AnOrder.TotalPrice.ToString(); txtTrackingNo.Text = AnOrder.TrackingNumber; } }
public void FindMethodOk() { clsOrder AOrder = new clsOrder(); Boolean Found = false; Int32 OrderNo = 5; Found = AOrder.Find(OrderNo); Assert.IsTrue(Found); }
public void FindMethodOK() { clsOrder anOrder = new clsOrder(); Boolean Found = false; Int32 OrderNumber = 1; Found = anOrder.Find(OrderNumber); Assert.IsTrue(Found); }
public void FindMethodOk() { clsOrder new_order = new clsOrder(); Boolean Found = false; Int32 orderID = 1; Found = new_order.Find(orderID); Assert.IsTrue(Found); }
public void TestPayedFound() { clsOrder anOrder = new clsOrder(); Boolean Found = false; Int32 OrderNumber = 3; Found = anOrder.Find(OrderNumber); Assert.IsTrue(anOrder.Payed); }
public void FindMethodOK() { clsOrder AOrder = new clsOrder(); Boolean Found = false; int OrderID = 1; Found = AOrder.Find(OrderID); Assert.IsTrue(Found); }
public void FindMethodOK() { clsOrder AnOrder = new clsOrder(); Boolean found = false; Int32 OrderId = 2; found = AnOrder.Find(OrderId); Assert.IsTrue(found); }
public void FindOrderOK() { clsOrder anOrder = new clsOrder(); Boolean Found = false; Int32 OrderNo = 2; Found = anOrder.Find(OrderNo); Assert.IsTrue(Found); }
public void FindMethodOK() { clsOrder AnOrder = new clsOrder(); Boolean Found = false; int OrderNum = 2; Found = AnOrder.Find(OrderNum); Assert.IsTrue(Found); }
public void TestTotalCostFound() { clsOrder AnOrder = new clsOrder(); Boolean Found = false; Boolean OK = true; Int32 OrderNo = 1; Found = AnOrder.Find(OrderNo); if (AnOrder.TotalCost != "5.50") { OK = false; } Assert.IsTrue(OK); }
public void FindMethodOK() { //Create instance of the class to create clsOrder AnOrder = new clsOrder(); //create some test data Boolean Found = false; //create some test data to use with the method Int32 OrderNo = 1; Found = AnOrder.Find(OrderNo); //test to see result is correct Assert.IsTrue(Found); }
public void FindMethodOK() { //create an instance of the class we want to create clsOrder AnOrder = new clsOrder(); Boolean Found = false; Int32 OrderNo = 32; Found = AnOrder.Find(OrderNo); //test to see if the result is true Assert.IsTrue(Found); }
public void TestOrderNoFound() { clsOrder AnOrder = new clsOrder(); Boolean Found = false; Boolean OK = true; Int32 OrderNo = 1; Found = AnOrder.Find(OrderNo); if (AnOrder.OrderNo != "1") { OK = false; } Assert.IsTrue(OK); }
public void AvailableSeatsFound() { clsOrder AnOrder = new clsOrder(); Boolean Found = false; Boolean OK = true; Int32 OrderNo = 1; Found = AnOrder.Find(OrderNo); if (AnOrder.AvailableSeats != true) { OK = false; } Assert.IsTrue(OK); }
public void TestAvailabilityFound() { clsOrder AOrder = new clsOrder(); Boolean Found = false; Boolean Ok = true; int OrderID = 1; Found = AOrder.Find(OrderID); if (AOrder.Availability != true) { Ok = false; } Assert.IsTrue(Ok); }
public void ItemAvailabilityFind() { clsOrder AOrder = new clsOrder(); Boolean Found = false; Boolean OK = true; Int32 OrderNo = 5; Found = AOrder.Find(OrderNo); if (AOrder.ItemAvailability != true) { OK = false; } Assert.IsTrue(OK); }
public void FindMethodOK() { //create an instance of the class I want to create clsOrder AnOrder = new clsOrder(); //boolean variable to store the result of the validation Boolean Found = false; //Create some test data to use with the method Int32 OrderID = 1; //Invoke the method Found = AnOrder.Find(OrderID); //test to see that the result is correct Assert.IsTrue(Found); }
public void FindMethodOK() { //create an instance of the class we want to create clsOrder AnOrder = new clsOrder(); // boolean Variable to store the result of the validation Boolean Found = false; //create some test data to use with the method int Order_ID = 1; // invoke the method Found = AnOrder.Find(Order_ID); Assert.IsTrue(Found); }
public void DeliveryAddressFind() { clsOrder AOrder = new clsOrder(); Boolean Found = false; Boolean OK = true; Int32 OrderNo = 5; Found = AOrder.Find(OrderNo); if (AOrder.DeliveryAddress != "FK17 8AJ") { OK = false; } Assert.IsTrue(OK); }
public void FindMethodOK() { //create an instance of the class we want to create clsOrder AnOrder = new clsOrder(); //Boolean variable to store the results of the validatio Boolean Found = false; //create some test data to use with the method Int32 OrderNo = 1; //invoke the method Found = AnOrder.Find(OrderNo); //test to see if the result is true Assert.IsTrue(Found); }
public void TestProductDescriptionFound() { clsOrder AOrder = new clsOrder(); Boolean Found = false; Boolean Ok = true; int OrderID = 1; Found = AOrder.Find(OrderID); if (AOrder.ProductDescription != "Three long sleeve shirts") { Ok = false; } Assert.IsTrue(Ok); }
public void TestItemPriceFound() { clsOrder AOrder = new clsOrder(); Boolean Found = false; Boolean Ok = true; int OrderID = 1; Found = AOrder.Find(OrderID); if (AOrder.ItemPrice != 43) { Ok = false; } Assert.IsTrue(Ok); }
public void TestItemColourFound() { clsOrder AOrder = new clsOrder(); Boolean Found = false; Boolean Ok = true; int OrderID = 1; Found = AOrder.Find(OrderID); if (AOrder.ItemColour != "red") { Ok = false; } Assert.IsTrue(Ok); }
public void TestCustomerAddressFound() { clsOrder AOrder = new clsOrder(); Boolean Found = false; Boolean Ok = true; int OrderID = 1; Found = AOrder.Find(OrderID); if (AOrder.CustomerAddress != "39 Random Street LE1 2MA") { Ok = false; } Assert.IsTrue(Ok); }
public void TestOrderDateFound() { clsOrder AOrder = new clsOrder(); Boolean Found = false; Boolean Ok = true; int OrderID = 1; Found = AOrder.Find(OrderID); if (AOrder.OrderDate != Convert.ToDateTime("20/04/2021")) { Ok = false; } Assert.IsTrue(Ok); }
public void TestCustomerNoFound() { clsOrder AOrder = new clsOrder(); Boolean Found = false; Boolean Ok = true; int OrderID = 1; Found = AOrder.Find(OrderID); if (AOrder.CustomerNo != 876) { Ok = false; } Assert.IsTrue(Ok); }
public void TestOrderIdFound() { clsOrder AOrder = new clsOrder(); Boolean Found = false; Boolean Ok = true; int OrderID = 1; Found = AOrder.Find(OrderID); if (AOrder.OrderID != 1) { Ok = false; } Assert.IsTrue(Ok); }