Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Corrected the constructors, so it's broke again :)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderLea committed Mar 26, 2012
1 parent 7b47bde commit f38dfeb
Show file tree
Hide file tree
Showing 19 changed files with 65 additions and 28 deletions.
Binary file modified SOFT130 Coursework.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion WindowsFormsApplication1/Branch.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Branch
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////


//<branch> Constructor //<branch> Constructor
public void branch(string inBranchID, string inBranchNickname, string inBranchAddressNo, public Branch(string inBranchID, string inBranchNickname, string inBranchAddressNo,
string inBranchAddressStreet, string inBranchAddressCity, string inBranchAddressCounty, string inBranchAddressStreet, string inBranchAddressCity, string inBranchAddressCounty,
string inBranchAddressPostCode, string inNearestBranch1, string inBranchAddressPostCode, string inNearestBranch1,
string inNearestBranch2, string inNearestBranch3, int inNoCategories) string inNearestBranch2, string inNearestBranch3, int inNoCategories)
Expand Down
2 changes: 1 addition & 1 deletion WindowsFormsApplication1/Category.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Category
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////


//<Catergory> class constructor //<Catergory> class constructor
public void category(int inCategoryID, string inCategoryName, int inNoProducts) public Category(int inCategoryID, string inCategoryName, int inNoProducts)
{ {
categoryID = inCategoryID; categoryID = inCategoryID;
categoryName = inCategoryName; categoryName = inCategoryName;
Expand Down
51 changes: 28 additions & 23 deletions WindowsFormsApplication1/LoginForm.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -44,20 +44,23 @@ private void frmLogin_Load(object sender, EventArgs e)
} }


//new instance of Branch Class //new instance of Branch Class
Branch tempBranch = new Branch(); Branch tempBranch = new Branch(branchData[0], branchData[1], branchData[2],
branchData[3], branchData[4], branchData[5],
branchData[6], branchData[7], branchData[8],
branchData[9], Convert.ToInt32(branchData[10]));


//set branch values from branchData array //set branch values from branchData array
tempBranch.setBranchID(branchData[0]); //tempBranch.setBranchID(branchData[0]);
tempBranch.setBranchNickname(branchData[1]); //tempBranch.setBranchNickname(branchData[1]);
tempBranch.setBranchAddressNo(branchData[2]); //tempBranch.setBranchAddressNo(branchData[2]);
tempBranch.setBranchAddressStreet(branchData[3]); //tempBranch.setBranchAddressStreet(branchData[3]);
tempBranch.setBranchAddressCity(branchData[4]); //tempBranch.setBranchAddressCity(branchData[4]);
tempBranch.setBranchAddressCounty(branchData[5]); //tempBranch.setBranchAddressCounty(branchData[5]);
tempBranch.setBranchAddressPostCode(branchData[6]); //tempBranch.setBranchAddressPostCode(branchData[6]);
tempBranch.setNearestBranch1(branchData[7]); //tempBranch.setNearestBranch1(branchData[7]);
tempBranch.setNearestBranch2(branchData[8]); //tempBranch.setNearestBranch2(branchData[8]);
tempBranch.setNearestBranch3(branchData[9]); //tempBranch.setNearestBranch3(branchData[9]);
tempBranch.setNoCategories(Convert.ToInt32(branchData[10])); //tempBranch.setNoCategories(Convert.ToInt32(branchData[10]));


//add branch to main arrayList //add branch to main arrayList
tempBranch.addBranchToMainArgus(tempBranch); tempBranch.addBranchToMainArgus(tempBranch);
Expand All @@ -75,12 +78,13 @@ private void frmLogin_Load(object sender, EventArgs e)
} }


//new instance of Category Class //new instance of Category Class
Category tempCategory = new Category(); Category tempCategory = new Category(Convert.ToInt32(categoryData[0]), categoryData[1],
Convert.ToInt32(categoryData[2]));


//set values //set values
tempCategory.setCategoryID(Convert.ToInt32(categoryData[0])); //ERROR! reading the line below it should be //tempCategory.setCategoryID(Convert.ToInt32(categoryData[0])); //ERROR! reading the line below it should be
tempCategory.setCategoryName(categoryData[1]); //tempCategory.setCategoryName(categoryData[1]);
tempCategory.setNoProducts(Convert.ToInt32(categoryData[2])); //tempCategory.setNoProducts(Convert.ToInt32(categoryData[2]));


//add category to Categories in branch arrayList //add category to Categories in branch arrayList
tempBranch.addCategoryToBranch(tempCategory); tempBranch.addCategoryToBranch(tempCategory);
Expand All @@ -97,15 +101,16 @@ private void frmLogin_Load(object sender, EventArgs e)
} }


