├── CONTRIBUTING.md ├── SQLConnect.exe ├── Phone Selling System ├── TestResults.zip ├── PSSFrontOffice │ ├── Stock │ │ ├── Styles │ │ │ ├── StyAdmLogin.css │ │ │ ├── StyStockDel.css │ │ │ ├── StyStockViewer.css │ │ │ ├── StyAStock.css │ │ │ ├── StyStockMain.css │ │ │ └── StyStockAdd.css │ │ ├── StockDel.aspx.cs │ │ ├── StockViewer.aspx.cs │ │ ├── StockViewer.aspx │ │ ├── AdmLogin.aspx.cs │ │ ├── StockDel.aspx │ │ ├── AdmLogin.aspx │ │ ├── AStock.aspx │ │ └── StockMain.aspx │ ├── Images │ │ ├── Logo.png │ │ ├── Logo │ │ │ └── Logo.jpg │ │ ├── Phones │ │ │ ├── p0b6ky91.jpg │ │ │ ├── best-phones-2021.jpg │ │ │ ├── Palm-Phone-9-of-13.jpg │ │ │ ├── 2mWDFVgDGz5NPQp62dvcP9.jpg │ │ │ ├── Best smartphone copy.jpg │ │ │ ├── DqLwB7fD4xmVpkdfx7tHmh.jpg │ │ │ ├── IMG_ImgName_Large@2x.jpg │ │ │ ├── VUAaAC7wf9k2iExVkPAtC7.jpg │ │ │ ├── Best-Android-Phones-Header.jpg │ │ │ ├── best battery life phone copy.jpg │ │ │ ├── budget-android-phone-2048px-3x2-1.jpg │ │ │ ├── budget-android-phone-2048px-nord-front.jpg │ │ │ ├── IMG_BestFor_SmallPhones_iPhone13Mini_Large@2x.jpg │ │ │ └── mobile-phones-design-technology-roundups_hero.jpg │ │ └── Backgrounds │ │ │ └── Stock │ │ │ ├── 1.jpg │ │ │ ├── 2.jpg │ │ │ ├── 3.jpg │ │ │ ├── 4.jpg │ │ │ ├── 5.jpg │ │ │ ├── 6.jpg │ │ │ ├── 7.jpg │ │ │ ├── 8.jpg │ │ │ └── 9.jpg │ ├── Staff │ │ ├── Images │ │ │ └── Background.jpg │ │ ├── Background │ │ │ └── Background.jpg │ │ ├── EditStaff.aspx.cs │ │ ├── EditStaff.aspx │ │ ├── StaffViewer.aspx │ │ ├── DeleteStaff.aspx │ │ ├── StaffViewer.aspx.cs │ │ ├── MainStaff.aspx.cs │ │ ├── MainStaff.aspx │ │ ├── DeleteStaff.aspx.cs │ │ ├── AddStaff.aspx.cs │ │ ├── AddStaff.aspx │ │ ├── AStaff.aspx │ │ └── AStaff.aspx.cs │ ├── packages.config │ ├── Web.config │ ├── Location.aspx.cs │ ├── Customer │ │ ├── CustDel.aspx │ │ ├── CustDel.aspx.cs │ │ ├── Custpg.aspx │ │ ├── ACustomer.aspx │ │ ├── CustAdd.aspx │ │ ├── CustAdd.aspx.cs │ │ ├── ACustomer.aspx.cs │ │ └── Custpg.aspx.cs │ ├── Supplier │ │ ├── Add Supplier.aspx.cs │ │ ├── FindSupplier.aspx.cs │ │ ├── SupplierMain.aspx.cs │ │ ├── SupplierMain.aspx │ │ ├── Add Supplier.aspx │ │ └── FindSupplier.aspx │ ├── DefAdmLog.aspx.cs │ ├── DefStyles │ │ └── DefaultStyleSheet.css │ ├── Phone │ │ ├── PhoneDelete.aspx.cs │ │ ├── PhoneDelete.aspx │ │ ├── PhoneMain.aspx.cs │ │ ├── PhoneMain.aspx │ │ └── APhone.aspx.cs │ ├── Default.aspx.cs │ ├── AdminPanel.aspx.cs │ ├── DefAdmLog.aspx │ ├── Location.aspx │ └── AdminPanel.aspx ├── PhoneSystemTesting │ ├── packages.config │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Staff │ │ └── tstStaffCollection.cs │ ├── PhoneSystemTesting.csproj │ └── Supplier │ │ └── tstSupplierCollection.cs ├── PSBackOffice │ ├── PSBackOffice.csproj │ ├── Form1.cs │ ├── Program.cs │ ├── Form1.Designer.cs │ └── Form1.resx ├── .vscode │ ├── launch.json │ └── tasks.json ├── PSSClasses │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── PSSClasses.csproj │ ├── Phone │ │ └── clsPhoneCollection.cs │ ├── Staff │ │ └── clsStaffCollection.cs │ ├── Supplier │ │ └── clsSupplierCollection.cs │ └── Stock │ │ └── clsStockCollection.cs └── Phone Selling System.sln ├── Database.txt ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── README.md ├── .gitattributes └── CODE_OF_CONDUCT.md /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Will work on it. 2 | -------------------------------------------------------------------------------- /SQLConnect.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/SQLConnect.exe -------------------------------------------------------------------------------- /Phone Selling System/TestResults.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/TestResults.zip -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/Styles/StyAdmLogin.css: -------------------------------------------------------------------------------- 1 | body { 2 | } 3 | .moveable { 4 | position: absolute; 5 | } 6 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/Styles/StyStockDel.css: -------------------------------------------------------------------------------- 1 | body { 2 | } 3 | .moveable { 4 | position: absolute; 5 | } 6 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Logo.png -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Logo/Logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Logo/Logo.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/p0b6ky91.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/p0b6ky91.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/Images/Background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Staff/Images/Background.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/1.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/2.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/3.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/4.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/5.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/6.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/7.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/8.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Backgrounds/Stock/9.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/Background/Background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Staff/Background/Background.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/best-phones-2021.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/best-phones-2021.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/Palm-Phone-9-of-13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/Palm-Phone-9-of-13.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/2mWDFVgDGz5NPQp62dvcP9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/2mWDFVgDGz5NPQp62dvcP9.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/Best smartphone copy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/Best smartphone copy.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/DqLwB7fD4xmVpkdfx7tHmh.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/DqLwB7fD4xmVpkdfx7tHmh.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/IMG_ImgName_Large@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/IMG_ImgName_Large@2x.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/VUAaAC7wf9k2iExVkPAtC7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/VUAaAC7wf9k2iExVkPAtC7.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/Best-Android-Phones-Header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/Best-Android-Phones-Header.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/best battery life phone copy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/best battery life phone copy.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/budget-android-phone-2048px-3x2-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/budget-android-phone-2048px-3x2-1.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/budget-android-phone-2048px-nord-front.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/budget-android-phone-2048px-nord-front.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/IMG_BestFor_SmallPhones_iPhone13Mini_Large@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/IMG_BestFor_SmallPhones_iPhone13Mini_Large@2x.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Images/Phones/mobile-phones-design-technology-roundups_hero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/No3Mc/Phone-Paradise/HEAD/Phone Selling System/PSSFrontOffice/Images/Phones/mobile-phones-design-technology-roundups_hero.jpg -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Database.txt: -------------------------------------------------------------------------------- 1 | Databases 2 | 3 | Ethan, Luke and Syed : 4 | 5 | Username = p2652259 6 | Password = p2652259 7 | 8 | Talha : 9 | 10 | Username = p2629099 11 | Password = p2629099 12 | 13 | Aqeel : 14 | 15 | Username = p17245070 16 | Password = Love4all -------------------------------------------------------------------------------- /Phone Selling System/PhoneSystemTesting/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/Styles/StyStockViewer.css: -------------------------------------------------------------------------------- 1 | /*Written by Syed || P2652259 || No3Mc(https://github.com/No3Mc) 2 | Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store*/ 3 | 4 | 5 | 6 | body { 7 | } 8 | } 9 | 10 | .moveable { 11 | position: absolute; 12 | } 13 | -------------------------------------------------------------------------------- /Phone Selling System/PSBackOffice/PSBackOffice.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WinExe 5 | net5.0-windows 6 | true 7 | default 8 | 9 | 10 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Location.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | 8 | public partial class Location : System.Web.UI.Page 9 | { 10 | protected void Page_Load(object sender, EventArgs e) 11 | { 12 | 13 | } 14 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/EditStaff.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | 8 | public partial class Staff_EditStaff : System.Web.UI.Page 9 | { 10 | protected void Page_Load(object sender, EventArgs e) 11 | { 12 | 13 | } 14 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/EditStaff.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditStaff.aspx.cs" Inherits="Staff_EditStaff" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/StaffViewer.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="StaffViewer.aspx.cs" Inherits="Staff_StaffViewer" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /Phone Selling System/PSBackOffice/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace PSBackOffice 12 | { 13 | public partial class Form1 : Form 14 | { 15 | public Form1() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Phone Selling System/PSBackOffice/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace PSBackOffice 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.SetHighDpiMode(HighDpiMode.SystemAware); 18 | Application.EnableVisualStyles(); 19 | Application.SetCompatibleTextRenderingDefault(false); 20 | Application.Run(new Form1()); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Customer/CustDel.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustDel.aspx.cs" Inherits="Customer_CustDel" %> 2 | <%--Done by Memon--%> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | Are your sure?
14 |
15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /Phone Selling System/PhoneSystemTesting/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | [assembly: AssemblyTitle("PhoneSystemTesting")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("PhoneSystemTesting")] 10 | [assembly: AssemblyCopyright("Copyright © 2022")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: ComVisible(false)] 15 | 16 | [assembly: Guid("dafd35c1-1d3b-4c04-ac34-b0774f0ac8a7")] 17 | 18 | // [assembly: AssemblyVersion("1.0.*")] 19 | [assembly: AssemblyVersion("1.0.0.0")] 20 | [assembly: AssemblyFileVersion("1.0.0.0")] 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/DeleteStaff.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="DeleteStaff.aspx.cs" Inherits="Staff_DeleteStaff" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 |
14 |
15 | 16 |             17 | 18 |
19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/StaffViewer.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | 9 | public partial class Staff_StaffViewer : System.Web.UI.Page 10 | { 11 | protected void Page_Load(object sender, EventArgs e) 12 | { 13 | //create a new instance of clsStaff 14 | clsStaff AStaff = new clsStaff(); 15 | //get the data from the session object 16 | AStaff = (clsStaff)Session["AStaff"]; 17 | //display the staff name of this entry 18 | Response.Write(AStaff.StaffName); 19 | Response.Write(AStaff.StaffTelephoneNo); 20 | Response.Write(AStaff.StaffPassword); 21 | Response.Write(AStaff.StaffEmail); 22 | Response.Write(AStaff.StaffPosition); 23 | } 24 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/MainStaff.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | 8 | public partial class Staff_MainStaff : System.Web.UI.Page 9 | { 10 | protected void Page_Load(object sender, EventArgs e) 11 | { 12 | 13 | } 14 | 15 | protected void Button1_Click(object sender, EventArgs e) 16 | { 17 | 18 | } 19 | 20 | protected void btnAdd_Click(object sender, EventArgs e) 21 | { 22 | Response.Redirect("AddStaff.aspx"); 23 | } 24 | 25 | 26 | 27 | protected void btnEdit_Click(object sender, EventArgs e) 28 | { 29 | Response.Redirect("EditStaff.aspx"); 30 | } 31 | 32 | protected void btnDel_Click(object sender, EventArgs e) 33 | { 34 | Response.Redirect("DeleteStaff.aspx"); 35 | } 36 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/MainStaff.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="MainStaff.aspx.cs" Inherits="Staff_MainStaff" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Supplier/Add Supplier.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | 9 | 10 | public partial class Supplier_Add_Supplier : System.Web.UI.Page 11 | { 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | 15 | } 16 | 17 | protected void btnFind_Click(object sender, EventArgs e) 18 | { 19 | 20 | } 21 | 22 | protected void btnAdd_Click(object sender, EventArgs e) 23 | { 24 | Session["SupplierID"] = -1; 25 | Response.Redirect("Add Supplier.aspx"); 26 | 27 | } 28 | 29 | 30 | 31 | 32 | 33 | protected void Button2_Click(object sender, EventArgs e) 34 | { 35 | Response.Redirect("SupplierMain.aspx"); 36 | } 37 | 38 | protected void Button1_Click(object sender, EventArgs e) 39 | { 40 | Response.Redirect("Add Supplier.aspx"); 41 | } 42 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/DefAdmLog.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | //Written by Syed, Ethan, Talha, Luke, and Aqeel || P2652259|| Syed/No3Mc(https://github.com/No3Mc), P2596393 || Ethan/Frizzle15(https://github.com/Frizzle15), P2629099 || Talha(https://github.com/Talhamemon25), P2606530 || Luke/LLydiatt(https://github.com/LLydiatt)and Aqeel(https://github.com/AqeelAhmed12)) 8 | 9 | //Stock Management by Syed Naqvi 10 | //Staff Management by Luke Lydiatt 11 | //Phones Management by Ethan Frizzell 12 | //Customer Management by Mahammad Talha 13 | //Supplier management by Aqeel Ahmed 14 | 15 | 16 | //Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store 17 | public partial class DefAdmLog : System.Web.UI.Page 18 | { 19 | protected void Page_Load(object sender, EventArgs e) 20 | { 21 | 22 | } 23 | 24 | protected void Button1_Click(object sender, EventArgs e) 25 | { 26 | Response.Redirect("AdminPanel.aspx"); 27 | } 28 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/DeleteStaff.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | 9 | public partial class Staff_DeleteStaff : System.Web.UI.Page 10 | { 11 | Int32 StaffNo; 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | StaffNo = Convert.ToInt32(Session["StaffNo"]); 15 | } 16 | 17 | void DeleteStaff() 18 | { 19 | //function to delete the selected record 20 | clsStaffCollection StaffList = new clsStaffCollection(); 21 | //fiind the record to remove 22 | StaffList.ThisStaff.Find(StaffNo); 23 | //del teh record 24 | StaffList.Del(); 25 | } 26 | 27 | protected void btnDelete_Click(object sender, EventArgs e) 28 | { 29 | DeleteStaff(); 30 | Response.Redirect("AStaff.aspx"); 31 | } 32 | 33 | protected void btnReturn_Click(object sender, EventArgs e) 34 | { 35 | Response.Redirect("AStaff.aspx"); 36 | } 37 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/DefStyles/DefaultStyleSheet.css: -------------------------------------------------------------------------------- 1 | /*Written by Syed, Ethan, Talha, Luke, and Aqeel || P2652259|| Syed/No3Mc(https://github.com/No3Mc), P2596393 || Ethan/Frizzle15(https://github.com/Frizzle15), P2629099 || Talha(https://github.com/Talhamemon25), P2606530 || Luke/LLydiatt(https://github.com/LLydiatt)and Aqeel(https://github.com/AqeelAhmed12)) 2 | Stock Management by Syed Naqvi 3 | Staff Management by Luke Lydiatt 4 | Phones Management by Ethan Frizzell 5 | Customer Management by Mahammad Talha 6 | Supplier management by Aqeel Ahmed 7 | 8 | 9 | Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store*/ 10 | 11 | 12 | 13 | body { 14 | } 15 | 16 | .auto-style2 { 17 | height: 170px; 18 | } 19 | 20 | .auto-style3 { 21 | height: 33px; 22 | } 23 | 24 | .auto-style4 { 25 | width: 1001px; 26 | height: 155px; 27 | } 28 | 29 | .auto-style5 { 30 | width: 129px; 31 | } 32 | 33 | .auto-style6 { 34 | width: 55px; 35 | } 36 | 37 | .auto-style7 { 38 | width: 815px; 39 | height: 406px; 40 | } 41 | 42 | .moveable { 43 | position: absolute; 44 | } 45 | -------------------------------------------------------------------------------- /Phone Selling System/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | // Use IntelliSense to find out which attributes exist for C# debugging 6 | // Use hover for the description of the existing attributes 7 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md 8 | "name": ".NET Core Launch (console)", 9 | "type": "coreclr", 10 | "request": "launch", 11 | "preLaunchTask": "build", 12 | // If you have changed target frameworks, make sure to update the program path. 13 | "program": "${workspaceFolder}/PSBackOffice/bin/Debug/net5.0-windows/PSBackOffice.dll", 14 | "args": [], 15 | "cwd": "${workspaceFolder}/PSBackOffice", 16 | // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console 17 | "console": "internalConsole", 18 | "stopAtEntry": false 19 | }, 20 | { 21 | "name": ".NET Core Attach", 22 | "type": "coreclr", 23 | "request": "attach" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Customer/CustDel.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | //Done by Memon 9 | public partial class Customer_CustDel : System.Web.UI.Page 10 | { 11 | Int32 CustID; 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | CustID = Convert.ToInt32(Session["CustID"]); 15 | } 16 | void DeleteCustomer() 17 | { 18 | //function to delete the selected record 19 | //create a new instance of the Customer Book 20 | clsCustomerCollection CustomerBook = new clsCustomerCollection(); 21 | //fiind the record to Delete 22 | CustomerBook.ThisCust.Find(CustID); 23 | //Delete teh record 24 | CustomerBook.Delete(); 25 | } 26 | protected void btnDelete_Click(object sender, EventArgs e) 27 | { 28 | //Delete the customer record 29 | DeleteCustomer(); 30 | Response.Redirect("Custpg.aspx"); 31 | } 32 | protected void btnNo_Click(object sender, EventArgs e) 33 | { 34 | Response.Redirect("Custpg.aspx"); 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Phone/PhoneDelete.aspx.cs: -------------------------------------------------------------------------------- 1 | using PSSClasses.Phone; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Web; 6 | using System.Web.UI; 7 | using System.Web.UI.WebControls; 8 | //Written by Ethan Frizzell P2596393 9 | public partial class Phone_PhoneDelete : System.Web.UI.Page 10 | { 11 | Int32 PhoneID; 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | PhoneID = Convert.ToInt32(Session["PhoneID"]); //find the PK of the record 15 | } 16 | 17 | void DeletePhone() //delete function 18 | { 19 | //create an instance of the collection class 20 | clsPhoneCollection PhoneBook = new clsPhoneCollection(); 21 | //find the PK of the selected record 22 | PhoneBook.ThisPhone.Find(PhoneID); 23 | //delete the reocrd 24 | PhoneBook.Delete(); 25 | } 26 | protected void btnYes_Click(object sender, EventArgs e) 27 | { 28 | DeletePhone(); //delete the record 29 | Response.Redirect("PhoneMain.aspx"); //redirect to the main page 30 | } 31 | 32 | protected void btnNo_Click(object sender, EventArgs e) 33 | { 34 | Response.Redirect("PhoneMain.aspx"); //redirect back to the main page 35 | } 36 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/StockDel.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | //Written by Syed || P2652259 || No3Mc(https://github.com/No3Mc) 9 | //Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store 10 | 11 | public partial class Stock_StockDel : System.Web.UI.Page 12 | { 13 | Int32 StockID; 14 | protected void Page_Load(object sender, EventArgs e) 15 | { 16 | StockID = Convert.ToInt32(Session["StockID"]); 17 | } 18 | 19 | void DelStock() 20 | { 21 | //function to delete the selected record 22 | //create a new instance of teh stock book 23 | clsStockCollection StocksBook = new clsStockCollection(); 24 | //fiind the record to delet 25 | StocksBook.ThisStock.Find(StockID); 26 | //del teh record 27 | StocksBook.Del(); 28 | } 29 | 30 | protected void btnYes_Click(object sender, EventArgs e) 31 | { 32 | //del the record 33 | DelStock(); 34 | Response.Redirect("StockMain.aspx"); 35 | 36 | } 37 | 38 | protected void btnNo_Click(object sender, EventArgs e) 39 | { 40 | Response.Redirect("StockMain.aspx"); 41 | } 42 | } -------------------------------------------------------------------------------- /Phone Selling System/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "process", 8 | "args": [ 9 | "build", 10 | "${workspaceFolder}/PSBackOffice/PSBackOffice.csproj", 11 | "/property:GenerateFullPaths=true", 12 | "/consoleloggerparameters:NoSummary" 13 | ], 14 | "problemMatcher": "$msCompile" 15 | }, 16 | { 17 | "label": "publish", 18 | "command": "dotnet", 19 | "type": "process", 20 | "args": [ 21 | "publish", 22 | "${workspaceFolder}/PSBackOffice/PSBackOffice.csproj", 23 | "/property:GenerateFullPaths=true", 24 | "/consoleloggerparameters:NoSummary" 25 | ], 26 | "problemMatcher": "$msCompile" 27 | }, 28 | { 29 | "label": "watch", 30 | "command": "dotnet", 31 | "type": "process", 32 | "args": [ 33 | "watch", 34 | "run", 35 | "--project", 36 | "${workspaceFolder}/PSBackOffice/PSBackOffice.csproj" 37 | ], 38 | "problemMatcher": "$msCompile" 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Default.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | //Written by Syed, Ethan, Talha, Luke, and Aqeel || P2652259|| Syed/No3Mc(https://github.com/No3Mc), P2596393 || Ethan/Frizzle15(https://github.com/Frizzle15), P2629099 || Talha(https://github.com/Talhamemon25), P2606530 || Luke/LLydiatt(https://github.com/LLydiatt)and Aqeel(https://github.com/AqeelAhmed12)) 9 | 10 | //Stock Management by Syed Naqvi 11 | //Staff Management by Luke Lydiatt 12 | //Phones Management by Ethan Frizzell 13 | //Customer Management by Mahammad Talha 14 | //Supplier management by Aqeel Ahmed 15 | 16 | 17 | //Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store 18 | public partial class _Default : System.Web.UI.Page 19 | { 20 | protected void Page_Load(object sender, EventArgs e) 21 | { 22 | 23 | 24 | 25 | } 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | protected void Location(object sender, EventArgs e) 41 | { 42 | Response.Redirect("Location.aspx"); 43 | } 44 | 45 | 46 | 47 | 48 | protected void Button10_Click(object sender, EventArgs e) 49 | { 50 | Response.Redirect("DefAdmLog.aspx"); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Phone Selling System/PSBackOffice/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace PSBackOffice 3 | { 4 | partial class Form1 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.components = new System.ComponentModel.Container(); 33 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 34 | this.ClientSize = new System.Drawing.Size(800, 450); 35 | this.Text = "Form1"; 36 | } 37 | 38 | #endregion 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /Phone Selling System/PSSClasses/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PSSClasses")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP")] 12 | [assembly: AssemblyProduct("PSSClasses")] 13 | [assembly: AssemblyCopyright("Copyright © HP 2022")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("84897773-856f-4855-9cbc-e674633e1456")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/AddStaff.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | 9 | public partial class Staff_AddStaff : System.Web.UI.Page 10 | { 11 | protected void Page_Load(object sender, EventArgs e) 12 | { 13 | 14 | } 15 | 16 | protected void btnCancel_Click(object sender, EventArgs e) 17 | { 18 | Response.Redirect("AStaff.aspx"); 19 | } 20 | 21 | protected void btnOK_Click(object sender, EventArgs e) 22 | { 23 | Add(); 24 | Response.Redirect("AStaff.aspx"); 25 | } 26 | 27 | void Add() 28 | { 29 | PSSClasses.clsStaffCollection StaffList = new PSSClasses.clsStaffCollection(); 30 | //validate the data 31 | String Error = StaffList.ThisStaff.Valid(txtSName.Text, txtSEmail.Text, txtSPassword.Text, txtSTelephone.Text, txtSPosition.Text); 32 | if (Error == "") 33 | { 34 | //get the data entered by the user 35 | StaffList.ThisStaff.StaffName = txtSName.Text; 36 | StaffList.ThisStaff.StaffEmail = txtSEmail.Text; 37 | StaffList.ThisStaff.StaffPassword = txtSPassword.Text; 38 | StaffList.ThisStaff.StaffTelephoneNo = txtSTelephone.Text; 39 | StaffList.ThisStaff.StaffPosition = txtSPosition.Text; 40 | //add the record 41 | StaffList.Add(); 42 | } 43 | else 44 | { 45 | lblError.Text = "There were problems with the data entered " + Error; 46 | } 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Supplier/FindSupplier.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | public partial class Supplier_FindSupplier : System.Web.UI.Page 9 | { 10 | protected void Page_Load(object sender, EventArgs e) 11 | { 12 | 13 | } 14 | 15 | 16 | 17 | 18 | 19 | protected void btnFind_Click(object sender, EventArgs e) 20 | { 21 | //create an instance of the address class 22 | clsSupplier anSupplier = new clsSupplier(); 23 | //variable to store the primary key 24 | Int32 SupplierID; 25 | //variable to store the result of the find operation 26 | Boolean Found = false; 27 | //get the primary kev entered by the user 28 | SupplierID = Convert.ToInt32(SID.Text); 29 | //find the record 30 | Found = anSupplier.Find(SupplierID); 31 | //if found 32 | if (Found == true) 33 | { 34 | //display the values of the properties in the form 35 | SID.Text = anSupplier.SupplierID.ToString(); 36 | SName.Text = anSupplier.Name; 37 | SAddress.Text = anSupplier.Address; 38 | SMobileNo.Text = anSupplier.MobileNo; 39 | SEmail.Text = anSupplier.Email; 40 | SDOB.Text = anSupplier.DOB; 41 | } 42 | } 43 | 44 | protected void Button2_Click(object sender, EventArgs e) 45 | { 46 | Response.Redirect("SupplierMain.aspx"); 47 | } 48 | 49 | protected void Button1_Click(object sender, EventArgs e) 50 | { 51 | Response.Redirect("FindSupplier.aspx"); 52 | } 53 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Customer/Custpg.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Custpg.aspx.cs" Inherits="Customer_Custpg" %> 2 | <%--Done by Memon--%> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 |
16 | 17 |
18 | 19 | 20 | 21 |
22 | 23 | 24 |
25 | 26 | 27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | 35 |
36 | 37 | 38 | 39 |
40 | 41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 | 49 |
50 | 51 | 52 |
53 | 54 | 55 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/StockViewer.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | //Written by Syed || P2652259 || No3Mc(https://github.com/No3Mc) 9 | //Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store 10 | 11 | public partial class StockViewer : System.Web.UI.Page 12 | { 13 | protected void Page_Load(object sender, EventArgs e) 14 | { 15 | //if this is the first time the page is displayed 16 | if (IsPostBack == false) 17 | { 18 | //update the list box 19 | DisplayStocks(); 20 | } 21 | 22 | } 23 | //It displays the WarehouseNo in the stock list 24 | void DisplayStocks() 25 | { 26 | //create an instance of the county collection 27 | PSSClasses.clsStockCollection Stocks = new PSSClasses.clsStockCollection(); 28 | //set the data source to the list of warehouse in the collection 29 | lstStocks.DataSource = Stocks.StockList; 30 | //set the name of the primary key 31 | lstStocks.DataValueField = "StockID"; 32 | //set the data field to display 33 | lstStocks.DataTextField = "WarehouseNo"; 34 | //bind the data to the list 35 | lstStocks.DataBind(); 36 | } 37 | 38 | 39 | 40 | protected void Button1_Click(object sender, EventArgs e) 41 | { 42 | //it redirects to admlogin page 43 | Response.Redirect("AdmLogin.aspx"); 44 | 45 | } 46 | 47 | 48 | 49 | protected void btnBack_Click(object sender, EventArgs e) 50 | { 51 | //it redirects to admpanel 52 | Response.Redirect("/AdminPanel.aspx"); 53 | } 54 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Project Mangement and Development 2nd Term
2 | ## PMAD-Phone Selling Store
3 | ![image](https://github.com/No3Mc/Phone-Paradise/assets/41834061/6eede50c-85d6-40fa-a4f8-9b8df73c8a58) 4 | 5 | - [System SPECS](https://docs.google.com/document/d/1Ur4PCUlyhYJOwgS4hZuPDtuZ0oHuWfYwxI5vwbGv5Nw/edit) 6 | 7 | - [Initial Deliverable - Team ABC](https://docs.google.com/document/d/1nlwmobhwWwfmnKpBaGAGO74DM5R5EIDxT5Hg-S86OZ0/edit) 8 | 9 |
10 | 📑 Submission Dates
11 | 12 | | Submission | Submission Date | Status | 13 | | :--- | :---: | ---: | 14 | | [Main System](https://vle.dmu.ac.uk/webapps/turn-plgnhndl-bb_bb60/links/submit.jsp?course_id=_601351_1&content_id=_5389889_1&tii_assign_id=14486785&orig_id=_5389889_1) | 25-Mar-2022 |
  • [x] Completed
| 15 | | [Final report](https://vle.dmu.ac.uk/webapps/turn-plgnhndl-bb_bb60/links/submit.jsp?course_id=_601351_1&content_id=_5389894_1&tii_assign_id=14486799&orig_id=_5389894_1) | 08-Apr-2022 |
  • [x] Completed
| 16 | 17 |
18 | 19 |
20 | 🙆 Roles
21 | 22 | | User | Their DB | 23 | | --- | --- | 24 | | [Ethan Frizzell](https://github.com/Frizzle15) | Phones Management | 25 | | [Luke Lydiatt](https://github.com/LLydiatt) | Staff Management | 26 | | [Mahammad Talha](https://github.com/Talhamemon25) | Customer Management | 27 | | [Syed Naqvi ](https://github.com/No3Mc) | Stock Management | 28 | | [Aqeel Ahmed](https://github.com/AAhemd) | Supplier management | 29 |
30 | 31 |
32 | 😴 Inactives
33 | 34 | 35 | | User | Their DB | 36 | | --- | --- | 37 | | Kye Staples | Order Management | 38 | 39 |
40 | 41 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/StockViewer.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="StockViewer.aspx.cs" Inherits="StockViewer" %> 2 | <%--Written by Syed || P2652259 || No3Mc(https://github.com/No3Mc) 3 | Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store--%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 36 | 37 | 38 |
39 | 40 | 41 | 42 |
43 | 44 | 45 | 48 | 49 |
46 | 47 |
50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Phone/PhoneDelete.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="PhoneDelete.aspx.cs" Inherits="Phone_PhoneDelete" %> 2 | 3 | 4 | 5 | 6 | Read more: https://html.com/tags/comment-tag/#ixzz7OXSPpwU9 7 | 8 | 9 | 10 | 48 | 49 | 50 |
51 |
52 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/AdmLogin.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using System.Data.SqlClient; 8 | using System.Configuration; 9 | 10 | 11 | //Written by Syed || P2652259 || No3Mc(https://github.com/No3Mc) 12 | //Datasource hidden for security and login reason 13 | 14 | public partial class Stock_AdmLogin : System.Web.UI.Page 15 | { 16 | private object password; 17 | 18 | private object User; 19 | 20 | protected void Page_Load(object sender, EventArgs e) 21 | { 22 | 23 | } 24 | 25 | 26 | //login click 27 | protected void Button1_Click(object sender, EventArgs e) 28 | { 29 | 30 | //SqlConnection conn = new SqlConnection(@"Hidden for safety reason"); 31 | //conn.Open(); 32 | //string checkuser = "select count(*) from tblAdmin where User = '" + User + "'"; 33 | //SqlCommand com = new SqlCommand(checkuser, conn); 34 | //int temp = Convert.ToInt32(com.ExecuteScalar().ToString()); 35 | //conn.Close(); 36 | //if (temp == 1) 37 | //{ 38 | // conn.Open(); 39 | // string checkpasswordQuery = "select Password from tblAdmin where User = '" + User + "'"; 40 | //SqlCommand passcom = new SqlCommand(checkpasswordQuery, conn); 41 | // string password= passcom.ExecuteScalar().ToString(); 42 | 43 | // if (password == password) 44 | // { 45 | // Session["New"] = User; 46 | // Response.Redirect("Home.aspx"); 47 | // Response.Write("Correct pass"); 48 | // } 49 | // else 50 | // { 51 | // Response.Write("Pass is incorrect"); 52 | // } 53 | //} 54 | //else 55 | //{ 56 | // Response.Write("user is incorrect"); 57 | //} 58 | 59 | Response.Redirect("StockMain.aspx"); 60 | 61 | 62 | } 63 | } 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/AddStaff.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddStaff.aspx.cs" Inherits="Staff_AddStaff" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | 14 |
15 |
16 |
17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 |
30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Supplier/SupplierMain.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | 9 | public partial class Supplier_SupplierMain : System.Web.UI.Page 10 | { 11 | protected void Page_Load(object sender, EventArgs e) 12 | { 13 | //if this is the first time the page is dosplayed 14 | if (IsPostBack == false) 15 | { 16 | //update the list box 17 | DisplaySuppliers(); 18 | } 19 | 20 | } 21 | private void DisplaySuppliers() 22 | { 23 | //create an instance of the customer collection 24 | clsSupplierCollection aThisSupplier = new clsSupplierCollection(); 25 | //set the data source to the list of customers in the collection 26 | ListBox1.DataSource = aThisSupplier.SupplierList; 27 | //set the name of the primary key 28 | ListBox1.DataValueField = "SupplierID"; 29 | //set the data field to display 30 | ListBox1.DataTextField = "Name"; 31 | //bind the data to the list 32 | ListBox1.DataBind(); 33 | } 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | protected void SFind_Click(object sender, EventArgs e) 46 | { 47 | Response.Redirect("FindSupplier.aspx"); 48 | } 49 | 50 | protected void AdminPanel_Click(object sender, EventArgs e) 51 | { 52 | Response.Redirect("AdminPanel.aspx"); 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | protected void btnAdd_Click(object sender, EventArgs e) 63 | { 64 | Response.Redirect("Add Supplier.aspx"); 65 | } 66 | 67 | protected void btnUpdate_Click(object sender, EventArgs e) 68 | { 69 | Response.Redirect("Add Supplier.aspx"); 70 | } 71 | 72 | protected void btnDelete_Click(object sender, EventArgs e) 73 | { 74 | Response.Redirect("Add Supplier.aspx"); 75 | } 76 | 77 | protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e) 78 | { 79 | 80 | } 81 | 82 | protected void btnAdminPanel_Click(object sender, EventArgs e) 83 | { 84 | Response.Redirect("AdminPanel.aspx"); 85 | } 86 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Customer/ACustomer.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ACustomer.aspx.cs" Inherits="ACustomer" %> 2 | <%--Done by Memon--%> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 |
23 | 24 | 25 |
26 | 27 |
28 | 29 | 30 |
31 | 32 |
33 | 34 | 35 |
36 | 37 |
38 | 39 | 40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 | 55 | 56 |
57 |

58 | 59 | 60 | 61 | 62 |

63 | 64 | 65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Supplier/SupplierMain.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="SupplierMain.aspx.cs" Inherits="Supplier_SupplierMain" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 22 | 23 | 24 |
25 |
26 | 27 |
28 |

29 | 30 |

31 |

32 | 33 |

34 |

35 | 36 |

37 |

38 | 39 |

40 |

41 | 42 | 43 |

44 |

45 | 46 | 47 |

48 |

49 |  

50 |

51 | 52 |

53 |
54 | 55 | 56 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Customer/CustAdd.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustAdd.aspx.cs" Inherits="Customer_CustAdd" %> 2 | <%--Done by Memon--%> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | CustomerID                   15 | 16 | 17 | 18 |
19 |

20 | Name                             21 |               22 |

23 |

24 | Address                         25 |

26 |

27 | DOB                              28 |

29 |

30 |  Email                             31 | 32 |

33 |

34 |   PhoneNo                       35 | 36 | 37 | 38 |

39 |

40 | 41 | 42 | 43 |

44 |

45 | 46 | 47 | 48 |

49 |
50 | 51 | 52 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/AdminPanel.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | //Written by Syed, Ethan, Talha, Luke, and Aqeel || P2652259|| Syed/No3Mc(https://github.com/No3Mc), P2596393 || Ethan/Frizzle15(https://github.com/Frizzle15), P2629099 || Talha(https://github.com/Talhamemon25), P2606530 || Luke/LLydiatt(https://github.com/LLydiatt)and Aqeel(https://github.com/AqeelAhmed12)) 8 | 9 | //Stock Management by Syed Naqvi 10 | //Staff Management by Luke Lydiatt 11 | //Phones Management by Ethan Frizzell 12 | //Customer Management by Mahammad Talha 13 | //Supplier management by Aqeel Ahmed 14 | 15 | 16 | //Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store 17 | public partial class AdminPanel : System.Web.UI.Page 18 | { 19 | protected void Page_Load(object sender, EventArgs e) 20 | { 21 | 22 | } 23 | protected void Button6_Click(object sender, EventArgs e) 24 | { 25 | //Stock Management by Syed Naqvi 26 | Response.Redirect("~/Stock/StockViewer.aspx"); 27 | 28 | } 29 | 30 | protected void ImageButton15_Click(object sender, ImageClickEventArgs e) 31 | { 32 | Response.Redirect("Default.aspx"); 33 | 34 | } 35 | 36 | 37 | 38 | 39 | 40 | 41 | protected void Button11_Click(object sender, EventArgs e) 42 | { 43 | Response.Redirect("SupplierMain.aspx"); 44 | } 45 | protected void Button7_Click(object sender, EventArgs e) 46 | { 47 | Response.Redirect("/Phone/PhoneMain.aspx"); 48 | } 49 | 50 | protected void Button3_Click(object sender, EventArgs e) 51 | { 52 | 53 | } 54 | 55 | protected void Button2_Click(object sender, EventArgs e) 56 | { 57 | 58 | } 59 | 60 | protected void Button4_Click(object sender, EventArgs e) 61 | { 62 | //Phones Management by Ethan Frizzell 63 | Response.Redirect("APhone.aspx"); 64 | 65 | } 66 | 67 | protected void Button9_Click(object sender, EventArgs e) 68 | { 69 | //Customer Management by Mahammad Talha 70 | Response.Redirect("/Customer/Custpg.aspx"); 71 | 72 | } 73 | 74 | protected void Button8_Click(object sender, EventArgs e) 75 | { 76 | //Staff Management by Luke Lydiatt 77 | Response.Redirect("/Staff/AStaff.aspx"); 78 | 79 | } 80 | 81 | protected void Button10_Click(object sender, EventArgs e) 82 | { 83 | //Supplier management by Aqeel Ahmed 84 | Response.Redirect("/Supplier/SupplierMain.aspx"); 85 | 86 | } 87 | } 88 | 89 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/StockDel.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="StockDel.aspx.cs" Inherits="Stock_StockDel" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 35 | 36 | 37 |
38 | 39 |  
40 | 41 | 42 |                                                                                                                                               43 |                                               
44 | 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /Phone Selling System/PSSClasses/PSSClasses.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {84897773-856F-4855-9CBC-E674633E1456} 8 | Library 9 | Properties 10 | PSSClasses 11 | PSSClasses 12 | v4.7.2 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/AStaff.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="AStaff.aspx.cs" Inherits="Staff_AStaff" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 16 |
17 | 18 |
19 |
20 | 21 | 22 | 23 |
24 |
25 | 26 | 27 |
28 |
29 | 30 | 31 |
32 |
33 | 34 | 35 |
36 |
37 | 38 | 39 |
40 |
41 | 42 | 43 |
44 |

45 | 46 | 47 | 48 |

49 |

50 | 51 | 52 |

53 |

54 | 55 | 56 | 57 |

58 | 59 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/AdmLogin.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdmLogin.aspx.cs" Inherits="Stock_AdmLogin" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 46 | 47 |   48 | 49 | 50 |   51 | 52 | 53 |   54 | 55 | 56 |   57 | 58 | 59 |   60 | 61 | 62 | 63 |   64 | 65 | 66 |   67 | 68 | Cancel 69 | 70 |   71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/Styles/StyAStock.css: -------------------------------------------------------------------------------- 1 | /*Written by Syed || P2652259 || No3Mc(https://github.com/No3Mc) 2 | Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store*/ 3 | 4 | 5 | 6 | 7 | body { 8 | } 9 | .moveable { 10 | position: absolute; 11 | } 12 | 13 | 14 | /*textboxes*/ 15 | 16 | .txtStockname { 17 | position: absolute; 18 | left: 734px; 19 | top: 119px; 20 | } 21 | 22 | .txtStockID { 23 | position: absolute; 24 | left: 735px; 25 | top: 73px; 26 | } 27 | 28 | .txtLocation { 29 | position: absolute; 30 | left: 734px; 31 | top: 198px; 32 | } 33 | 34 | .txtQuantity { 35 | position: absolute; 36 | left: 732px; 37 | top: 237px; 38 | } 39 | 40 | .txtWarehouseNo { 41 | position: absolute; 42 | left: 734px; 43 | top: 159px; 44 | } 45 | 46 | .txtBarcode { 47 | position: absolute; 48 | left: 732px; 49 | top: 278px; 50 | } 51 | 52 | 53 | 54 | 55 | /*lists*/ 56 | 57 | .lblStockID { 58 | position: absolute; 59 | left: 587px; 60 | top: 76px; 61 | right: 1162px; 62 | margin-top: 3px; 63 | border-radius: 16px; 64 | text-align: center; 65 | background-color: wheat; 66 | text-shadow: 1px 1px; 67 | } 68 | .lblStockName { 69 | position: absolute; 70 | left: 574px; 71 | top: 114px; 72 | margin-top: 3px; 73 | border-radius: 16px; 74 | text-align: center; 75 | background-color: wheat; 76 | text-shadow: 1px 1px; 77 | } 78 | .lblWarehouseNo { 79 | position: absolute; 80 | left: 564px; 81 | top: 152px; 82 | margin-top: 3px; 83 | border-radius: 16px; 84 | text-align: center; 85 | background-color: wheat; 86 | text-shadow: 1px 1px; 87 | } 88 | .lblLocation { 89 | position: absolute; 90 | left: 590px; 91 | top: 192px; 92 | right: 1159px; 93 | margin-top: 3px; 94 | border-radius: 16px; 95 | text-align: center; 96 | background-color: wheat; 97 | text-shadow: 1px 1px; 98 | } 99 | .lblQuantity { 100 | position: absolute; 101 | left: 592px; 102 | top: 231px; 103 | margin-top: 3px; 104 | border-radius: 16px; 105 | text-align: center; 106 | background-color: wheat; 107 | text-shadow: 1px 1px; 108 | } 109 | .lblBarcode { 110 | position: absolute; 111 | left: 592px; 112 | top: 271px; 113 | margin-top: 3px; 114 | border-radius: 16px; 115 | text-align: center; 116 | background-color: wheat; 117 | text-shadow: 1px 1px; 118 | } 119 | 120 | /*label error*/ 121 | 122 | .lblError { 123 | position: absolute; 124 | left: 934px; 125 | top: 232px; 126 | border-radius: 16px; 127 | text-align: center; 128 | background-color: wheat; 129 | text-shadow: 1px 1px; 130 | } 131 | 132 | 133 | /*buttons*/ 134 | 135 | .btnCancel { 136 | position: absolute; 137 | left: 930px; 138 | top: 149px; 139 | } 140 | .btnOK { 141 | position: absolute; 142 | left: 788px; 143 | top: 320px; 144 | } 145 | .btnFind { 146 | position: absolute; 147 | left: 728px; 148 | top: 320px; 149 | } 150 | 151 | 152 | 153 | /*list*/ 154 | 155 | .lstStocks { 156 | position: absolute; 157 | left: 240px; 158 | top: 69px; 159 | width: 303px; 160 | height: 284px; 161 | } 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/DefAdmLog.aspx: -------------------------------------------------------------------------------- 1 | <%--Written by Syed, Ethan, Talha, Luke, and Aqeel || P2652259|| Syed/No3Mc(https://github.com/No3Mc), P2596393 || Ethan/Frizzle15(https://github.com/Frizzle15), P2629099 || Talha(https://github.com/Talhamemon25), P2606530 || Luke/LLydiatt(https://github.com/LLydiatt)and Aqeel(https://github.com/AqeelAhmed12)) 2 | 3 | Stock Management by Syed Naqvi 4 | Staff Management by Luke Lydiatt 5 | Phones Management by Ethan Frizzell 6 | Customer Management by Mahammad Talha 7 | Supplier management by Aqeel Ahmed 8 | 9 | 10 | Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store--%> 11 | 12 | 13 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefAdmLog.aspx.cs" Inherits="DefAdmLog" %> 14 | 15 | 16 | 17 | Login 18 | 69 | 70 | 71 |
72 |
73 |
74 | 75 | 76 |
77 |
78 | 79 | 80 |
81 | 82 | Cancel 83 |
84 |
85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Location.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Location.aspx.cs" Inherits="Location" %> 2 | 3 | 4 | 5 | 6 | 7 | Smartlink Store Locations 8 | 47 | 48 | 49 |
50 |
51 |

Our Store Locations

52 | 53 |
54 |

London Store

55 |

Address: 123 Oxford Street, London, W1D 1AA

56 |

Phone: +44 20 1234 5678

57 |

Email: london@smartlink.com

58 |
59 | 60 |
61 |

Manchester Store

62 |

Address: 456 Market Street, Manchester, M1 2AB

63 |

Phone: +44 161 9876 5432

64 |

Email: manchester@smartlink.com

65 |
66 | 67 |
68 |

Birmingham Store

69 |

Address: 789 High Street, Birmingham, B3 3CD

70 |

Phone: +44 121 6543 2109

71 |

Email: birmingham@smartlink.com

72 |
73 | 74 |
75 |

Glasgow Store

76 |

Address: 101 Buchanan Street, Glasgow, G1 3HL

77 |

Phone: +44 141 1234 5678

78 |

Email: glasgow@smartlink.com

79 |
80 | 81 |
82 |

Edinburgh Store

83 |

Address: 456 Princes Street, Edinburgh, EH2 4AT

84 |

Phone: +44 131 8765 4321

85 |

Email: edinburgh@smartlink.com

86 |
87 | 88 |
89 |

Liverpool Store

90 |

Address: 789 Waterfront Road, Liverpool, L3 5XY

91 |

Phone: +44 151 5678 9012

92 |

Email: liverpool@smartlink.com

93 |
94 | 95 |
96 |

Leeds Store

97 |

Address: 321 Park Avenue, Leeds, LS1 8HG

98 |

Phone: +44 113 2345 6789

99 |

Email: leeds@smartlink.com

100 |
101 | 102 | 103 |
104 |
105 | 106 | 107 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/AdminPanel.aspx: -------------------------------------------------------------------------------- 1 | <%--Written by Syed, Ethan, Talha, Luke, and Aqeel || P2652259|| Syed/No3Mc(https://github.com/No3Mc), P2596393 || Ethan/Frizzle15(https://github.com/Frizzle15), 2 | P2629099 || Talha(https://github.com/Talhamemon25), P2606530 || Luke/LLydiatt(https://github.com/LLydiatt)and Aqeel(https://github.com/AqeelAhmed12)) 3 | 4 | Stock Management by Syed Naqvi 5 | Staff Management by Luke Lydiatt 6 | Phones Management by Ethan Frizzell 7 | Customer Management by Mahammad Talha 8 | Supplier management by Aqeel Ahmed 9 | 10 | 11 | Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store--%> 12 | 13 | 14 | 15 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdminPanel.aspx.cs" Inherits="AdminPanel" %> 16 | 17 | 18 | 19 | 20 | 21 | Admin Panel 22 | 72 | 73 | 74 |
75 | 83 |
84 | 85 |
86 | 87 | 88 | 89 | 90 | 91 |
92 |
93 |
94 | 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /Phone Selling System/Phone Selling System.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.31903.59 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PSBackOffice", "PSBackOffice\PSBackOffice.csproj", "{85A49AA9-9DFF-4E65-89FF-0FF90CB1F0B4}" 7 | EndProject 8 | Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "PSSFrontOffice", "PSSFrontOffice\", "{F4EC0CB4-27C2-40F3-9BC3-A78E5F68A7D3}" 9 | ProjectSection(WebsiteProperties) = preProject 10 | TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.7.2" 11 | ProjectReferences = "{84897773-856f-4855-9cbc-e674633e1456}|PSSClasses.dll;" 12 | Debug.AspNetCompiler.VirtualPath = "/localhost_56842" 13 | Debug.AspNetCompiler.PhysicalPath = "PSSFrontOffice\" 14 | Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_56842\" 15 | Debug.AspNetCompiler.Updateable = "true" 16 | Debug.AspNetCompiler.ForceOverwrite = "true" 17 | Debug.AspNetCompiler.FixedNames = "false" 18 | Debug.AspNetCompiler.Debug = "True" 19 | Release.AspNetCompiler.VirtualPath = "/localhost_56842" 20 | Release.AspNetCompiler.PhysicalPath = "PSSFrontOffice\" 21 | Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_56842\" 22 | Release.AspNetCompiler.Updateable = "true" 23 | Release.AspNetCompiler.ForceOverwrite = "true" 24 | Release.AspNetCompiler.FixedNames = "false" 25 | Release.AspNetCompiler.Debug = "False" 26 | VWDPort = "56842" 27 | SlnRelativePath = "PSSFrontOffice\" 28 | DefaultWebSiteLanguage = "Visual C#" 29 | EndProjectSection 30 | EndProject 31 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PSSClasses", "PSSClasses\PSSClasses.csproj", "{84897773-856F-4855-9CBC-E674633E1456}" 32 | EndProject 33 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhoneSystemTesting", "PhoneSystemTesting\PhoneSystemTesting.csproj", "{DAFD35C1-1D3B-4C04-AC34-B0774F0AC8A7}" 34 | EndProject 35 | Global 36 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 37 | Debug|Any CPU = Debug|Any CPU 38 | Release|Any CPU = Release|Any CPU 39 | EndGlobalSection 40 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 41 | {85A49AA9-9DFF-4E65-89FF-0FF90CB1F0B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 42 | {85A49AA9-9DFF-4E65-89FF-0FF90CB1F0B4}.Debug|Any CPU.Build.0 = Debug|Any CPU 43 | {85A49AA9-9DFF-4E65-89FF-0FF90CB1F0B4}.Release|Any CPU.ActiveCfg = Release|Any CPU 44 | {85A49AA9-9DFF-4E65-89FF-0FF90CB1F0B4}.Release|Any CPU.Build.0 = Release|Any CPU 45 | {F4EC0CB4-27C2-40F3-9BC3-A78E5F68A7D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 46 | {F4EC0CB4-27C2-40F3-9BC3-A78E5F68A7D3}.Debug|Any CPU.Build.0 = Debug|Any CPU 47 | {F4EC0CB4-27C2-40F3-9BC3-A78E5F68A7D3}.Release|Any CPU.ActiveCfg = Debug|Any CPU 48 | {F4EC0CB4-27C2-40F3-9BC3-A78E5F68A7D3}.Release|Any CPU.Build.0 = Debug|Any CPU 49 | {84897773-856F-4855-9CBC-E674633E1456}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 50 | {84897773-856F-4855-9CBC-E674633E1456}.Debug|Any CPU.Build.0 = Debug|Any CPU 51 | {84897773-856F-4855-9CBC-E674633E1456}.Release|Any CPU.ActiveCfg = Release|Any CPU 52 | {84897773-856F-4855-9CBC-E674633E1456}.Release|Any CPU.Build.0 = Release|Any CPU 53 | {DAFD35C1-1D3B-4C04-AC34-B0774F0AC8A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 54 | {DAFD35C1-1D3B-4C04-AC34-B0774F0AC8A7}.Debug|Any CPU.Build.0 = Debug|Any CPU 55 | {DAFD35C1-1D3B-4C04-AC34-B0774F0AC8A7}.Release|Any CPU.ActiveCfg = Release|Any CPU 56 | {DAFD35C1-1D3B-4C04-AC34-B0774F0AC8A7}.Release|Any CPU.Build.0 = Release|Any CPU 57 | EndGlobalSection 58 | GlobalSection(SolutionProperties) = preSolution 59 | HideSolutionNode = FALSE 60 | EndGlobalSection 61 | GlobalSection(ExtensibilityGlobals) = postSolution 62 | SolutionGuid = {E9B6214A-4E4F-47D0-9B70-F6F772FE4C0E} 63 | EndGlobalSection 64 | EndGlobal 65 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Supplier/Add Supplier.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Add Supplier.aspx.cs" Inherits="Supplier_Add_Supplier" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 29 | 30 | 31 |
32 |
33 |
34 | 35 |
36 |

37 | 38 |                            39 | 40 |  

41 |

42 | 43 |                      44 | 45 |  

46 |

47 | 48 |                   49 | 50 |  

51 |

52 | 53 |                54 | 55 |  

56 |

57 | 58 |                       59 | 60 |  

61 |

62 | 63 |                     64 | 65 |  

66 |

67 | 68 | 69 | 70 |

71 |

72 |     73 | 74 |

75 |
76 |
77 | 78 | 79 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Phone/PhoneMain.aspx.cs: -------------------------------------------------------------------------------- 1 | using PSSClasses.Phone; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Web; 6 | using System.Web.UI; 7 | using System.Web.UI.WebControls; 8 | //Written by Ethan Frizzell P2596393 9 | public partial class Phone_PhoneMain : System.Web.UI.Page 10 | { 11 | protected void Page_Load(object sender, EventArgs e) 12 | { 13 | //if this is the first appearance of the form 14 | if (IsPostBack == false) 15 | { 16 | //displays phones in the list 17 | DisplayPhones(""); 18 | } 19 | } 20 | protected void btnAdd_Click(object sender, EventArgs e) 21 | { 22 | //indicate this is a new record in the database 23 | Session["PhoneID"] = -1; 24 | //redirect to the phone page to add data 25 | Response.Redirect("APhone.aspx?PhoneID=-1"); 26 | } 27 | 28 | protected void btnEdit_Click(object sender, EventArgs e) 29 | { 30 | //variable to store the PK of the record to be edited 31 | Int32 PhoneID; 32 | //if a record has been selected from the list 33 | if (lstPhone.SelectedIndex != -1) 34 | { 35 | //get the primary key of the record 36 | PhoneID = Convert.ToInt32(lstPhone.SelectedValue); 37 | //store the data in the session object 38 | Session["PhoneID"] = PhoneID; 39 | // redirect to the add page 40 | Response.Redirect("APhone.aspx"); 41 | } 42 | else //if not 43 | { 44 | lblError.Text = "You need to select an item"; //display an error message 45 | } 46 | } 47 | 48 | protected void btnDelete_Click(object sender, EventArgs e) 49 | { 50 | Int32 PhoneID; 51 | 52 | if (lstPhone.SelectedIndex != -1)//if a record has been selected 53 | { 54 | PhoneID = Convert.ToInt32(lstPhone.SelectedValue); //get the primary key of the item 55 | 56 | Response.Redirect("Delete.aspx"); // redirect to the delete page 57 | } 58 | else //if not 59 | { 60 | lblError.Text = "You need to select an item from the list"; //display an error message 61 | } 62 | } 63 | 64 | protected void btnFind_Click(object sender, EventArgs e) 65 | { 66 | Response.Redirect("PhoneMain.aspx"); 67 | } 68 | 69 | protected void btnFilter_Click(object sender, EventArgs e) 70 | { 71 | 72 | } 73 | 74 | protected void btnDisplay_Click(object sender, EventArgs e) 75 | { 76 | DisplayPhones(""); //use the display phones functions to show data in the list 77 | } 78 | 79 | protected void btnApply_Click(object sender, EventArgs e) 80 | { 81 | DisplayPhones(txtPhoneName.Text); //display the phone based on data entered into the text box 82 | } 83 | 84 | Int32 DisplayPhones(string PhoneNameFilter) 85 | { 86 | //declare variables 87 | Int32 PhoneID; 88 | string PhoneName; 89 | string PhoneManufacturer; 90 | //create instance of collection class 91 | clsPhoneCollection PhoneList = new clsPhoneCollection(); 92 | PhoneList.FilterByName(PhoneNameFilter); 93 | 94 | Int32 RecordCount; 95 | Int32 Index = 0; 96 | RecordCount = PhoneList.Count; 97 | lstPhone.Items.Clear(); 98 | while (Index < RecordCount) 99 | { 100 | PhoneID = PhoneList.PhoneList[Index].PhoneID; 101 | PhoneName = PhoneList.PhoneList[Index].PhoneName; 102 | PhoneManufacturer = PhoneList.PhoneList[Index].PhoneManufacturer; 103 | 104 | ListItem NewEntry = new ListItem(PhoneID + " " + PhoneName, PhoneID.ToString()); 105 | 106 | lstPhone.Items.Add(NewEntry); 107 | Index++; 108 | } 109 | 110 | return RecordCount; 111 | } 112 | 113 | protected void lstPhone_SelectedIndexChanged(object sender, EventArgs e) 114 | { 115 | 116 | } 117 | 118 | protected void btnBack_Click(object sender, EventArgs e) 119 | { 120 | Response.Redirect("AdminPanel.aspx"); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Supplier/FindSupplier.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="FindSupplier.aspx.cs" Inherits="Supplier_FindSupplier" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 31 | 32 | 33 |
34 |
35 | 36 |
37 |

38 | 39 |                            40 | 41 |  

42 |

43 | 44 |                      45 | 46 |  

47 |

48 | 49 |                   50 | 51 |  

52 |

53 | 54 |                55 | 56 |  

57 |

58 | 59 |                       60 | 61 |  

62 |

63 | 64 |                     65 | 66 |  

67 |

68 | 69 | 70 | 71 |

72 |

73 | 74 |            75 |

76 |
77 | 78 | 79 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Customer/CustAdd.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | //Done by Memon 9 | public partial class Customer_CustAdd : System.Web.UI.Page 10 | { 11 | Int32 CustID; 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | //get the number of the Customer to be proccessed 15 | CustID = Convert.ToInt32(Session["StockID"]); 16 | if (IsPostBack == false) 17 | { 18 | //populate the list of Customer 19 | DisplayCustomers(); 20 | 21 | } 22 | } 23 | void DisplayCustomers() 24 | { 25 | //craete an instance of the Customer list 26 | clsCustomerCollection CustList = new clsCustomerCollection(); 27 | //display the data for this record 28 | CustList.ThisCust.Find(CustID); 29 | //display the data for this record 30 | txtAddress.Text = CustList.ThisCust.Address; 31 | txtDOB.Text = CustList.ThisCust.DOB; 32 | txtName.Text = CustList.ThisCust.Name; 33 | txtEmail.Text = CustList.ThisCust.Email; 34 | txtPhoneNo.Text = CustList.ThisCust.PhoneNo; 35 | } 36 | protected void btnNo_Click(object sender, EventArgs e) 37 | { 38 | Response.Redirect("Custpg.aspx"); 39 | } 40 | protected void btnYes_Click(object sender, EventArgs e) 41 | { 42 | if (CustID == -1) 43 | { 44 | //add 45 | Add(); 46 | } 47 | else 48 | { 49 | //Update 50 | Update(); 51 | } 52 | } 53 | void Add() 54 | { 55 | //create an instance of the Customer list 56 | PSSClasses.clsCustomerCollection CustList = new PSSClasses.clsCustomerCollection(); 57 | //validate the data on the web form 58 | String Error = CustList.ThisCust.Valid(Convert.ToInt32(txtCustID.Text), txtDOB.Text, txtAddress.Text, txtName.Text, txtEmail.Text, txtPhoneNo.Text); 59 | //if the data is OK then add it to the objcet 60 | if (Error == "") 61 | { 62 | //get the data entered by the user 63 | CustList.ThisCust.CustID = Convert.ToInt32(txtCustID.Text); 64 | CustList.ThisCust.Address = txtName.Text; 65 | CustList.ThisCust.DOB = txtDOB.Text; 66 | CustList.ThisCust.Name = txtName.Text; 67 | CustList.ThisCust.Email = txtEmail.Text; 68 | CustList.ThisCust.PhoneNo = txtPhoneNo.Text; 69 | //add the record 70 | CustList.Add(); 71 | //all done so redirect back to the main page 72 | Response.Redirect("Custpg.aspx"); 73 | } 74 | else 75 | { 76 | //report an error 77 | lblError.Text = "problems with entries" + Error; 78 | } 79 | 80 | } 81 | void Update() 82 | { 83 | //create an instance of the Cust list 84 | clsCustomerCollection CustList = new clsCustomerCollection(); 85 | //validate the data on the web form 86 | String Error = CustList.ThisCust.Valid(Convert.ToInt32(txtCustID.Text), txtDOB.Text, txtAddress.Text, txtName.Text, txtEmail.Text, txtPhoneNo.Text); 87 | //if the data is OK then add it to the objcet 88 | if (Error == "") 89 | { 90 | //find the record to update 91 | CustList.ThisCust.Find(CustID); 92 | //get the data entered by the user 93 | //get the data entered by the user 94 | CustList.ThisCust.CustID = Convert.ToInt32(txtCustID.Text); 95 | CustList.ThisCust.DOB = txtDOB.Text; 96 | CustList.ThisCust.Address = txtAddress.Text; 97 | CustList.ThisCust.Name = txtName.Text; 98 | CustList.ThisCust.Email = txtEmail.Text; 99 | CustList.ThisCust.PhoneNo = txtPhoneNo.Text; 100 | //add the record 101 | CustList.Update(); 102 | 103 | //all done so redirect back to the main page 104 | Response.Redirect("Custpg.aspx"); 105 | } 106 | else 107 | { 108 | //report an error 109 | lblError.Text = "There were problems with the data entered " + Error; 110 | } 111 | } 112 | 113 | } 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /Phone Selling System/PSSClasses/Phone/clsPhoneCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | //Written by Ethan Frizzell P2596393 7 | 8 | namespace PSSClasses.Phone 9 | { 10 | public class clsPhoneCollection 11 | { 12 | 13 | List mPhoneList = new List(); 14 | 15 | public int Count { get; set; } 16 | clsPhone mThisPhone = new clsPhone(); 17 | 18 | public clsPhone ThisPhone 19 | { 20 | get 21 | { 22 | return mThisPhone; 23 | } 24 | set 25 | { 26 | mThisPhone = value; 27 | } 28 | } 29 | 30 | public List PhoneList 31 | { 32 | get 33 | { 34 | return mPhoneList; 35 | } 36 | set 37 | { 38 | mPhoneList = value; 39 | } 40 | } 41 | 42 | 43 | 44 | public clsPhoneCollection() 45 | { 46 | clsDataConnection DB = new clsDataConnection(); 47 | 48 | DB.Execute("sproc_tblPhone_SelectAll"); 49 | 50 | PopulateArray(DB); 51 | } 52 | 53 | void PopulateArray(clsDataConnection DB) 54 | { 55 | int Index = 0; 56 | 57 | int RecordsCount = 0; 58 | 59 | RecordsCount = DB.Count; 60 | 61 | mPhoneList = new List(); 62 | 63 | while (Index < RecordsCount) 64 | { 65 | clsPhone APhone = new clsPhone(); 66 | 67 | APhone.PhoneID = Convert.ToInt32(DB.DataTable.Rows[Index]["PhoneID"]); 68 | APhone.PhoneName = Convert.ToString(DB.DataTable.Rows[Index]["PhoneName"]); 69 | APhone.PhoneManufacturer = Convert.ToString(DB.DataTable.Rows[Index]["PhoneManufacturer"]); 70 | APhone.BatteryCapacity = Convert.ToString(DB.DataTable.Rows[Index]["BatteryCapacity"]); 71 | APhone.CameraQuality = Convert.ToString(DB.DataTable.Rows[Index]["CameraQuality"]); 72 | APhone.StorageCapacity = Convert.ToString(DB.DataTable.Rows[Index]["StorageCapacity"]); 73 | APhone.DisplaySize = Convert.ToString(DB.DataTable.Rows[Index]["DisplaySize"]); 74 | APhone.DateReleased = Convert.ToDateTime(DB.DataTable.Rows[Index]["Datereleased"]); 75 | 76 | 77 | mPhoneList.Add(APhone); 78 | 79 | Index++; 80 | } 81 | } 82 | 83 | public void Delete() 84 | { 85 | clsDataConnection DB = new clsDataConnection(); 86 | 87 | DB.AddParameter("@PhoneID", mThisPhone.PhoneID); 88 | 89 | DB.Execute("sproc_tblPhone_Delete"); 90 | } 91 | 92 | public int Add() 93 | { 94 | clsDataConnection DB = new clsDataConnection(); 95 | 96 | DB.AddParameter("@PhoneName", mThisPhone.PhoneName); 97 | DB.AddParameter("@PhoneManufacturer", mThisPhone.PhoneManufacturer); 98 | DB.AddParameter("@BatteryCapacity", mThisPhone.BatteryCapacity); 99 | DB.AddParameter("@CameraQuality", mThisPhone.CameraQuality); 100 | DB.AddParameter("@StorageCapacity", mThisPhone.StorageCapacity); 101 | DB.AddParameter("@DisplaySize", mThisPhone.DisplaySize); 102 | DB.AddParameter("@DateReleased", mThisPhone.DateReleased); 103 | 104 | return DB.Execute("sproc_tblPhone_Add"); 105 | 106 | } 107 | 108 | public void Update() 109 | { 110 | 111 | clsDataConnection DB = new clsDataConnection(); 112 | DB.AddParameter("@PhoneID", mThisPhone.PhoneID); 113 | DB.AddParameter("@PhoneName", mThisPhone.PhoneName); 114 | DB.AddParameter("@PhoneManufacturer", mThisPhone.PhoneManufacturer); 115 | DB.AddParameter("@BatteryCapacity", mThisPhone.BatteryCapacity); 116 | DB.AddParameter("@CameraQuality", mThisPhone.CameraQuality); 117 | DB.AddParameter("@StorageCapacity", mThisPhone.StorageCapacity); 118 | DB.AddParameter("@DisplaySize", mThisPhone.DisplaySize); 119 | DB.AddParameter("@DateReleased", mThisPhone.DateReleased); 120 | 121 | DB.Execute("sproc_tblStock_Update"); 122 | 123 | 124 | 125 | } 126 | 127 | public void FilterByName(string PhoneName) 128 | { 129 | clsDataConnection DB = new clsDataConnection(); 130 | 131 | DB.AddParameter("@PhoneName", PhoneName); 132 | 133 | DB.Execute("sproc_tblPhone_FilterByName"); 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Phone/PhoneMain.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="PhoneMain.aspx.cs" Inherits="Phone_PhoneMain" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 113 | 114 | 115 |
116 |
117 |
118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /Phone Selling System/PhoneSystemTesting/Staff/tstStaffCollection.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using PSSClasses; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace PhoneSystemTesting.Staff 10 | { 11 | [TestClass] 12 | public class tstStaffCollection 13 | { 14 | public void StaffListOK() 15 | { 16 | //create an instance of the class we want to create 17 | clsStaffCollection AllStaff = new clsStaffCollection(); 18 | //create some test data to assign to the property 19 | //in this case the data needs to be a list objects 20 | List TestList = new List(); 21 | //add an item to the list 22 | //create the item of test data 23 | clsStaff TestItem = new clsStaff(); 24 | //set its properties 25 | TestItem.StaffNo = 1; 26 | TestItem.StaffEmail = "a"; 27 | TestItem.StaffName = "a"; 28 | TestItem.StaffPassword = "a"; 29 | TestItem.StaffPosition = "a"; 30 | TestItem.StaffTelephoneNo = "a"; 31 | //add the item to the test list 32 | TestList.Add(TestItem); 33 | AllStaff.StaffList = TestList; 34 | //test to see that the two values are the same 35 | Assert.AreEqual(AllStaff.StaffList, TestList); 36 | } 37 | 38 | 39 | [TestMethod] 40 | public void AddMethodOK() 41 | { 42 | //create an instance of the class we want to create 43 | clsStaffCollection AllStaff = new clsStaffCollection(); 44 | //create the item of test data 45 | clsStaff TestItem = new clsStaff(); 46 | //var to store the primary key 47 | Int32 PrimaryKey = 0; 48 | //set its properties 49 | TestItem.StaffNo = 1; 50 | TestItem.StaffEmail = "1"; 51 | TestItem.StaffName = "1"; 52 | TestItem.StaffPassword = "1"; 53 | TestItem.StaffPosition = "1"; 54 | TestItem.StaffTelephoneNo = "1"; 55 | //set ThisStaff to the test data 56 | AllStaff.ThisStaff = TestItem; 57 | //add the record 58 | PrimaryKey = AllStaff.Add(); 59 | //set the primary key of the test data 60 | TestItem.StaffNo = PrimaryKey; 61 | //find the record 62 | AllStaff.ThisStaff.Find(PrimaryKey); 63 | //test to see the two values are the same 64 | Assert.AreEqual(AllStaff.ThisStaff, TestItem); 65 | 66 | } 67 | 68 | 69 | 70 | [TestMethod] 71 | public void DelMethodOK() 72 | { 73 | //create an instance of the class we want to create 74 | clsStaffCollection AllStaff = new clsStaffCollection(); 75 | //create the item of test data 76 | clsStaff TestItem = new clsStaff(); 77 | //var to store the primary key 78 | Int32 PrimaryKey = 0; 79 | //set its properties 80 | TestItem.StaffNo = 1; 81 | TestItem.StaffEmail = "1"; 82 | TestItem.StaffName = "1"; 83 | TestItem.StaffPassword = "1"; 84 | TestItem.StaffPosition = "1"; 85 | TestItem.StaffTelephoneNo = "1"; 86 | //set ThisStaff to the test data 87 | AllStaff.ThisStaff = TestItem; 88 | //add the record 89 | PrimaryKey = AllStaff.Add(); 90 | //set the primary key of the test data 91 | TestItem.StaffNo = PrimaryKey; 92 | //find the record 93 | AllStaff.ThisStaff.Find(PrimaryKey); 94 | //test to see the two values are the same 95 | AllStaff.Del(); 96 | Assert.AreEqual(AllStaff.ThisStaff, TestItem); 97 | 98 | } 99 | 100 | 101 | [TestMethod] 102 | public void UpdateMethodOK() 103 | { 104 | //create ab instance of the class we wanted 105 | clsStaffCollection AllStaff = new clsStaffCollection(); 106 | clsStaff TestItem = new clsStaff(); 107 | Int32 PrimaryKey = 0; 108 | TestItem.StaffEmail = "3"; 109 | TestItem.StaffName = "3"; 110 | TestItem.StaffPassword = "3"; 111 | 112 | TestItem.StaffPosition = "3"; 113 | 114 | TestItem.StaffPosition = "3"; 115 | 116 | TestItem.StaffTelephoneNo = "3"; 117 | AllStaff.ThisStaff = TestItem; 118 | //add the record 119 | PrimaryKey = AllStaff.Add(); 120 | //set the primary key of the test data 121 | TestItem.StaffNo = PrimaryKey; 122 | //modify the test data 123 | TestItem.StaffEmail = "33"; 124 | TestItem.StaffName = "33"; 125 | TestItem.StaffPassword = "33"; 126 | TestItem.StaffPosition = "33"; 127 | TestItem.StaffTelephoneNo = "33"; 128 | //set the record based on the new test data 129 | Assert.AreEqual(AllStaff.ThisStaff, TestItem); 130 | } 131 | 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/Styles/StyStockMain.css: -------------------------------------------------------------------------------- 1 | /*Written by Syed || P2652259 || No3Mc(https://github.com/No3Mc) 2 | Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store*/ 3 | 4 | 5 | 6 | 7 | body { 8 | margin: 0; 9 | padding: 0; 10 | background-image: url("~/Images/Backgrounds/Stock/1.jpg"); 11 | } 12 | section { 13 | width: 100vw; 14 | height: 100vh; 15 | 16 | display: flex; 17 | justify-content: center; 18 | align-items: center; 19 | } 20 | 21 | 22 | 23 | .table { 24 | position: absolute; 25 | left: 825px; 26 | z-index: 1; 27 | width: 190px; 28 | height: 185px; 29 | margin-top: 3px; 30 | border-radius: 16px; 31 | top: 19px; 32 | } 33 | 34 | 35 | 36 | .auto { 37 | position: absolute; 38 | top: 331px; 39 | left: 826px; 40 | z-index: 1; 41 | width: 270px; 42 | height: 270px; 43 | margin-top: 3px; 44 | border-radius: 16px; 45 | } 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | /* 57 | 58 | 59 | 60 | */ 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | .table { 69 | position: absolute; 70 | left: 574px; 71 | z-index: 1; 72 | width: 190px; 73 | height: 185px; 74 | margin-top: 3px; 75 | border-radius: 16px; 76 | top: 51px; 77 | } 78 | 79 | 80 | /*lists*/ 81 | 82 | .lstWarehouseNo { 83 | position: absolute; 84 | top: 125px; 85 | left: 165px; 86 | z-index: 1; 87 | width: 190px; 88 | height: 185px; 89 | margin-top: 3px; 90 | border-radius: 16px; 91 | right: 1463px; 92 | overflow: hidden; 93 | } 94 | 95 | .lstLocation { 96 | position: absolute; 97 | top: 345px; 98 | left: 164px; 99 | z-index: 1; 100 | width: 190px; 101 | height: 185px; 102 | margin-top: 3px; 103 | border-radius: 16px; 104 | overflow: hidden; 105 | } 106 | 107 | 108 | 109 | .lstStockName { 110 | position: absolute; 111 | top: 402px; 112 | left: 580px; 113 | z-index: 1; 114 | width: 447px; 115 | height: 138px; 116 | border-radius: 16px; 117 | margin-top: 3px; 118 | overflow: scroll; 119 | } 120 | 121 | .lstBarcode { 122 | position: absolute; 123 | top: 125px; 124 | left: 1246px; 125 | z-index: 1; 126 | width: 190px; 127 | height: 185px; 128 | margin-top: 3px; 129 | border-radius: 16px; 130 | overflow: hidden; 131 | } 132 | 133 | .lstQuantity { 134 | position: absolute; 135 | top: 344px; 136 | left: 1245px; 137 | z-index: 1; 138 | width: 190px; 139 | height: 185px; 140 | margin-top: 3px; 141 | border-radius: 16px; 142 | overflow: hidden; 143 | } 144 | 145 | 146 | 147 | /*labels*/ 148 | 149 | .lblStockName { 150 | position: absolute; 151 | top: 366px; 152 | left: 720px; 153 | z-index: 1; 154 | width: 180px; 155 | height: 26px; 156 | margin-top: 3px; 157 | border-radius: 16px; 158 | text-align: center; 159 | background-color: wheat; 160 | text-shadow: 1px 1px; 161 | } 162 | 163 | 164 | .lblBarcode { 165 | position: absolute; 166 | top: 83px; 167 | left: 1250px; 168 | z-index: 1; 169 | width: 180px; 170 | height: 26px; 171 | margin-top: 3px; 172 | border-radius: 16px; 173 | text-align: center; 174 | background-color: wheat; 175 | text-shadow: 1px 1px; 176 | } 177 | 178 | .lblQuantity { 179 | position: absolute; 180 | top: 546px; 181 | left: 1249px; 182 | z-index: 1; 183 | width: 180px; 184 | height: 26px; 185 | margin-top: 3px; 186 | border-radius: 16px; 187 | text-align: center; 188 | background-color: wheat; 189 | text-shadow: 1px 1px; 190 | } 191 | 192 | 193 | .lblWarehouseNo { 194 | position: absolute; 195 | top: 82px; 196 | left: 172px; 197 | z-index: 1; 198 | width: 180px; 199 | height: 26px; 200 | margin-top: 3px; 201 | border-radius: 16px; 202 | text-align: center; 203 | background-color: wheat; 204 | text-shadow: 1px 1px; 205 | } 206 | 207 | .lblLocation { 208 | position: absolute; 209 | top: 545px; 210 | left: 168px; 211 | z-index: 1; 212 | width: 180px; 213 | height: 26px; 214 | margin-top: 3px; 215 | border-radius: 16px; 216 | text-align: center; 217 | background-color: wheat; 218 | text-shadow: 1px 1px; 219 | } 220 | 221 | /*Please enter Warehouse No*/ 222 | .lblEnter { 223 | position: center; 224 | text-align: center; 225 | background-color: wheat; 226 | text-shadow: 1px 1px; 227 | } 228 | 229 | 230 | 231 | 232 | .btnLogout { 233 | position: absolute; 234 | left: 7px; 235 | top: 61px; 236 | height: 40px; 237 | width: 80px; 238 | } 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | -------------------------------------------------------------------------------- /Phone Selling System/PhoneSystemTesting/PhoneSystemTesting.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Debug 7 | AnyCPU 8 | {DAFD35C1-1D3B-4C04-AC34-B0774F0AC8A7} 9 | Library 10 | Properties 11 | PhoneSystemTesting 12 | PhoneSystemTesting 13 | v4.7.2 14 | 512 15 | {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 16 | 15.0 17 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 18 | $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages 19 | False 20 | UnitTest 21 | 22 | 23 | 24 | 25 | true 26 | full 27 | false 28 | bin\Debug\ 29 | DEBUG;TRACE 30 | prompt 31 | 4 32 | 33 | 34 | pdbonly 35 | true 36 | bin\Release\ 37 | TRACE 38 | prompt 39 | 4 40 | 41 | 42 | 43 | ..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll 44 | 45 | 46 | ..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | {84897773-856F-4855-9CBC-E674633E1456} 70 | PSSClasses 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Phone Selling System/PSSClasses/Staff/clsStaffCollection.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace PSSClasses 9 | { 10 | public class clsStaffCollection 11 | { 12 | //private data member for the list 13 | List mStaffList = new List(); 14 | public int Counts { get; set; } 15 | clsStaff mThisStaff = new clsStaff(); 16 | 17 | 18 | public clsStaff ThisStaff 19 | { 20 | get 21 | { 22 | //return the private data 23 | return mThisStaff; 24 | } 25 | set 26 | { 27 | //set private data 28 | mThisStaff = value; 29 | } 30 | } 31 | 32 | 33 | public List StaffList 34 | { 35 | get 36 | { 37 | //return the private data 38 | return mStaffList; 39 | } 40 | set 41 | { 42 | //set the private data 43 | mStaffList = value; 44 | } 45 | } 46 | 47 | public int Count 48 | { 49 | get 50 | { 51 | //return the count of the list 52 | return mStaffList.Count; 53 | } 54 | set 55 | { 56 | //we shall worry about this later 57 | } 58 | } 59 | 60 | 61 | public clsStaffCollection() 62 | { 63 | 64 | //objcet for data connection 65 | clsDataConnection DB = new clsDataConnection(); 66 | //execute the stored procedure 67 | DB.Execute("sproc_tblStaff_SelectAll"); 68 | //populate the array list with data table 69 | PopulateArray(DB); 70 | 71 | } 72 | 73 | 74 | void PopulateArray(clsDataConnection DB) 75 | { 76 | //populate the array list based on the data table in the parameter DB 77 | //var for the index 78 | int Index = 0; 79 | //var to store the record count 80 | int RecordsCount = 0; 81 | //get the count of records 82 | RecordsCount = DB.Count; 83 | //clear the private array list 84 | mStaffList = new List(); 85 | //while there are records to process 86 | while (Index < RecordsCount) 87 | { 88 | //create a blank book 89 | clsStaff AStaff = new clsStaff(); 90 | //read in the fields from the current records 91 | AStaff.StaffNo = Convert.ToInt32(DB.DataTable.Rows[Index]["StaffNo"]); 92 | AStaff.StaffEmail = Convert.ToString(DB.DataTable.Rows[Index]["StaffEmail"]); 93 | AStaff.StaffName = Convert.ToString(DB.DataTable.Rows[Index]["StaffName"]); 94 | AStaff.StaffPassword = Convert.ToString(DB.DataTable.Rows[Index]["StaffPassword"]); 95 | AStaff.StaffPosition = Convert.ToString(DB.DataTable.Rows[Index]["StaffPosition"]); 96 | AStaff.StaffTelephoneNo = Convert.ToString(DB.DataTable.Rows[Index]["StaffTelephoneNo"]); 97 | 98 | 99 | 100 | 101 | 102 | 103 | //add the record to the private data member 104 | mStaffList.Add(AStaff); 105 | //point at the record 106 | Index++; 107 | } 108 | } 109 | 110 | 111 | public void Del() 112 | { 113 | //delete the record pointed by the thisStock 114 | //connects database 115 | clsDataConnection DB = new clsDataConnection(); 116 | //parameters for the stored procedure 117 | DB.AddParameter("@StaffNo", mThisStaff.StaffNo); 118 | //execute the stored procedure 119 | DB.Execute("sproc_tblStaff_Delete"); 120 | } 121 | 122 | 123 | public int Add() 124 | { 125 | //adds a new record to the database based on the values 126 | //set the primary key value of the new record 127 | clsDataConnection DB = new clsDataConnection(); 128 | 129 | DB.AddParameter("@StaffEmail", mThisStaff.StaffEmail); 130 | DB.AddParameter("@StaffName", mThisStaff.StaffName); 131 | DB.AddParameter("@StaffPassword", mThisStaff.StaffPassword); 132 | DB.AddParameter("@StaffPosition", mThisStaff.StaffPosition); 133 | DB.AddParameter("@StaffTelephoneNo", mThisStaff.StaffTelephoneNo); 134 | //execute the query returning the primary key value 135 | return DB.Execute("sproc_tblStaff_Insert"); 136 | } 137 | 138 | 139 | public void Update() 140 | { 141 | //adds a new record to the database based on the values 142 | //set the primary key value of the new record 143 | clsDataConnection DB = new clsDataConnection(); 144 | DB.AddParameter("@StaffNo", mThisStaff.StaffNo); 145 | DB.AddParameter("@StaffEmail", mThisStaff.StaffEmail); 146 | DB.AddParameter("@StaffName", mThisStaff.StaffName); 147 | DB.AddParameter("@StaffPassword", mThisStaff.StaffPassword); 148 | DB.AddParameter("@StaffPosition", mThisStaff.StaffPosition); 149 | DB.AddParameter("@StaffTelephoneNo", mThisStaff.StaffTelephoneNo); 150 | //execute the query returning the primary key value 151 | DB.Execute("sproc_tblStaff_Update"); 152 | } 153 | } 154 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Customer/ACustomer.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | //Done by Memon 9 | public partial class ACustomer : System.Web.UI.Page 10 | { 11 | Int32 CustID; 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | CustID = Convert.ToInt32(Session["CustID"]); 15 | //if this is the first time the page is displayed 16 | if (IsPostBack == false) 17 | { 18 | //update the list box 19 | DisplayCusts(); 20 | } 21 | } 22 | protected void btnOK_Click(object sender, EventArgs e) 23 | { 24 | //create a new instance of clsCustomer 25 | clsCustomer ACustomer = new clsCustomer(); 26 | //capture the customer id 27 | ACustomer.Name = txtName.Text; 28 | //store the name in the session object 29 | Session["ACustomer"] = ACustomer; 30 | //redirect to the Main customer page 31 | Response.Redirect("Custpg.aspx"); 32 | 33 | } 34 | void DisplayCusts() 35 | { 36 | //create an instance of the Customer collection 37 | PSSClasses.clsCustomerCollection Custs = new PSSClasses.clsCustomerCollection(); 38 | //find the record to update 39 | Custs.ThisCust.Find(CustID); 40 | //display the data for this record 41 | txtAddress.Text = Custs.ThisCust.Address; 42 | txtDOB.Text = Custs.ThisCust.DOB; 43 | txtName.Text = Custs.ThisCust.Name; 44 | txtEmail.Text = Custs.ThisCust.Email; 45 | txtPhoneNo.Text = Custs.ThisCust.PhoneNo; 46 | } 47 | void Add() 48 | { 49 | //create an instance of the holidays 50 | PSSClasses.clsCustomerCollection Custs = new PSSClasses.clsCustomerCollection(); 51 | 52 | //validate the data on the web form 53 | String Error = Custs.ThisCust.Valid(Convert.ToInt32(txtCustID.Text), txtAddress.Text, txtDOB.Text, txtName.Text, txtEmail.Text, txtPhoneNo.Text); 54 | //if the data is Ok then add it to the object 55 | if (Error == "") 56 | { 57 | //get the data entered by the user 58 | Custs.ThisCust.CustID = Convert.ToInt32(txtCustID.Text); 59 | Custs.ThisCust.Address = txtAddress.Text; 60 | Custs.ThisCust.DOB = txtDOB.Text; 61 | Custs.ThisCust.Name = txtName.Text; 62 | Custs.ThisCust.Email = txtEmail.Text; 63 | Custs.ThisCust.PhoneNo = txtPhoneNo.Text; 64 | //add the record 65 | Custs.Add(); 66 | //all done so redirect back to the custmain page 67 | Response.Redirect("CustMain.aspx"); 68 | } 69 | else 70 | { 71 | //report an error 72 | lblError.Text = "There were problems with the entries " + Error; 73 | } 74 | } 75 | protected void btnCancel_Click(object sender, EventArgs e) 76 | { 77 | Response.Redirect("Custpg.aspx"); 78 | } 79 | protected void btnFind_Click(object sender, EventArgs e) 80 | { 81 | //create an instance of the Cust class 82 | clsCustomer ACustomer = new clsCustomer(); 83 | //variable to store the primary key 84 | Int32 CustID; 85 | //variable to store the result of the find operation 86 | bool found = false; 87 | //get the primary key entered by the user 88 | CustID = Convert.ToInt32(txtCustID.Text); 89 | //find the record 90 | found = ACustomer.Find(CustID); 91 | //if found 92 | if (found == true) 93 | { 94 | //display the values of the properties in the form 95 | txtAddress.Text = ACustomer.Address; 96 | txtDOB.Text = ACustomer.DOB; 97 | txtName.Text = ACustomer.Name; 98 | txtEmail.Text = ACustomer.Email; 99 | txtPhoneNo.Text = ACustomer.PhoneNo; 100 | //error label 101 | lblError.Text = " found"; 102 | } 103 | else 104 | { 105 | //display the error msg 106 | lblError.Text = "Not found"; 107 | } 108 | 109 | } 110 | void Update() 111 | { 112 | //create an instance of the Customer from collection 113 | PSSClasses.clsCustomerCollection Customers = new PSSClasses.clsCustomerCollection(); 114 | 115 | //validate the data on the web form 116 | String Error = Customers.ThisCust.Valid(Convert.ToInt32(txtCustID.Text), txtAddress.Text, txtDOB.Text, txtName.Text, txtEmail.Text, txtPhoneNo.Text); 117 | //if the data is OK then add it to the object 118 | if (Error == "") 119 | { 120 | 121 | 122 | //find the record to update 123 | Customers.ThisCust.Find(CustID); 124 | //get the data entered by the user 125 | 126 | Customers.ThisCust.CustID = Convert.ToInt32(txtCustID.Text); 127 | Customers.ThisCust.Address = txtAddress.Text; 128 | Customers.ThisCust.DOB = txtDOB.Text; 129 | Customers.ThisCust.Name = txtName.Text; 130 | Customers.ThisCust.Email = (txtEmail.Text); 131 | Customers.ThisCust.PhoneNo = (txtPhoneNo.Text); 132 | //update the record 133 | Customers.Update(); 134 | //all done so redirect back to main customer page 135 | Response.Redirect("Custpg.aspx"); 136 | } 137 | else 138 | { 139 | //report an error 140 | lblError.Text = "There were problems with the entries" + Error; 141 | } 142 | } 143 | 144 | } 145 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | syedvevo@aol.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/AStock.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="AStock.aspx.cs" Inherits="_Default" %> 2 | <%--Written by Syed || P2652259 || No3Mc(https://github.com/No3Mc) 3 | Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store--%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 104 | 105 | 106 |
107 | 108 | <%--labels--%> 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | <%--textboxes--%> 120 | 121 | 122 | 123 | 124 | 125 | 126 | <%--buttons--%> 127 | 128 | 129 | 130 | <%--list--%> 131 | 132 | 133 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/Styles/StyStockAdd.css: -------------------------------------------------------------------------------- 1 | /*Written by Syed || P2652259 || No3Mc(https://github.com/No3Mc) 2 | Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store*/ 3 | 4 | 5 | 6 | 7 | body { 8 | } 9 | .moveable { 10 | position: absolute; 11 | } 12 | 13 | 14 | .table { 15 | position: absolute; 16 | left: 450px; 17 | top: 5px; 18 | width: 660px; 19 | height: 400px; 20 | } 21 | 22 | .labels { 23 | position: absolute; 24 | Height: 34px; 25 | Width: 369px; 26 | } 27 | 28 | .textboxes { 29 | position: absolute; 30 | Height: 34px; 31 | Width: 369px; 32 | border-block-color: Blue; 33 | } 34 | 35 | .buttons { 36 | position: absolute; 37 | border-block-color: #990000; 38 | color: Red; 39 | Width: 185px; 40 | } 41 | 42 | .lblError { 43 | position: absolute; 44 | background-color: Red; 45 | border-color: Red; 46 | border-style: Solid; 47 | Font: Goudy Old Style; 48 | Width: 367px; 49 | margin-top: 3px; 50 | border-radius: 16px; 51 | text-align: center; 52 | background-color: wheat; 53 | text-shadow: 1px 1px; 54 | } 55 | 56 | 57 | 58 | 59 | /*Error Labels*/ 60 | 61 | .lblStockError { 62 | position: absolute; 63 | left: 690px; 64 | top: 60px; 65 | margin-top: 3px; 66 | border-radius: 16px; 67 | text-align: center; 68 | background-color: wheat; 69 | text-shadow: 1px 1px; 70 | } 71 | 72 | .LabelBarcodeError { 73 | position: absolute; 74 | left: 692px; 75 | top: 288px; 76 | margin-top: 3px; 77 | border-radius: 16px; 78 | text-align: center; 79 | background-color: wheat; 80 | text-shadow: 1px 1px; 81 | } 82 | 83 | .lblQuantityError { 84 | position: absolute; 85 | left: 691px; 86 | top: 231px; 87 | bottom: 147px; 88 | margin-top: 3px; 89 | border-radius: 16px; 90 | text-align: center; 91 | background-color: wheat; 92 | text-shadow: 1px 1px; 93 | } 94 | 95 | 96 | .lblLocationError { 97 | position: absolute; 98 | left: 690px; 99 | bottom: 205px; 100 | margin-top: 3px; 101 | border-radius: 16px; 102 | text-align: center; 103 | background-color: wheat; 104 | text-shadow: 1px 1px; 105 | } 106 | 107 | 108 | .lblWarehouseError { 109 | position: absolute; 110 | left: 689px; 111 | top: 117px; 112 | bottom: 261px; 113 | margin-top: 3px; 114 | border-radius: 16px; 115 | text-align: center; 116 | background-color: wheat; 117 | text-shadow: 1px 1px; 118 | } 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | .lblError { 127 | position: absolute; 128 | background-color: Red; 129 | border-color: Red; 130 | border-style: Solid; 131 | Width: 542px; 132 | left: 856px; 133 | top: 110px; 134 | height: 92px; 135 | margin-top: 3px; 136 | border-radius: 16px; 137 | text-align: center; 138 | background-color: wheat; 139 | text-shadow: 1px 1px; 140 | } 141 | 142 | 143 | 144 | 145 | 146 | 147 | .lblStockName { 148 | position: absolute; 149 | left: 303px; 150 | top: 173px; 151 | bottom: 655px; 152 | margin-top: 3px; 153 | border-radius: 16px; 154 | text-align: center; 155 | background-color: wheat; 156 | text-shadow: 1px 1px; 157 | } 158 | 159 | .lblLocation { 160 | position: absolute; 161 | left: 303px; 162 | top: 173px; 163 | margin-top: 3px; 164 | border-radius: 16px; 165 | text-align: center; 166 | background-color: wheat; 167 | text-shadow: 1px 1px; 168 | } 169 | 170 | .lblWarehouseNo { 171 | position: absolute; 172 | left: 284px; 173 | top: 370px; 174 | margin-top: 3px; 175 | border-radius: 16px; 176 | text-align: center; 177 | background-color: wheat; 178 | text-shadow: 1px 1px; 179 | } 180 | 181 | .lblQuantity { 182 | position: absolute; 183 | left: 307px; 184 | top: 234px; 185 | margin-top: 3px; 186 | border-radius: 16px; 187 | text-align: center; 188 | background-color: wheat; 189 | text-shadow: 1px 1px; 190 | } 191 | 192 | .lblBarcode { 193 | position: absolute; 194 | left: 307px; 195 | top: 297px; 196 | margin-top: 3px; 197 | border-radius: 16px; 198 | text-align: center; 199 | background-color: wheat; 200 | text-shadow: 1px 1px; 201 | } 202 | 203 | 204 | 205 | 206 | 207 | .txtStockName { 208 | position: absolute; 209 | Height: 34px; 210 | Width: 369px; 211 | border-block-color: Blue; 212 | left: 455px; 213 | top: 110px; 214 | } 215 | 216 | .txtLocation { 217 | position: absolute; 218 | Height: 34px; 219 | Width: 369px; 220 | border-block-color: Blue; 221 | left: 456px; 222 | top: 172px; 223 | } 224 | 225 | .txtBarcode { 226 | position: absolute; 227 | Height: 34px; 228 | Width: 369px; 229 | border-block-color: Blue; 230 | left: 458px; 231 | top: 298px; 232 | } 233 | 234 | .txtWarehouseNo { 235 | position: absolute; 236 | Height: 34px; 237 | Width: 369px; 238 | border-block-color: Blue; 239 | left: 458px; 240 | top: 369px; 241 | } 242 | 243 | 244 | 245 | .txtQuantity { 246 | position: absolute; 247 | Height: 34px; 248 | Width: 369px; 249 | border-block-color: Blue; 250 | left: 456px; 251 | top: 237px; 252 | } 253 | 254 | 255 | 256 | 257 | 258 | 259 | .btnOK { 260 | position: absolute; 261 | border-block-color: #990000; 262 | color: Red; 263 | Width: 185px; 264 | left: 452px; 265 | top: 438px; 266 | } 267 | 268 | .btnCancel { 269 | position: absolute; 270 | border-block-color: #990000; 271 | color: Red; 272 | Width: 185px; 273 | left: 647px; 274 | top: 438px; 275 | } 276 | 277 | .HyperLinkCancel { 278 | position: absolute; 279 | left: 858px; 280 | top: 237px; 281 | } 282 | 283 | -------------------------------------------------------------------------------- /Phone Selling System/PSSClasses/Supplier/clsSupplierCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PSSClasses 8 | { 9 | 10 | public class clsSupplierCollection 11 | { 12 | 13 | 14 | 15 | //private data member for the list 16 | List aSupplierList = new List(); 17 | public int Counts { get; set; } 18 | clsSupplier aThisSupplier = new clsSupplier(); 19 | public int Add() 20 | { 21 | //adds a new record to the database based on the values 22 | //set the primary key value of the new record 23 | clsDataConnection DB = new clsDataConnection(); 24 | 25 | DB.AddParameter("@Name", aThisSupplier.Name); 26 | DB.AddParameter("@Address", aThisSupplier.Address); 27 | DB.AddParameter("@MobileNo", aThisSupplier.MobileNo); 28 | DB.AddParameter("@Email", aThisSupplier.Email); 29 | DB.AddParameter("@DOB", aThisSupplier.DOB); 30 | //execute the query returning the primary key value 31 | return DB.Execute("sproc_tblSupplier_Insert"); 32 | 33 | } 34 | public clsSupplier ThisSupplier 35 | { 36 | get 37 | { 38 | //return the private data 39 | return aThisSupplier; 40 | } 41 | set 42 | { 43 | //set private data 44 | aThisSupplier = value; 45 | } 46 | } 47 | 48 | 49 | public List SupplierList 50 | { 51 | get 52 | { 53 | //return the private data 54 | return aSupplierList; 55 | } 56 | set 57 | { 58 | //set the private data 59 | aSupplierList = value; 60 | } 61 | } 62 | 63 | public int Count 64 | { 65 | get 66 | { 67 | //return the count of the list 68 | return aSupplierList.Count; 69 | } 70 | set 71 | { 72 | //we shall worry about this later 73 | } 74 | } 75 | 76 | 77 | public clsSupplierCollection() 78 | { 79 | 80 | //objcet for data connection 81 | clsDataConnection DB = new clsDataConnection(); 82 | //execute the stored procedure 83 | DB.Execute("sproc_tblSupplier_SelectAll"); 84 | //populate the array list with data table 85 | PopulateArray(DB); 86 | 87 | } 88 | 89 | public void Update() 90 | { 91 | //adds a new record to the database based on the values 92 | //set the primary key value of the new record 93 | clsDataConnection DB = new clsDataConnection(); 94 | DB.AddParameter("@SupplierID", aThisSupplier.SupplierID); 95 | DB.AddParameter("@Name", aThisSupplier.Name); 96 | DB.AddParameter("@Address", aThisSupplier.Address); 97 | DB.AddParameter("@MobileNo", aThisSupplier.MobileNo); 98 | DB.AddParameter("@Email", aThisSupplier.Email); 99 | DB.AddParameter("@DOB", aThisSupplier.DOB); 100 | //execute the query returning the primary key value 101 | DB.Execute("sproc_tblSupplier_Update"); 102 | 103 | } 104 | 105 | void PopulateArray(clsDataConnection DB) 106 | { 107 | //populate the array list based on the data table in the parameter DB 108 | //var for the index 109 | int Index = 0; 110 | //var to store the record count 111 | int RecordsCount = 0; 112 | //get the count of records 113 | RecordsCount = DB.Count; 114 | //clear the private array list 115 | aSupplierList = new List(); 116 | //while there are records to process 117 | while (Index < RecordsCount) 118 | { 119 | //create a blank book 120 | clsSupplier aSupplier = new clsSupplier(); 121 | //read in the fields from the current records 122 | aSupplier.SupplierID = Convert.ToInt32(DB.DataTable.Rows[Index]["SupplierID"]); 123 | aSupplier.Name = Convert.ToString(DB.DataTable.Rows[Index]["Name"]); 124 | aSupplier.Address = Convert.ToString(DB.DataTable.Rows[Index]["Address"]); 125 | aSupplier.MobileNo = Convert.ToString(DB.DataTable.Rows[Index]["MobileNo"]); 126 | aSupplier.Email = Convert.ToString(DB.DataTable.Rows[Index]["Email"]); 127 | aSupplier.DOB = Convert.ToString(DB.DataTable.Rows[Index]["DOB"]); 128 | 129 | 130 | 131 | //add the record to the private data member 132 | aSupplierList.Add(aSupplier); 133 | //point at the record 134 | Index++; 135 | } 136 | } 137 | 138 | 139 | public void Delete() 140 | { 141 | //delete the record pointed by the thisStock 142 | //connects database 143 | clsDataConnection DB = new clsDataConnection(); 144 | //parameters for the stored procedure 145 | DB.AddParameter("@SupplierID", aThisSupplier.SupplierID); 146 | //execute the stored procedure 147 | DB.Execute("sproc_tblSupplier_Del"); 148 | } 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /Phone Selling System/PSBackOffice/Form1.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Staff/AStaff.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | 9 | public partial class Staff_AStaff : System.Web.UI.Page 10 | { 11 | // Variable to store the primary key with page level scope 12 | Int32 StaffNo; 13 | 14 | protected void Page_Load(object sender, EventArgs e) 15 | { 16 | StaffNo = Convert.ToInt32(Session["StaffNo"]); 17 | 18 | if (!IsPostBack) 19 | { 20 | DisplayStaff(); 21 | } 22 | } 23 | 24 | void DisplayStaff() 25 | { 26 | // Create an instance of the Staff collection 27 | clsStaffCollection AStaff = new clsStaffCollection(); 28 | 29 | // Set the data source to find the staff 30 | lstStaff.DataSource = AStaff.StaffList; 31 | 32 | // Set the name of the primary key 33 | lstStaff.DataValueField = "StaffNo"; 34 | 35 | // Set the data field to display 36 | lstStaff.DataTextField = "StaffName"; 37 | 38 | // Bind the data to the list 39 | lstStaff.DataBind(); 40 | } 41 | 42 | // Function for adding new records 43 | void Add() 44 | { 45 | clsStaffCollection Staff = new clsStaffCollection(); 46 | 47 | // Validate the data on the web form 48 | string Error = Staff.ThisStaff.Valid(txtSEmail.Text, txtSName.Text, txtSPassword.Text, txtSPos.Text, txtSPhone.Text); 49 | 50 | // If the data is OK, then add it to the object 51 | if (Error == "") 52 | { 53 | // Find the record to update 54 | Staff.ThisStaff.Find(StaffNo); 55 | 56 | // Get the data entered by the user 57 | Staff.ThisStaff.StaffEmail = txtSEmail.Text; 58 | Staff.ThisStaff.StaffName = txtSName.Text; 59 | Staff.ThisStaff.StaffPassword = txtSPassword.Text; 60 | Staff.ThisStaff.StaffPosition = txtSPos.Text; 61 | Staff.ThisStaff.StaffTelephoneNo = txtSPhone.Text; 62 | 63 | // Add the record 64 | Staff.Add(); 65 | 66 | // All done, so redirect back to the main page 67 | Response.Redirect("AStaff.aspx"); 68 | } 69 | else 70 | { 71 | // Report an error 72 | lblError.Text = "There were problems: " + Error; 73 | } 74 | } 75 | 76 | void Update() 77 | { 78 | clsStaffCollection Staff = new clsStaffCollection(); 79 | 80 | // Validate the data on the web form 81 | string Error = Staff.ThisStaff.Valid(txtSEmail.Text, txtSName.Text, txtSPassword.Text, txtSPos.Text, txtSPhone.Text); 82 | 83 | // If the data is OK, then update the record 84 | if (Error == "") 85 | { 86 | // Find the record to update 87 | Staff.ThisStaff.Find(StaffNo); 88 | 89 | // Get the data entered by the user 90 | Staff.ThisStaff.StaffEmail = txtSEmail.Text; 91 | Staff.ThisStaff.StaffName = txtSName.Text; 92 | Staff.ThisStaff.StaffPassword = txtSPassword.Text; 93 | Staff.ThisStaff.StaffPosition = txtSPos.Text; 94 | Staff.ThisStaff.StaffTelephoneNo = txtSPhone.Text; 95 | 96 | // Update the record 97 | Staff.Update(); 98 | 99 | // All done, so redirect back to main page 100 | Response.Redirect("AStaff.aspx"); 101 | } 102 | else 103 | { 104 | // Report an error 105 | lblError.Text = "There were problems: " + Error; 106 | } 107 | } 108 | 109 | protected void btnAdd_Click(object sender, EventArgs e) 110 | { 111 | // Add the new record 112 | Add(); 113 | // All done, so redirect back to the main page 114 | //Response.Redirect("AddStaff.aspx"); 115 | } 116 | 117 | protected void btnFind_Click(object sender, EventArgs e) 118 | { 119 | // Create an instance of the Staff class 120 | clsStaff AStaff = new clsStaff(); 121 | 122 | // Variable to store the primary key 123 | Int32 StaffNo; 124 | 125 | // Variable to store the result of the find operation 126 | bool found = false; 127 | 128 | // Get the primary key entered by the user 129 | StaffNo = Convert.ToInt32(txtStaffNo.Text); 130 | 131 | // Find the record 132 | found = AStaff.Find(StaffNo); 133 | 134 | // If found 135 | if (found) 136 | { 137 | // Display the values of the properties in the form 138 | txtSEmail.Text = AStaff.StaffEmail; 139 | txtSName.Text = AStaff.StaffName; 140 | txtSPassword.Text = AStaff.StaffPassword; 141 | txtSPos.Text = AStaff.StaffPosition; 142 | txtSPhone.Text = AStaff.StaffTelephoneNo; 143 | 144 | lblError.Text = "Found"; 145 | } 146 | else 147 | { 148 | // Display the error message 149 | lblError.Text = "Not found"; 150 | } 151 | } 152 | 153 | protected void btnCancel_Click(object sender, EventArgs e) 154 | { 155 | Response.Redirect("~/AdminPanel.aspx"); 156 | } 157 | 158 | protected void btnDelete_Click(object sender, EventArgs e) 159 | { 160 | // If a record has been selected from the list 161 | if (lstStaff.SelectedIndex != -1) 162 | { 163 | // Get the key value of the record being deleted 164 | StaffNo = Convert.ToInt32(lstStaff.SelectedValue); 165 | 166 | // Store the data 167 | Session["StaffNo"] = StaffNo; 168 | 169 | // Redirect to delete page 170 | Response.Redirect("DeleteStaff.aspx"); 171 | } 172 | else 173 | { 174 | lblError.Text = "Please select an option from the box"; 175 | } 176 | } 177 | protected void btnOK_Click(object sender, EventArgs e) 178 | { 179 | // Handle the button click event 180 | } 181 | 182 | protected void lstStaff_SelectedIndexChanged(object sender, EventArgs e) 183 | { 184 | 185 | } 186 | } 187 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Customer/Custpg.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using PSSClasses; 8 | //Done by Memon 9 | public partial class Customer_Custpg : System.Web.UI.Page 10 | { 11 | protected void Page_Load(object sender, EventArgs e) 12 | { 13 | //if this is the first time the page is displayed 14 | if (IsPostBack == false) 15 | { 16 | //update the list box 17 | DisplayCustomers(); 18 | } 19 | } 20 | 21 | void DisplayCustomers() 22 | { 23 | //create an instance of the Stock collection 24 | PSSClasses.clsCustomerCollection CustBook = new PSSClasses.clsCustomerCollection(); 25 | //set the data source to the list of CustBook in the collection 26 | lstCust.DataSource = CustBook.CustList; 27 | //set the name of the primary key 28 | lstCust.DataValueField = "CustID"; 29 | //set the data field to display 30 | lstCust.DataTextField = "Name"; 31 | //bind the data to the list 32 | lstCust.DataBind(); 33 | } 34 | 35 | protected void btnAdd_Click(object sender, EventArgs e) 36 | { 37 | //store -1 into the session object to indicate this is a new record 38 | Session["CustID"] = -1; 39 | //redirect to the data entry page 40 | Response.Redirect("CustAdd.aspx"); 41 | } 42 | 43 | protected void btnEdit_Click(object sender, EventArgs e) 44 | { 45 | // var to store the primary key value of the record to be deleted 46 | Int32 CustID; 47 | //if a record has been selected from the list 48 | if (lstCust.SelectedIndex != -1) 49 | { 50 | //get the primary key value of the record to edit 51 | CustID = Convert.ToInt32(lstCust.SelectedValue); 52 | //Store the data in the session object 53 | Session["Cust"] = CustID; 54 | //redirects to the delete page 55 | Response.Redirect("ACustomer.aspx"); 56 | } 57 | else //if no record has been selected 58 | { 59 | //display an error# 60 | lblError.Text = "Please select a record to edit from the list"; 61 | } 62 | 63 | 64 | } 65 | 66 | protected void btnDelete_Click(object sender, EventArgs e) 67 | { 68 | //var to store the primary key value of the record to be deleted 69 | Int32 CustID; 70 | //if a record has been selected from the list 71 | 72 | if (lstCust.SelectedIndex != -1) 73 | { 74 | //get the primary key value of the record to delete 75 | CustID = Convert.ToInt32(lstCust.SelectedValue); 76 | //Store the data in the session object 77 | Session["CustID"] = CustID; 78 | //redirects to the Customer's delete page 79 | Response.Redirect("CustDel.aspx"); 80 | } 81 | 82 | else //if no record has been selected 83 | { 84 | lblError.Text = "Please select a record to delete from the list"; 85 | } 86 | 87 | } 88 | 89 | Int32 DisplayCusts(string LocationFilter) 90 | { 91 | ///this function accepts one parameter - the post code to filter the list on 92 | ///it populates the list box with data from the middle layer class 93 | ///it returns a single value, the number of records found 94 | 95 | //create a new instance of the clsCustoemrCollection/CustList 96 | clsCustomerCollection CustList = new clsCustomerCollection(); 97 | //var to store the count of records 98 | Int32 RecordCount; 99 | 100 | //var to store the CustID 101 | string CustID; 102 | //var to store the Address 103 | string Address; 104 | //var to store the DOB 105 | string DOB; 106 | //var to store the Name value 107 | string Name; 108 | //var to store the Email 109 | string Email; 110 | //var to store the PhoneNo 111 | string PhoneNo; 112 | 113 | //var to store the index 114 | // string CustID; 115 | Int32 Index = 0; 116 | //clear the list of any existing items 117 | lstCust.Items.Clear(); 118 | 119 | //call the filter by LocationFilter method 120 | CustList.ReportByLocation(LocationFilter); 121 | //get the count of records found 122 | RecordCount = CustList.Count; 123 | //loop through each record found using the index to point to each record in the data table 124 | while (Index < RecordCount) 125 | { 126 | CustID = Convert.ToString(CustList.CustList[Index].CustID); 127 | //get the Address from the query results 128 | Address = Convert.ToString(CustList.CustList[Index].Address); 129 | DOB = Convert.ToString(CustList.CustList[Index].DOB); 130 | Name = Convert.ToString(CustList.CustList[Index].Name); 131 | Email = Convert.ToString(CustList.CustList[Index].Email); 132 | PhoneNo = Convert.ToString(CustList.CustList[Index].PhoneNo); 133 | 134 | //set up a new object of class list item 135 | ListItem NewItem = new ListItem(CustID + " : CustID" + " | " + "Address: " + Address + " |" + " DOB: " + DOB + " |" + " Name: " + Name + " |" + " Email: " + Email + " |" + " PhoneNo: " + PhoneNo); 136 | //add the new item to the list 137 | lstCust.Items.Add(NewItem); 138 | //increment the index 139 | Index++; 140 | } 141 | //return the number of records found 142 | return RecordCount; 143 | } 144 | protected void btnApply_Click(object sender, EventArgs e) 145 | { 146 | //declare var to store the record count 147 | Int32 RecordCount; 148 | //assign the results of the DisplayCusts function to the record count var 149 | RecordCount = DisplayCusts(txtWarehouseNo.Text); 150 | //display the number of records found 151 | lblError.Text = RecordCount + " records found"; 152 | } 153 | 154 | 155 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSClasses/Stock/clsStockCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | //Written by Syed || P2652259 || No3Mc(https://github.com/No3Mc) 7 | //Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store 8 | 9 | namespace PSSClasses 10 | { 11 | public class clsStockCollection 12 | { 13 | 14 | 15 | 16 | //private data member for the list 17 | List NStockList = new List(); 18 | //public List StockList { get; set; } 19 | public int Counts { get; set; } 20 | clsStock NThisStock = new clsStock(); 21 | 22 | 23 | public clsStock ThisStock 24 | { 25 | get 26 | { 27 | //return the private data 28 | return NThisStock; 29 | } 30 | set 31 | { 32 | //set private data 33 | NThisStock = value; 34 | } 35 | } 36 | 37 | 38 | public List StockList 39 | { 40 | get 41 | { 42 | //return the private data 43 | return NStockList; 44 | } 45 | set 46 | { 47 | //set the private data 48 | NStockList = value; 49 | } 50 | } 51 | 52 | public int Count 53 | { 54 | get 55 | { 56 | //return the count of the list 57 | return NStockList.Count; 58 | } 59 | set 60 | { 61 | //we shall worry about this later 62 | } 63 | } 64 | 65 | 66 | public clsStockCollection() 67 | { 68 | 69 | //objcet for data connection 70 | clsDataConnection DB = new clsDataConnection(); 71 | //execute the stored procedure 72 | DB.Execute("sproc_tblStock_SelectAll"); 73 | //populate the array list with data table 74 | PopulateArray(DB); 75 | 76 | } 77 | //For quick copy paste StockName, WarehouseNo, Location, Quantity, Barcode 78 | 79 | 80 | void PopulateArray(clsDataConnection DB) 81 | { 82 | //populate the array list based on the data table in the parameter DB 83 | //var for the index 84 | int Index = 0; 85 | //var to store the record count 86 | int RecordsCount = 0; 87 | //get the count of records 88 | RecordsCount = DB.Count; 89 | //clear the private array list 90 | NStockList = new List(); 91 | //while there are records to process 92 | while (Index < RecordsCount) 93 | { 94 | //create a blank Stock 95 | clsStock AStock = new clsStock(); 96 | //read in the fields from the current records 97 | AStock.StockID = Convert.ToInt32(DB.DataTable.Rows[Index]["StockID"]); 98 | AStock.StockName = Convert.ToString(DB.DataTable.Rows[Index]["StockName"]); 99 | AStock.WarehouseNo = Convert.ToString(DB.DataTable.Rows[Index]["WarehouseNo"]); 100 | AStock.Location = Convert.ToString(DB.DataTable.Rows[Index]["Location"]); 101 | AStock.Quantity = Convert.ToString(DB.DataTable.Rows[Index]["Quantity"]); 102 | AStock.Barcode = Convert.ToString(DB.DataTable.Rows[Index]["Barcode"]); 103 | 104 | 105 | 106 | 107 | 108 | 109 | //add the record to the private data member 110 | NStockList.Add(AStock); 111 | //point at the record 112 | Index++; 113 | } 114 | } 115 | 116 | 117 | public void Del() 118 | { 119 | //delete the record pointed by the thisStock 120 | //connects database 121 | clsDataConnection DB = new clsDataConnection(); 122 | //parameters for the stored procedure 123 | DB.AddParameter("@StockID", NThisStock.StockID); 124 | //execute the stored procedure 125 | DB.Execute("sproc_tblStock_Del"); 126 | } 127 | 128 | 129 | public int Add() 130 | { 131 | //adds a new record to the database based on the values 132 | //set the primary key value of the new record 133 | clsDataConnection DB = new clsDataConnection(); 134 | 135 | DB.AddParameter("@StockName", NThisStock.StockName); 136 | DB.AddParameter("@WarehouseNo", NThisStock.WarehouseNo); 137 | DB.AddParameter("@Location", NThisStock.Location); 138 | DB.AddParameter("@Quantity", NThisStock.Quantity); 139 | DB.AddParameter("@Barcode", NThisStock.Barcode); 140 | //execute the query returning the primary key value 141 | return DB.Execute("sproc_tblStock_Insert"); 142 | //return the primary key of the new record 143 | //return NThisStock.StockID; 144 | } 145 | 146 | 147 | public void Update() 148 | { 149 | //adds a new record to the database based on the values 150 | //set the primary key value of the new record 151 | clsDataConnection DB = new clsDataConnection(); 152 | DB.AddParameter("@StockID", NThisStock.StockID); 153 | DB.AddParameter("@StockName", NThisStock.StockName); 154 | DB.AddParameter("@WarehouseNo", NThisStock.WarehouseNo); 155 | DB.AddParameter("@Location", NThisStock.Location); 156 | DB.AddParameter("@Quantity", NThisStock.Quantity); 157 | DB.AddParameter("@Barcode", NThisStock.Barcode); 158 | //execute the query returning the primary key value 159 | DB.Execute("sproc_tblStock_Update"); 160 | //return the primary key of the new record 161 | //return NThisStock.StockID; 162 | } 163 | 164 | public void ReportByLocation(string Location) 165 | { 166 | //filters the records based on a full or partial location 167 | //connect to the database 168 | clsDataConnection DB = new clsDataConnection(); 169 | //send the location parameter to the database 170 | DB.AddParameter("@Location", Location); 171 | //execute the stored procedure 172 | DB.Execute("sproc_tblStock_FilterByLocation"); 173 | } 174 | } 175 | 176 | 177 | } 178 | -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Phone/APhone.aspx.cs: -------------------------------------------------------------------------------- 1 | using PSSClasses; 2 | using PSSClasses.Phone; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Web; 7 | using System.Web.UI; 8 | using System.Web.UI.WebControls; 9 | //Written by Ethan Frizzell P2596393 10 | public partial class Phone_APhone : System.Web.UI.Page 11 | { 12 | Int32 PhoneID; 13 | protected void Page_Load(object sender, EventArgs e) 14 | { 15 | //if this is the first appearance of the form 16 | if (IsPostBack == false) 17 | { 18 | //displays phones in the list 19 | DisplayPhones(PhoneID); 20 | } 21 | } 22 | 23 | void DisplayPhones(Int32 PhoneID) //displayphones function 24 | { 25 | //create an instance of phone class 26 | clsPhone MyPhoneStore = new clsPhone(); 27 | //find record pk 28 | MyPhoneStore.Find(PhoneID); 29 | //display record data in text boxes 30 | txtPhoneName.Text = MyPhoneStore.PhoneName; 31 | txtPhoneManufacturer.Text = MyPhoneStore.PhoneManufacturer; 32 | txtStorageCapacity.Text = MyPhoneStore.StorageCapacity; 33 | txtCameraQuality.Text = MyPhoneStore.CameraQuality; 34 | txtBatteryCapacity.Text = MyPhoneStore.BatteryCapacity; 35 | txtDisplaySize.Text = MyPhoneStore.DisplaySize; 36 | txtDateReleased.Text = MyPhoneStore.DateReleased.ToString("dd/mm/yyyy"); 37 | 38 | 39 | } 40 | 41 | protected void btnFind_Click(object sender, EventArgs e) //find function 42 | { 43 | //create a new instance of the phone class 44 | clsPhone APhone = new clsPhone(); 45 | //variable to store the PK 46 | Int32 PhoneID; 47 | //variable to store the result of the function 48 | bool found = false; 49 | //get the PK entered 50 | PhoneID = Convert.ToInt32(txtPhoneID.Text); 51 | //find the record 52 | found = APhone.Find(PhoneID); 53 | //if the record is found 54 | if (found == true) 55 | { 56 | //display the values of the record in the form 57 | txtPhoneName.Text = APhone.PhoneName; 58 | txtPhoneManufacturer.Text = APhone.PhoneManufacturer; 59 | txtBatteryCapacity.Text = APhone.BatteryCapacity; 60 | txtCameraQuality.Text = APhone.CameraQuality; 61 | txtStorageCapacity.Text = APhone.StorageCapacity; 62 | txtDisplaySize.Text = APhone.DisplaySize; 63 | //display a message saying the record was found 64 | lblInfo.Text = "Record was found!"; 65 | } 66 | else //if not 67 | { 68 | //display an error message saying the record was not found in the system 69 | lblError.Text = "Record was not found in the system"; 70 | } 71 | } 72 | 73 | protected void btnAdd_Click(object sender, EventArgs e) 74 | { 75 | if (PhoneID == -1) 76 | { 77 | //add the new record 78 | AddPhone(); 79 | //redirect to the main phone page 80 | Response.Redirect("PhoneMain.aspx"); 81 | } 82 | else //if not 83 | { 84 | //update the record 85 | UpdatePhone(); 86 | } 87 | } 88 | 89 | protected void btnCancel_Click(object sender, EventArgs e) //cancel button function 90 | { 91 | Response.Redirect("PhoneMain.aspx"); //sends user back to main page 92 | } 93 | 94 | void UpdatePhone() //update phone function 95 | { 96 | //create a new instance of the collection class 97 | clsPhoneCollection Phones = new clsPhoneCollection(); 98 | 99 | //validate the data in the form 100 | String Error = Phones.ThisPhone.Valid(txtPhoneName.Text, txtPhoneManufacturer.Text, txtBatteryCapacity.Text, txtCameraQuality.Text, txtStorageCapacity.Text, txtDisplaySize.Text, Convert.ToDateTime(txtDateReleased.Text)); 101 | //get the data entered by the user 102 | if (Error == "") 103 | { 104 | //find the record to update using the PK 105 | Phones.ThisPhone.Find(PhoneID); 106 | //get the data entered by the user 107 | Phones.ThisPhone.PhoneName = txtPhoneName.Text; 108 | Phones.ThisPhone.PhoneManufacturer = txtPhoneManufacturer.Text; 109 | Phones.ThisPhone.BatteryCapacity = txtBatteryCapacity.Text; 110 | Phones.ThisPhone.CameraQuality = txtCameraQuality.Text; 111 | Phones.ThisPhone.StorageCapacity = txtStorageCapacity.Text; 112 | Phones.ThisPhone.DisplaySize = txtDisplaySize.Text; 113 | Phones.ThisPhone.DateReleased = Convert.ToDateTime(txtDateReleased.Text); 114 | //update the record 115 | Phones.Update(); 116 | //redirect back to the main page 117 | Response.Redirect("PhoneMain.aspx"); 118 | } 119 | else //if not 120 | { 121 | //notify the user that errors have occurred 122 | lblError.Text = "The follwoing issues occurred..." + Error; 123 | } 124 | } 125 | 126 | void AddPhone() 127 | { 128 | //create a new instance of the collection class 129 | clsPhoneCollection Phones = new clsPhoneCollection(); 130 | 131 | //validate the data in the form 132 | String Error = Phones.ThisPhone.Valid(txtPhoneName.Text, txtPhoneManufacturer.Text, txtBatteryCapacity.Text, txtCameraQuality.Text, txtStorageCapacity.Text, txtDisplaySize.Text, Convert.ToDateTime(txtDateReleased.Text)); 133 | //if there are no errors 134 | if (Error == "") 135 | { 136 | 137 | 138 | //get the data entered by the user 139 | Phones.ThisPhone.PhoneName = txtPhoneName.Text; 140 | Phones.ThisPhone.PhoneManufacturer = txtPhoneManufacturer.Text; 141 | Phones.ThisPhone.BatteryCapacity = txtBatteryCapacity.Text; 142 | Phones.ThisPhone.CameraQuality = txtCameraQuality.Text; 143 | Phones.ThisPhone.StorageCapacity = txtStorageCapacity.Text; 144 | Phones.ThisPhone.DisplaySize = txtDisplaySize.Text; 145 | Phones.ThisPhone.DateReleased = Convert.ToDateTime(txtDateReleased.Text); 146 | //add the reocrd 147 | Phones.Add(); 148 | //redirect back to the main page 149 | Response.Redirect("PhoneMain.aspx"); 150 | } 151 | else //if not 152 | { 153 | //inform the user of the occurring errors 154 | lblError.Text = "The following issues occurred..." + Error; 155 | } 156 | } 157 | 158 | protected void lstPhones_SelectedIndexChanged(object sender, EventArgs e) 159 | { 160 | 161 | } 162 | } -------------------------------------------------------------------------------- /Phone Selling System/PSSFrontOffice/Stock/StockMain.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="StockMain.aspx.cs" Inherits="Stock_StockMain" %> 2 | <%--Written by Syed || P2652259 || No3Mc(https://github.com/No3Mc) 3 | Repository Link : https://github.com/No3Mc/PMAD-Phone-Selling-Store--%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 33 | 34 | 35 | <%--For quick copy paste StockName, WarehouseNo, Location, Quantity, Barcode--%> 36 | 37 | 38 | 39 | 40 | 41 | 42 | 44 | 45 | 46 | 47 | 52 | 57 | 58 | 59 | 60 | 61 | 66 | 67 | 68 | 69 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 88 | 95 | 96 | 99 | 100 |
  43 |
48 | 49 | 50 | 51 | 53 | 54 | 55 | 56 |
62 | 63 | 64 | 65 |
70 | 71 | 72 | 73 | 74 | 75 |
 
86 | Cancel 87 | 89 | 90 | 91 | 92 | 93 | 94 | 97 | 98 |
101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 |

212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 |

262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 |
287 | 288 | 289 | -------------------------------------------------------------------------------- /Phone Selling System/PhoneSystemTesting/Supplier/tstSupplierCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.VisualStudio.TestTools.UnitTesting; 7 | using PSSClasses; 8 | 9 | 10 | namespace PhoneSystemTesting 11 | { 12 | 13 | [TestClass] 14 | public class SupplierCollection 15 | { 16 | 17 | [TestMethod] 18 | public void InstanceOK() 19 | { 20 | //create an instance of the class we want to create 21 | clsSupplierCollection aSuppliers = new clsSupplierCollection(); 22 | //test to see that it exist; 23 | Assert.IsNotNull(aSuppliers); 24 | } 25 | 26 | [TestMethod] 27 | public void SupplierListOK() 28 | { 29 | //create an instance of the class we want to create 30 | clsSupplierCollection aSuppliers = new clsSupplierCollection(); 31 | //create some test data to assign to the property 32 | //in this case the data needs to be a list objects 33 | List TestList = new List(); 34 | //add an item to the list 35 | //create the item of test data 36 | clsSupplier TestItem = new clsSupplier(); 37 | //set its properties 38 | TestItem.SupplierID = 111; 39 | TestItem.Name = "John"; 40 | TestItem.Address = "Le4"; 41 | TestItem.MobileNo = "7777777"; 42 | TestItem.Email = "g@gmail.com"; 43 | TestItem.DOB = "01/01/2001"; 44 | //add the item to the test list 45 | TestList.Add(TestItem); 46 | aSuppliers.SupplierList = TestList; 47 | //test to see that the two values are the same 48 | Assert.AreEqual(aSuppliers.SupplierList, TestList); 49 | } 50 | 51 | [TestMethod] 52 | public void AddMethodOK() 53 | { 54 | //create an instance of the class we want to create 55 | clsSupplierCollection aSuppliers = new clsSupplierCollection(); 56 | 57 | //create the item of test data 58 | clsSupplier TestItem = new clsSupplier(); 59 | //var to store the primary key 60 | Int32 PrimaryKey = 0; 61 | //set its properties 62 | TestItem.SupplierID = 111; 63 | TestItem.Name = "John"; 64 | TestItem.Address = "Le4"; 65 | TestItem.MobileNo = "7777777"; 66 | TestItem.Email = "g@gmail.com"; 67 | TestItem.DOB = "01/01/2001"; 68 | //set ThisStock to the test data 69 | aSuppliers.ThisSupplier = TestItem; 70 | //add the record 71 | PrimaryKey = aSuppliers.Add(); 72 | //set the primary key of the test data 73 | TestItem.SupplierID = PrimaryKey; 74 | //find the record 75 | aSuppliers.ThisSupplier.Find(PrimaryKey); 76 | //test to see the two values are the same 77 | Assert.AreEqual(aSuppliers.ThisSupplier, TestItem); 78 | 79 | } 80 | 81 | 82 | 83 | [TestMethod] 84 | public void DelMethodOK() 85 | { 86 | //create an instance of the class we want to create 87 | clsSupplierCollection aSuppliers = new clsSupplierCollection(); 88 | 89 | //create the item of test data 90 | clsSupplier TestItem = new clsSupplier(); 91 | //var to store the primary key 92 | Int32 PrimaryKey = 0; 93 | //set its properties 94 | TestItem.SupplierID = 111; 95 | TestItem.Name = "John"; 96 | TestItem.Address = "Le4"; 97 | TestItem.MobileNo = "7777777"; 98 | TestItem.Email = "g@gmail.com"; 99 | TestItem.DOB = "01/01/2001"; 100 | //set ThisStock to the test data 101 | aSuppliers.ThisSupplier = TestItem; 102 | //add the record 103 | PrimaryKey = aSuppliers.Add(); 104 | //set the primary key of the test data 105 | TestItem.SupplierID = PrimaryKey; 106 | //find the record 107 | aSuppliers.ThisSupplier.Find(PrimaryKey); 108 | //test to see the two values are the same 109 | aSuppliers.Delete(); 110 | Assert.AreEqual(aSuppliers.ThisSupplier, TestItem); 111 | 112 | } 113 | 114 | 115 | [TestMethod] 116 | public void ListAndCountOK() 117 | { 118 | //create an instance of the class we want to create 119 | clsSupplierCollection aSuppliers = new clsSupplierCollection(); 120 | 121 | //create some test data to assign for the property 122 | //in this case the data need to be a list of objects 123 | List TestList = new List(); 124 | //add an item to the list 125 | //create the item of test data 126 | clsSupplier TestItem = new clsSupplier(); 127 | //set its properties 128 | TestItem.SupplierID = 111; 129 | TestItem.Name = "John"; 130 | TestItem.Address = "Le4"; 131 | TestItem.MobileNo = "7777777"; 132 | TestItem.Email = "g@gmail.com"; 133 | TestItem.DOB = "01/01/2001"; 134 | 135 | //add the item to the property 136 | TestList.Add(TestItem); 137 | //assign the data to the property 138 | aSuppliers.SupplierList = TestList; 139 | //test to see that two values are the same 140 | Assert.AreEqual(aSuppliers.Count, TestList.Count); 141 | } 142 | 143 | 144 | 145 | [TestMethod] 146 | public void UpdateMethodOK() 147 | { 148 | //create ab instance of teh class we want to create 149 | clsSupplierCollection aSuppliers = new clsSupplierCollection(); 150 | 151 | //create the item of test data 152 | clsSupplier TestItem = new clsSupplier(); 153 | //var to store the primary key 154 | Int32 PrimaryKey = 0; 155 | //set its properties 156 | TestItem.SupplierID = 111; 157 | TestItem.Name = "John"; 158 | TestItem.Address = "Le4"; 159 | TestItem.MobileNo = "7777777"; 160 | TestItem.Email = "g@gmail.com"; 161 | TestItem.DOB = "01/01/2001"; 162 | //set thisstock to the test data 163 | aSuppliers.ThisSupplier = TestItem; 164 | //add the record 165 | PrimaryKey = aSuppliers.Add(); 166 | //set the primary key of the test data 167 | TestItem.SupplierID = PrimaryKey; 168 | //modify the test data 169 | TestItem.SupplierID = 111; 170 | TestItem.Name = "John"; 171 | TestItem.Address = "Le4"; 172 | TestItem.MobileNo = "7777777"; 173 | TestItem.Email = "g@gmail.com"; 174 | TestItem.DOB = "01/01/2001"; 175 | //set the record based on the new test data 176 | Assert.AreEqual(aSuppliers.ThisSupplier, TestItem); 177 | } 178 | 179 | 180 | } 181 | } 182 | --------------------------------------------------------------------------------