public void TestActivityIncentiveTemp() { LoginPage lpage = new LoginPage(ObjectRepository.Driver); HomePage hPage = lpage.LoginApplication(ObjectRepository.Config.GetUsername(), ObjectRepository.Config.GetPassword()); ManageIncentivePrograms mIPage = hPage.OpenManageIncentivePrograms(); NewProgram npPage = mIPage.ClickNewProgram(); ActivityIncentiveTemplate aiPage = npPage.CreateActivityIncentiveTemplate(); aiPage.SelectProgramName("Test", "Test"); aiPage.SelectProgramVisibilityStartDate("28", "October", "2015"); aiPage.SelectProgramVisibilityEndDate("01", "October", "2002"); aiPage.SelectProgramStartDate("26", "April", "2002"); aiPage.SelectProgramEndDate("30", "November", "2015"); aiPage.SelectProgramLastSubmitDate("01", "December", "2015"); aiPage.SelectProgramCloseDates("31", "December", "2015"); aiPage.AddPoints("1001", "22", "Hello1"); aiPage.AddPointType("test", "100"); aiPage.AddProgramIncentive("CODE1", "TPE1", "TesTing", "100"); aiPage.AddEligibleGroup("test"); aiPage.CheckValidationField(true, false, true, false, false); aiPage.ClickFinish(); mIPage.SelectItemPerList("100"); mIPage.VerifyIncentiveGridEntry("//div[@id='ManageIncentiveProgramsGrid']/div/div[position()=3]", "Test", "24/04/2002", "01/10/2002", "Pending"); Thread.Sleep(1000); Logout(); }
public void TestSalesIncentiveTemp() { LoginPage lpage = new LoginPage(ObjectRepository.Driver); HomePage hPage = lpage.LoginApplication(ObjectRepository.Config.GetUsername(), ObjectRepository.Config.GetPassword()); ManageIncentivePrograms mIPage = hPage.OpenManageIncentivePrograms(); NewProgram npPage = mIPage.ClickNewProgram(); SalesIncentiveTemplateBasic sitPage = npPage.CreateSalesIncentiveTemplate(); sitPage.SelectProgramName("Test", "Test"); sitPage.SelectProgramVisibilityStartDate("05", "April", "2002"); sitPage.SelectProgramVisibilityEndDate("01", "October", "2002"); sitPage.SelectProgramStartDate("26", "April", "2002"); sitPage.SelectProgramEndDate("30", "November", "2015"); sitPage.SelectProgramLastSubmitDate("01", "December", "2015"); sitPage.SelectProgramCloseDates("31", "December", "2015"); sitPage.AddPoints("1001", "22"); sitPage.AddPointType("test", "100"); sitPage.AddProdProgramIncentive("10", "prodSku", "ProdDesc", "PordFamily", "ProdClass", "ProdLine", "ProdType", "unitSoldMAx", "unitSoldMin"); sitPage.AddEligibleGroup("test", true, "test"); sitPage.OpenValidationField(); sitPage.AddInvoiceNoValidation(true, true, true); // Similarly for other validation sitPage.AddClaimAuditValidation(true, "100", true); Thread.Sleep(4000); }
public ActionResult CreateProgram(NewProgram newProgram) { // if is program exists throw error message if (projectService.IsProgramNameExists(newProgram.ProgramName.Trim(), newProgram.ResourceID)) { return(Conflict(new ErrorDetails { ExceptionMessage = ResponseMessages.PROGRAM_NAME_EXISTS, StatusCode = ResponseCodes.STATUS_CODE_CONFLICT })); } else { ProgramModel createdProgram = projectService.CreateProgram(newProgram); return(Created(ResponseMessages.PROGRAM_CREATED, createdProgram)); } }
public void CreateProgram() { //Arrange ProgramModel createdProgram = Programs.CreatedProgram; NewProgram newProgram = Programs.NewProgram; var projectService = new Mock <IProjectService>(); projectService.Setup(service => service.IsProgramNameExists(createdProgram.Name, createdProgram.ResourceID)) .Returns(false); var controller = new ProgramController(projectService.Object); // Act var values = controller.CreateProgram(newProgram); var result = values as CreatedResult; //Assert Assert.Equal(201, result.StatusCode); Assert.Equal(ResponseMessages.PROGRAM_CREATED, result.Location); }
protected void SubmitProgram(object sender, EventArgs e) { using (SqlConnection connection = new SqlConnection(WebConfigurationManager.ConnectionStrings["connString"].ConnectionString)) { connection.Open(); string grabOrganization = "SELECT AddressID FROM Organization WHERE OrganizationID = @Organization_ID"; SqlCommand cmd1 = connection.CreateCommand(); cmd1.CommandType = CommandType.Text; cmd1.CommandText = grabOrganization; cmd1.Parameters.AddWithValue("@Organization_ID", drpOrganizationList.SelectedValue); int AddressID_from_Organization = Convert.ToInt32(cmd1.ExecuteScalar()); NewProgram addNewProgram = new NewProgram(Int32.Parse(HttpUtility.HtmlEncode(txtKid.Text)), Int32.Parse(HttpUtility.HtmlEncode(txtAdult.Text)), Int32.Parse(HttpUtility.HtmlEncode(txtKid.Text)) + Int32.Parse(HttpUtility.HtmlEncode(txtAdult.Text)), HttpUtility.HtmlEncode(drpAgeLevel.SelectedValue), "Completed", DateTime.Parse(HttpUtility.HtmlEncode(txtProgramTime.Text)), DateTime.Parse(HttpUtility.HtmlEncode(txtProgramDate.Text)), HttpUtility.HtmlEncode(txtNotes.Text), HttpUtility.HtmlEncode(drpLocationTypeList.SelectedValue), Convert.ToInt32(HttpUtility.HtmlEncode(drpProgramList.SelectedValue)), DateTime.Today, HttpUtility.HtmlEncode(Session["UserFullName"].ToString())); string grabNewProgramID = "SELECT NewProgramID FROM NewProgram WHERE NewProgramID = (SELECT MAX(NewProgramID) FROM NewProgram)"; SqlCommand cmd2 = connection.CreateCommand(); cmd2.CommandType = CommandType.Text; cmd2.CommandText = grabNewProgramID; int Find_NewProgramID = Convert.ToInt32(cmd2.ExecuteScalar()); string grabProgramCost = "SELECT ProgramCost FROM Program WHERE ProgramID = @Program_ID"; SqlCommand cmd3 = connection.CreateCommand(); cmd3.CommandType = CommandType.Text; cmd3.CommandText = grabProgramCost; cmd3.Parameters.AddWithValue("@Program_ID", drpProgramList.SelectedValue); if (drpLocationTypeList.SelectedValue == "Offsite") { Find_ProgramCost = Convert.ToInt32(cmd3.ExecuteScalar()); lblSubtotalCost.Text = Convert.ToString(Find_ProgramCost); double mileageCost = Convert.ToInt32(HttpUtility.HtmlEncode(txtMileage.Text)) * .57; lblMileageCost.Text = Convert.ToString(mileageCost); Find_ProgramCost += mileageCost; lblTotalCostPrice.Text = Convert.ToString(Find_ProgramCost); } else { Find_ProgramCost = Convert.ToInt32(cmd3.ExecuteScalar()); lblSubtotalCost.Text = Convert.ToString(Find_ProgramCost); lblTotalCostPrice.Text = Convert.ToString(Find_ProgramCost); } lblCartTotal.Text = "1"; string insertIntoNewProgram = "INSERT INTO NewProgram([TotalKids], [TotalAdults]," + "[TotalPeople], [AgeLevel], [NewProgramStatus], [TimeSlot]," + "[DateCompleted], [LocationType], [MiscNotes], [ProgramID], [AddressID],[LastUpdated], [LastUpdatedBy]) VALUES (" + "@kid, @adult, @totalPeople, @age, @status, @time, @complete," + "@location, @miscNotes, @programid, @addressid, @LU, @LUB)"; using (SqlCommand command = new SqlCommand(insertIntoNewProgram, connection)) { command.Parameters.AddWithValue("@kid", addNewProgram.getNumKids()); command.Parameters.AddWithValue("@adult", addNewProgram.getNumAdults()); command.Parameters.AddWithValue("@totalpeople", addNewProgram.getTotalPeople()); command.Parameters.AddWithValue("@age", addNewProgram.getAgeLevel()); command.Parameters.AddWithValue("@status", addNewProgram.getProgramStatus()); command.Parameters.AddWithValue("@time", addNewProgram.getTimeSlot()); command.Parameters.AddWithValue("@complete", addNewProgram.getDateCompleted()); command.Parameters.AddWithValue("@location", addNewProgram.getLocationType()); command.Parameters.AddWithValue("@miscNotes", addNewProgram.getMiscNotes()); command.Parameters.AddWithValue("@programid", addNewProgram.getProgramID()); command.Parameters.AddWithValue("@addressid", AddressID_from_Organization); command.Parameters.AddWithValue("@LU", addNewProgram.getLastUpdated()); command.Parameters.AddWithValue("@LUB", addNewProgram.getLastUpdatedBy()); command.ExecuteNonQuery(); } List <int> UserList = new List <int>(); for (int i = 0; i < CheckBoxList1.Items.Count; i++) { if (CheckBoxList1.Items[i].Selected) { UserList.Add(Convert.ToInt32(CheckBoxList1.Items[i].Value)); } } string assignUser = "******" + "@UserID, @NewProgramID, @LastUpdated, @LastUpdatedBy)"; foreach (int user in UserList) { using (SqlCommand command = new SqlCommand(assignUser, connection)) { command.Parameters.AddWithValue("@UserID", user); command.Parameters.AddWithValue("@NewProgramID", Find_NewProgramID); command.Parameters.AddWithValue("@LastUpdated", DateTime.Today); command.Parameters.AddWithValue("@LastUpdatedBy", Session["UserFullName"].ToString()); command.ExecuteNonQuery(); } } List <int> AnimalList = new List <int>(); for (int i = 0; i < CheckBoxList2.Items.Count; i++) { if (CheckBoxList2.Items[i].Selected) { AnimalList.Add(Convert.ToInt32(CheckBoxList2.Items[i].Value)); } } for (int i = 0; i < CheckBoxList3.Items.Count; i++) { if (CheckBoxList3.Items[i].Selected) { AnimalList.Add(Convert.ToInt32(CheckBoxList3.Items[i].Value)); } } for (int i = 0; i < CheckBoxList4.Items.Count; i++) { if (CheckBoxList4.Items[i].Selected) { AnimalList.Add(Convert.ToInt32(CheckBoxList4.Items[i].Value)); } } string assignAnimals = "INSERT INTO AssignAnimal([AnimalID], [NewProgramID], [LastUpdated], [LastUpdatedBy])VALUES (" + "@AnimalID, @NewProgramID, @LastUpdated, @LastUpdatedBy)"; foreach (int animal in AnimalList) { using (SqlCommand command = new SqlCommand(assignAnimals, connection)) { command.Parameters.AddWithValue("@AnimalID", animal); command.Parameters.AddWithValue("@NewProgramID", Find_NewProgramID); command.Parameters.AddWithValue("@LastUpdated", DateTime.Today); command.Parameters.AddWithValue("@LastUpdatedBy", HttpUtility.HtmlEncode(Session["UserFullName"].ToString())); ///Need to change this command.ExecuteNonQuery(); } } if (drpContact.SelectedIndex == 0) { string insertContact = "INSERT INTO Contact([FirstName], [LastName], [Email], [PrimaryPhoneNumber],[SecondaryPhoneNumber], [OrganizationID], [LastUpdated], [LastUpdatedBy]) VALUES (" + "@FirstName, @LastName, @Email, @Primary, @Secondary, @orgID, @LastUpdated, @LastUpdatedBy)"; using (SqlCommand command = new SqlCommand(insertContact, connection)) { command.Parameters.AddWithValue("@FirstName", HttpUtility.HtmlEncode(txtFirstName.Text)); command.Parameters.AddWithValue("@LastName", HttpUtility.HtmlEncode(txtLastName.Text)); command.Parameters.AddWithValue("@Email", HttpUtility.HtmlEncode(txtEmail.Text)); command.Parameters.AddWithValue("@Primary", HttpUtility.HtmlEncode(txtPrimaryPhone.Text)); command.Parameters.AddWithValue("@Secondary", HttpUtility.HtmlEncode(txtSecondaryPhone.Text)); command.Parameters.AddWithValue("@orgID", HttpUtility.HtmlEncode(drpOrganizationList.SelectedValue)); command.Parameters.AddWithValue("@LastUpdated", DateTime.Today); command.Parameters.AddWithValue("@LastUpdatedBy", HttpUtility.HtmlEncode(Session["UserFullName"].ToString())); command.ExecuteNonQuery(); } } if (drpLocationTypeList.SelectedValue == "Offsite") { Invoice newInvoice = new Invoice(HttpUtility.HtmlEncode(txtInvoice.Text), Find_ProgramCost, Convert.ToDateTime(HttpUtility.HtmlEncode(txtProgramDate.Text)), "Unpaid", DateTime.Today, HttpUtility.HtmlEncode(Session["UserFullName"].ToString()), Convert.ToInt32(HttpUtility.HtmlEncode(txtMileage.Text))); string invoiceInsert = "Insert into Invoice([InvoiceNumber], [TotalCost], [DateCreated], [InvoiceStatus], [LastUpdated], [LastUpdatedBy], [TotalMileage]) VALUES (" + "@InvoiceNumber, @TotalCost, @DateCreated, @InvoiceStatus, @LastUpdated, @LastUpdatedBy, @Mileage)"; using (SqlCommand command = new SqlCommand(invoiceInsert, connection)) { command.Parameters.AddWithValue("@InvoiceNumber", newInvoice.getInvoiceNumber()); command.Parameters.AddWithValue("@TotalCost", newInvoice.getTotal()); command.Parameters.AddWithValue("@DateCreated", newInvoice.getDateCreated()); command.Parameters.AddWithValue("@InvoiceStatus", newInvoice.getInvoiceStatus()); command.Parameters.AddWithValue("@LastUpdated", newInvoice.getLastUpdated()); command.Parameters.AddWithValue("@LastUpdatedBy", newInvoice.getLastUpdatedBy()); command.Parameters.AddWithValue("@Mileage", newInvoice.getMileage()); command.ExecuteNonQuery(); } } else { Invoice newInvoice = new Invoice(HttpUtility.HtmlEncode(txtInvoice.Text), Find_ProgramCost, Convert.ToDateTime(HttpUtility.HtmlEncode(txtProgramDate.Text)), "Unpaid", DateTime.Today, HttpUtility.HtmlEncode(Session["UserFullName"].ToString()), 0); string invoiceInsert = "Insert into Invoice([InvoiceNumber], [TotalCost], [DateCreated], [InvoiceStatus], [LastUpdated], [LastUpdatedBy], [TotalMileage]) VALUES (" + "@InvoiceNumber, @TotalCost, @DateCreated, @InvoiceStatus, @LastUpdated, @LastUpdatedBy, @Mileage)"; using (SqlCommand command = new SqlCommand(invoiceInsert, connection)) { command.Parameters.AddWithValue("@InvoiceNumber", newInvoice.getInvoiceNumber()); command.Parameters.AddWithValue("@TotalCost", newInvoice.getTotal()); command.Parameters.AddWithValue("@DateCreated", newInvoice.getDateCreated()); command.Parameters.AddWithValue("@InvoiceStatus", newInvoice.getInvoiceStatus()); command.Parameters.AddWithValue("@LastUpdated", newInvoice.getLastUpdated()); command.Parameters.AddWithValue("@LastUpdatedBy", newInvoice.getLastUpdatedBy()); command.Parameters.AddWithValue("@Mileage", newInvoice.getMileage()); command.ExecuteNonQuery(); } } string grabInvoiceID = "Select InvoiceID from Invoice where InvoiceID = (Select Max(InvoiceID) from Invoice)"; SqlCommand cmd4 = connection.CreateCommand(); cmd4.CommandType = CommandType.Text; cmd4.CommandText = grabInvoiceID; int Find_InvoiceID = Convert.ToInt32(cmd4.ExecuteScalar()); string assignInvoice = "Insert into AssignInvoice([InvoiceID], [NewProgramID], [LastUpdated], [LastUpdatedBy])VALUES (" + "@InvoiceID, @NewProgramID, @LastUpdated, @LastUpdatedBy)"; using (SqlCommand command = new SqlCommand(assignInvoice, connection)) { command.Parameters.AddWithValue("@InvoiceID", Find_InvoiceID); command.Parameters.AddWithValue("@NewProgramID", Find_NewProgramID); command.Parameters.AddWithValue("@LastUpdated", DateTime.Today); command.Parameters.AddWithValue("@LastUpdatedBy", Session["UserFullName"].ToString()); ///Need to change this command.ExecuteNonQuery(); } int orgID; string findOrgID = "SELECT OrganizationID from Organization where OrganizationName = @selectedOrg"; using (SqlCommand command = new SqlCommand(findOrgID, connection)) { command.Parameters.AddWithValue("@selectedOrg", drpOrganizationList.SelectedItem.Text); orgID = Convert.ToInt32(command.ExecuteScalar()); } string insertIntoPayment = "Insert into Payment([PaymentType],[OrganizationID],[InvoiceID],[LastUpdated],[LastUpdatedBy]) VALUES (@paymentType, @organizationID, @invoiceID, @lastUpdated, @lastUpdatedBy)"; using (SqlCommand command = new SqlCommand(insertIntoPayment, connection)) { command.Parameters.AddWithValue("@paymentType", "TBD"); command.Parameters.AddWithValue("@organizationID", orgID); command.Parameters.AddWithValue("@invoiceID", Find_InvoiceID); command.Parameters.AddWithValue("@lastUpdated", DateTime.Today); command.Parameters.AddWithValue("@lastUpdatedBy", Session["UserFullName"].ToString()); command.ExecuteNonQuery(); } } }
protected void BtnAddProgram_Click(object sender, EventArgs e) { NewProgram.btnCount++; programID = Convert.ToInt32(drpOrganizationList.SelectedValue); /*Grab ProgramID*/ //if (txtMileage.Visible == true) //{ // NewProgram newProgram = new NewProgram(Int32.Parse(txtKids.Text), Int32.Parse(txtAdults.Text), // /* people*/ 50, drpAgeLevel.SelectedValue, /*mileage*/ Int32.Parse(txtMileage.Text), "Completed", // /*time*/DateTime.Now, Convert.ToDateTime(datepicker.Value), txtMiscNotes.Value, drpLocationTypeList.SelectedValue, // programID, /*addressID*/10, DateTime.Now, "Raina"); // NewProgram.programList.Add(newProgram); //} //else if (txtMileage.Visible == false) //{ // NewProgram newProgram = new NewProgram(Int32.Parse(txtKids.Text), Int32.Parse(txtAdults.Text), // /* people*/ 50, drpAgeLevel.SelectedValue, /*mileage*/ 0, "Completed", // /*time*/DateTime.Now, Convert.ToDateTime(datepicker.Value), txtMiscNotes.Value, drpLocationTypeList.SelectedValue, // programID, /*addressID*/10, DateTime.Now, "Raina"); // NewProgram.programList.Add(newProgram); //} int totalPeople; totalPeople = Convert.ToInt32(txtAdults.Text) + Convert.ToInt32(txtKids.Text); if (drpLocationTypeList.SelectedValue == "Onsite") { if (totalPeople < 20) { programCost = 100.00; } else { programCost = totalPeople * 5.00; } } else if (drpLocationTypeList.SelectedValue == "Online") { programCost = 0.00; } else if (drpLocationTypeList.SelectedValue == "Offsite") { if (NewProgram.btnCount == 0) { programCost = 250.00; } else { programCost = 160.00; } } NewProgram newProgram = new NewProgram(Int32.Parse(txtKids.Text), Int32.Parse(txtAdults.Text), totalPeople, drpAgeLevel.SelectedValue, "Completed", Convert.ToDateTime(programTime.Text), Convert.ToDateTime(datepicker.Value), txtMiscNotes.Value, drpLocationTypeList.SelectedValue, programID, DateTime.Now, "Raina", programCost); NewProgram.programList.Add(newProgram); drpAgeLevel.SelectedValue = null; txtAdults.Text = null; txtKids.Text = null; txtMiscNotes.InnerText = null; drpLocationTypeList.SelectedValue = null; drpProgramList.SelectedValue = null; NewProgram.baseCost = 250 + (160 * (NewProgram.programList.Count - 1)); //txtBaseCost.Text = NewProgram.baseCost.ToString(); //Assigning to textboxes for testing //totalCost = NewProgram.baseCost + (Convert.ToDouble(txtMileage.Text) * .57); ////txtProgramCost.Text = NewProgram.baseCost.ToString(); //txtMileage.Text = NewProgram.programList.Count.ToString(); //txtTotalCost.Text = totalCost.ToString();() string location = NewProgram.programList[0].getLocationType(); if (location == "Offsite" && NewProgram.btnCount >= 1) { datepicker.Disabled = true; drpOrganizationList.Enabled = false; drpLocationTypeList.SelectedIndex = 2; drpLocationTypeList.Enabled = false; } for (int z = 0; z < NewProgram.programList.Count; z++) { if (z == 0) { lblProgramCostOne.Text = Convert.ToString(NewProgram.programList[z].getPrgCost()); totalCost += NewProgram.programList[z].getPrgCost(); programOne.Visible = true; programTwo.Visible = false; programThree.Visible = false; } if (z == 1) { lblProgramCostTwo.Text = Convert.ToString(NewProgram.programList[z].getPrgCost()); totalCost += NewProgram.programList[z].getPrgCost(); programTwo.Visible = true; } if (z == 2) { lblProgramCostThree.Text = Convert.ToString(NewProgram.programList[z].getPrgCost()); totalCost += NewProgram.programList[z].getPrgCost(); programThree.Visible = true; } } lblCartTotal.Text = Convert.ToString(NewProgram.programList.Count); //lblProgramCostOne.Text = NewProgram.programList //lblProgramCostTwo.Text = Convert.ToString(programCost); //lblProgramCostThree.Text = Convert.ToString(programCost); lblSubtotalCost.Text = totalCost.ToString(); totalCost += mileageCost; lblTotalCostPrice.Text = totalCost.ToString(); NewProgram.btnCount += 1; }
protected void BtnAddProgram_Click(object sender, EventArgs e) { programID = Convert.ToInt32(drpProgramList.SelectedValue); /*Grab ProgramID*/ int totalPeople; totalPeople = Convert.ToInt32(txtAdults.Text) + Convert.ToInt32(txtKids.Text); if (drpLocationTypeList.SelectedValue == "Onsite") { if (totalPeople < 20) { programCost = 100.00; } else { programCost = totalPeople * 5.00; } } else if (drpLocationTypeList.SelectedValue == "Online") { programCost = 0.00; } else if (drpLocationTypeList.SelectedValue == "Offsite") { if (NewProgram.btnCount == 0) { programCost = 250.00; } else { programCost = 160.00; } } if (Page.IsValid) { NewProgram newProgram = new NewProgram(Int32.Parse(txtKids.Text), Int32.Parse(txtAdults.Text), totalPeople, drpAgeLevel.SelectedValue, "Completed", Convert.ToDateTime(programTime.Text), Convert.ToDateTime(datepicker.Value), txtMiscNotes.Value, drpLocationTypeList.SelectedValue, programID, DateTime.Now, Session["UserFullName"].ToString(), programCost); NewProgram.programList.Add(newProgram); } drpAgeLevel.SelectedValue = null; txtAdults.Text = null; txtKids.Text = null; txtMiscNotes.InnerText = null; drpLocationTypeList.SelectedValue = null; drpProgramList.SelectedValue = null; CheckBoxList1.Text = null; CheckBoxList2.Text = null; CheckBoxList3.Text = null; CheckBoxList4.Text = null; NewProgram.baseCost = 250 + (160 * (NewProgram.programList.Count - 1)); string location = NewProgram.programList[0].getLocationType(); if (location == "Offsite" && NewProgram.btnCount == 0) { datepicker.Disabled = true; drpOrganizationList.Enabled = false; drpLocationTypeList.SelectedIndex = 2; drpLocationTypeList.Enabled = false; } //if (NewProgram.btnCount == 1) //{ // lblProgramCostTwo.Visible = false; // lblProgramCostThree.Visible = false; //} for (int z = 0; z < NewProgram.programList.Count; z++) { if (z == 0) { lblProgramCostOne.Text = NewProgram.programList[z].getPrgCost().ToString("C"); totalCost += NewProgram.programList[z].getPrgCost(); programOne.Visible = true; programTwo.Visible = false; programThree.Visible = false; } if (z == 1) { lblProgramCostTwo.Text = NewProgram.programList[z].getPrgCost().ToString("C"); totalCost += NewProgram.programList[z].getPrgCost(); programTwo.Visible = true; } if (z == 2) { lblProgramCostThree.Text = NewProgram.programList[z].getPrgCost().ToString("C"); totalCost += NewProgram.programList[z].getPrgCost(); programThree.Visible = true; } } lblCartTotal.Text = Convert.ToString(NewProgram.programList.Count); //lblProgramCostOne.Text = NewProgram.programList //lblProgramCostTwo.Text = Convert.ToString(programCost); //lblProgramCostThree.Text = Convert.ToString(programCost); lblSubtotalCost.Text = totalCost.ToString(); totalCost += mileageCost; lblTotalCostPrice.Text = totalCost.ToString(); NewProgram.btnCount += 1; //TextBox1.Text = NewProgram.programList[0].getPrgCost().ToString(); }