//new instance of Product Class //new instance of Product Class
Product tempProduct = new Product(); Product tempProduct = new Product(Convert.ToInt32(productData[0]), productData[1], productData[2],
productData[3], Convert.ToSingle(productData[4]), Convert.ToInt32(productData[5]));


//add values to temp product //add values to temp product
tempProduct.setProductID(Convert.ToInt32(productData[0])); //tempProduct.setProductID(Convert.ToInt32(productData[0]));
tempProduct.setProductTitle(productData[1]); //tempProduct.setProductTitle(productData[1]);
tempProduct.setProductDetails(productData[2]); //tempProduct.setProductDetails(productData[2]);
tempProduct.setProductImageSource(productData[3]); //tempProduct.setProductImageSource(productData[3]);
tempProduct.setProductPrice(Convert.ToSingle(productData[4])); //tempProduct.setProductPrice(Convert.ToSingle(productData[4]));
tempProduct.setProductStockLevel(Convert.ToInt32(productData[5])); //tempProduct.setProductStockLevel(Convert.ToInt32(productData[5]));


//add product to productsincategory arraylist //add product to productsincategory arraylist
tempCategory.addProduct(tempProduct); tempCategory.addProduct(tempProduct);
Expand Down
1 change: 1 addition & 0 deletions WindowsFormsApplication1/MainBranch.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions WindowsFormsApplication1/MainBranch.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -74,5 +74,15 @@ private void button4_Click(object sender, EventArgs e)
{ {
MessageBox.Show("This will display the full catergory details in the message box."); MessageBox.Show("This will display the full catergory details in the message box.");
} }

private void MainBranch_Load(object sender, EventArgs e)
{
//create object array

//create new instance of category



}
} }
} }
2 changes: 1 addition & 1 deletion WindowsFormsApplication1/Product.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Product
private int productStockLevel; private int productStockLevel;




public void product(int inProductID, string inProductTitle, string inProductDetails, public Product(int inProductID, string inProductTitle, string inProductDetails,
string inProductImageSource, float inProductPrice, int inProductStockLevel) string inProductImageSource, float inProductPrice, int inProductStockLevel)
{ {
productID = inProductID; productID = inProductID;
Expand Down
Binary file added WindowsFormsApplication1/bin/Debug/Argus.exe
Binary file not shown.
Binary file added WindowsFormsApplication1/bin/Debug/Argus.pdb
Binary file not shown.
11 changes: 11 additions & 0 deletions WindowsFormsApplication1/bin/Debug/Argus.vshost.exe.manifest
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Binary file not shown.
Binary file not shown.
Binary file added WindowsFormsApplication1/obj/x86/Debug/Argus.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -116,7 +116,17 @@ C:\Users\Jake\Dropbox\University\SOFT130\Assignment\SOFT130CWKProgram\WindowsFor
C:\Users\Jake\Dropbox\University\SOFT130\Assignment\SOFT130CWKProgram\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.write.1.tlog C:\Users\Jake\Dropbox\University\SOFT130\Assignment\SOFT130CWKProgram\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.write.1.tlog
C:\Users\Jake\Dropbox\University\SOFT130\Assignment\SOFT130CWKProgram\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.MainBranch.resources C:\Users\Jake\Dropbox\University\SOFT130\Assignment\SOFT130CWKProgram\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.MainBranch.resources
C:\Users\Jake\Dropbox\University\SOFT130\Assignment\SOFT130CWKProgram\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.ProductDetails.resources C:\Users\Jake\Dropbox\University\SOFT130\Assignment\SOFT130CWKProgram\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.ProductDetails.resources
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.exe
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.pdb
C:\Users\Jake\Dropbox\University\SOFT130\Assignment\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.exe C:\Users\Jake\Dropbox\University\SOFT130\Assignment\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.exe
C:\Users\Jake\Dropbox\University\SOFT130\Assignment\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.pdb C:\Users\Jake\Dropbox\University\SOFT130\Assignment\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.pdb
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\bin\Debug\Argus.exe
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\bin\Debug\Argus.pdb
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\ResolveAssemblyReference.cache
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.frmLogin.resources
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.frmBranchDetails.resources
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.MainBranch.resources
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.ProductDetails.resources
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\Argus.Properties.Resources.resources
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.read.1.tlog
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.write.1.tlog
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\Argus.exe
C:\Users\Alexander\Dropbox\University\SOFT130\Argus---acronym\Argus---acronym\WindowsFormsApplication1\obj\x86\Debug\Argus.pdb
Binary file not shown.
Binary file not shown.

0 comments on commit f38dfeb

Please sign in to comment.