├── .gitattributes ├── CafeShopManagementSystem ├── .vs │ └── CafeShopManagementSystem │ │ └── v16 │ │ └── .suo ├── CafeShopManagementSystem.sln └── CafeShopManagementSystem │ ├── AdminAddProducts.Designer.cs │ ├── AdminAddProducts.cs │ ├── AdminAddProducts.resx │ ├── AdminAddProductsData.cs │ ├── AdminAddUsers.Designer.cs │ ├── AdminAddUsers.cs │ ├── AdminAddUsers.resx │ ├── AdminAddUsersData.cs │ ├── AdminDashboardForm.Designer.cs │ ├── AdminDashboardForm.cs │ ├── AdminDashboardForm.resx │ ├── AdminMainForm.Designer.cs │ ├── AdminMainForm.cs │ ├── AdminMainForm.resx │ ├── App.config │ ├── Assets │ ├── cafeShop.jpg │ ├── icons8_Cafe_100px_6.png │ ├── icons8_Money_Bag_Bitcoin_90px.png │ ├── icons8_group_90px_1.png │ ├── icons8_money_90px.png │ └── icons8_user_filled_90px.png │ ├── CafeShopManagementSystem.csproj │ ├── CashierCustomersForm.Designer.cs │ ├── CashierCustomersForm.cs │ ├── CashierCustomersForm.resx │ ├── CashierMainForm.Designer.cs │ ├── CashierMainForm.cs │ ├── CashierMainForm.resx │ ├── CashierOrderForm.Designer.cs │ ├── CashierOrderForm.cs │ ├── CashierOrderForm.resx │ ├── CashierOrderFormProdData.cs │ ├── CashierOrdersData.cs │ ├── CustomersData.cs │ ├── Data.cs │ ├── Form1.Designer.cs │ ├── Form1.cs │ ├── Form1.resx │ ├── Product_Directory │ ├── PROD-1.jpg │ ├── PROD-2.jpg │ ├── PROD-3.jpg │ ├── PROD-4.jpg │ ├── PROD-5.jpg │ └── wqeqwe.jpg │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ ├── RegisterForm.Designer.cs │ ├── RegisterForm.cs │ ├── RegisterForm.resx │ ├── User_Directory │ ├── Testing.jpg │ ├── test2.jpg │ └── test3.jpg │ ├── bin │ └── Debug │ │ ├── CafeShopManagementSystem.exe │ │ ├── CafeShopManagementSystem.exe.config │ │ ├── CafeShopManagementSystem.pdb │ │ ├── User_Directory │ │ ├── Test.jpg │ │ └── test123.jpg │ │ └── source │ │ └── repos │ │ └── CafeShopManagementSystem │ │ └── CafeShopManagementSystem │ │ └── User_Directory │ │ ├── Test.jpg │ │ ├── admin1.jpg │ │ ├── test3.jpg │ │ └── testing.jpg │ └── obj │ └── Debug │ ├── .NETFramework,Version=v4.7.2.AssemblyAttributes.cs │ ├── CafeShopManagementSystem.AdminAddProducts.resources │ ├── CafeShopManagementSystem.AdminAddUsers.resources │ ├── CafeShopManagementSystem.AdminDashboardForm.resources │ ├── CafeShopManagementSystem.AdminMainForm.resources │ ├── CafeShopManagementSystem.CashierCustomersForm.resources │ ├── CafeShopManagementSystem.CashierMainForm.resources │ ├── CafeShopManagementSystem.CashierOrderForm.resources │ ├── CafeShopManagementSystem.Form1.resources │ ├── CafeShopManagementSystem.Properties.Resources.resources │ ├── CafeShopManagementSystem.RegisterForm.resources │ ├── CafeShopManagementSystem.csproj.AssemblyReference.cache │ ├── CafeShopManagementSystem.csproj.CoreCompileInputs.cache │ ├── CafeShopManagementSystem.csproj.FileListAbsolute.txt │ ├── CafeShopManagementSystem.csproj.GenerateResource.cache │ ├── CafeShopManagementSystem.exe │ ├── CafeShopManagementSystem.pdb │ ├── DesignTimeResolveAssemblyReferences.cache │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ └── TempPE │ └── Properties.Resources.Designer.cs.dll ├── README.md └── gitattributes /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/.vs/CafeShopManagementSystem/v16/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/.vs/CafeShopManagementSystem/v16/.suo -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.34031.81 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CafeShopManagementSystem", "CafeShopManagementSystem\CafeShopManagementSystem.csproj", "{CFCA91BE-E943-4BA0-8CE9-1546CF57E2F9}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {CFCA91BE-E943-4BA0-8CE9-1546CF57E2F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {CFCA91BE-E943-4BA0-8CE9-1546CF57E2F9}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {CFCA91BE-E943-4BA0-8CE9-1546CF57E2F9}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {CFCA91BE-E943-4BA0-8CE9-1546CF57E2F9}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {677DD54F-5E11-4C5D-A80A-EFAD9892041C} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/AdminAddProducts.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 | using System.Data; 11 | using System.Data.SqlClient; 12 | using System.IO; 13 | using System.Configuration; 14 | 15 | namespace CafeShopManagementSystem 16 | { 17 | public partial class AdminAddProducts : UserControl 18 | { 19 | static string conn = ConfigurationManager.ConnectionStrings["myDatabaseConnection"].ConnectionString; 20 | SqlConnection connect = new SqlConnection(conn); 21 | 22 | public AdminAddProducts() 23 | { 24 | InitializeComponent(); 25 | 26 | displayData(); 27 | } 28 | 29 | public void refreshData() 30 | { 31 | if (InvokeRequired) 32 | { 33 | Invoke((MethodInvoker)refreshData); 34 | return; 35 | } 36 | displayData(); 37 | } 38 | 39 | public bool emptyFields() 40 | { 41 | if(adminAddProducts_id.Text == "" || adminAddProducts_name.Text == "" 42 | || adminAddProducts_type.SelectedIndex == -1 || adminAddProducts_stock.Text == "" 43 | || adminAddProducts_price.Text == "" || adminAddProducts_status.SelectedIndex == -1) 44 | { 45 | return true; 46 | } 47 | else 48 | { 49 | return false; 50 | } 51 | } 52 | 53 | public void displayData() 54 | { 55 | AdminAddProductsData prodData = new AdminAddProductsData(); 56 | List listData = prodData.productsListData(); 57 | 58 | DataGridView1.DataSource = listData; 59 | } 60 | 61 | private void adminAddProducts_addBtn_Click(object sender, EventArgs e) 62 | { 63 | if (emptyFields()) 64 | { 65 | MessageBox.Show("All fields are required to be filled.", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 66 | } 67 | else 68 | { 69 | if(connect.State == ConnectionState.Closed) 70 | { 71 | try 72 | { 73 | connect.Open(); 74 | 75 | // CHECKING IF THE PRODUCT ID IS EXISTING ALREADY 76 | string selectProdID = "SELECT * FROM products WHERE prod_id = @prodID"; 77 | 78 | using (SqlCommand selectPID = new SqlCommand(selectProdID, connect)) 79 | { 80 | selectPID.Parameters.AddWithValue("@prodID", adminAddProducts_id.Text.Trim()); 81 | 82 | SqlDataAdapter adapter = new SqlDataAdapter(selectPID); 83 | DataTable table = new DataTable(); 84 | adapter.Fill(table); 85 | 86 | if(table.Rows.Count >= 1) 87 | { 88 | MessageBox.Show("Product ID: " + adminAddProducts_id.Text.Trim() + " is taken already", "Error Message" 89 | , MessageBoxButtons.OK, MessageBoxIcon.Error); 90 | } 91 | else 92 | { 93 | string insertData = "INSERT INTO products (prod_id, prod_name, prod_type, " + 94 | "prod_stock, prod_price, prod_status, prod_image, date_insert) VALUES(@prodID, @prodName" + 95 | ", @prodType, @prodStock, @prodPrice, @prodStatus, @prodImage, @dateInsert)"; 96 | 97 | DateTime today = DateTime.Today; 98 | 99 | string path = Path.Combine(@"C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\Product_Directory\" 100 | + adminAddProducts_id.Text.Trim() + ".jpg"); 101 | 102 | string directoryPath = Path.GetDirectoryName(path); 103 | 104 | if (!Directory.Exists(directoryPath)) 105 | { 106 | Directory.CreateDirectory(directoryPath); 107 | } 108 | 109 | File.Copy(adminAddProducts_imageView.ImageLocation, path, true); 110 | 111 | using (SqlCommand cmd = new SqlCommand(insertData, connect)) 112 | { 113 | cmd.Parameters.AddWithValue("@prodID", adminAddProducts_id.Text.Trim()); 114 | cmd.Parameters.AddWithValue("@prodName", adminAddProducts_name.Text.Trim()); 115 | cmd.Parameters.AddWithValue("@prodType", adminAddProducts_type.Text.Trim()); 116 | cmd.Parameters.AddWithValue("@prodStock", adminAddProducts_stock.Text.Trim()); 117 | cmd.Parameters.AddWithValue("@prodPrice", adminAddProducts_price.Text.Trim()); 118 | cmd.Parameters.AddWithValue("@prodStatus", adminAddProducts_status.Text.Trim()); 119 | cmd.Parameters.AddWithValue("@prodImage", path); 120 | cmd.Parameters.AddWithValue("@dateInsert", today); 121 | 122 | cmd.ExecuteNonQuery(); 123 | clearFields(); 124 | 125 | MessageBox.Show("Added successfully!", "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 126 | displayData(); 127 | } 128 | } 129 | } 130 | } 131 | catch (Exception ex) 132 | { 133 | MessageBox.Show("Failed connection: " + ex, "Error Message" 134 | , MessageBoxButtons.OK, MessageBoxIcon.Error); 135 | } 136 | finally 137 | { 138 | connect.Close(); 139 | } 140 | } 141 | 142 | } 143 | } 144 | 145 | private void adminAddProducts_importBtn_Click(object sender, EventArgs e) 146 | { 147 | try 148 | { 149 | OpenFileDialog dialog = new OpenFileDialog(); 150 | dialog.Filter = "Image Files (*.jpg; *.png)|*.jpg;*.png"; 151 | string imagePath = ""; 152 | 153 | if(dialog.ShowDialog() == DialogResult.OK) 154 | { 155 | imagePath = dialog.FileName; 156 | adminAddProducts_imageView.ImageLocation = imagePath; 157 | } 158 | 159 | }catch(Exception ex) 160 | { 161 | MessageBox.Show("Error: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 162 | } 163 | } 164 | 165 | public void clearFields() 166 | { 167 | adminAddProducts_id.Text = ""; 168 | adminAddProducts_name.Text = ""; 169 | adminAddProducts_type.SelectedIndex = -1; 170 | adminAddProducts_stock.Text = ""; 171 | adminAddProducts_price.Text = ""; 172 | adminAddProducts_status.SelectedIndex = -1; 173 | adminAddProducts_imageView.Image = null; 174 | 175 | } 176 | 177 | private void adminAddProducts_clearBtn_Click(object sender, EventArgs e) 178 | { 179 | clearFields(); 180 | } 181 | 182 | private void DataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) 183 | { 184 | 185 | if(e.RowIndex != -1) 186 | { 187 | DataGridViewRow row = DataGridView1.Rows[e.RowIndex]; 188 | adminAddProducts_id.Text = row.Cells[1].Value.ToString(); 189 | adminAddProducts_name.Text = row.Cells[2].Value.ToString(); 190 | adminAddProducts_type.Text = row.Cells[3].Value.ToString(); 191 | adminAddProducts_stock.Text = row.Cells[4].Value.ToString(); 192 | adminAddProducts_price.Text = row.Cells[5].Value.ToString(); 193 | adminAddProducts_status.Text = row.Cells[6].Value.ToString(); 194 | 195 | string imagepath = row.Cells[7].Value.ToString(); 196 | try 197 | { 198 | if (imagepath != null) 199 | { 200 | adminAddProducts_imageView.Image = Image.FromFile(imagepath); 201 | } 202 | else 203 | { 204 | adminAddProducts_imageView.Image = null; 205 | } 206 | } 207 | catch(Exception ex) 208 | { 209 | MessageBox.Show("Error Image: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 210 | } 211 | 212 | } 213 | } 214 | 215 | private void adminAddProducts_updateBtn_Click(object sender, EventArgs e) 216 | { 217 | if (emptyFields()) 218 | { 219 | MessageBox.Show("All fields are requried to be filled", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 220 | } 221 | else 222 | { 223 | DialogResult check = MessageBox.Show("Are you sure you want to Update Product ID: " + adminAddProducts_id.Text.Trim() + "?" 224 | , "Confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question); 225 | 226 | if(check == DialogResult.Yes) 227 | { 228 | if(connect.State != ConnectionState.Open) 229 | { 230 | try 231 | { 232 | connect.Open(); 233 | 234 | string updateData = "UPDATE products SET prod_name = @prodName" + 235 | ", prod_type = @prodType, prod_stock = @prodStock, prod_price = @prodPrice, prod_status = @prodStatus" + 236 | ", date_update = @dateUpdate WHERE prod_id = @prodID"; 237 | DateTime today = DateTime.Today; 238 | 239 | using (SqlCommand updateD = new SqlCommand(updateData, connect)) 240 | { 241 | updateD.Parameters.AddWithValue("@prodName", adminAddProducts_name.Text.Trim()); 242 | updateD.Parameters.AddWithValue("@prodType", adminAddProducts_type.Text.Trim()); 243 | updateD.Parameters.AddWithValue("@prodStock", adminAddProducts_stock.Text.Trim()); 244 | updateD.Parameters.AddWithValue("@prodPrice", adminAddProducts_price.Text.Trim()); 245 | updateD.Parameters.AddWithValue("@prodStatus", adminAddProducts_status.Text.Trim()); 246 | updateD.Parameters.AddWithValue("@dateUpdate", today); 247 | updateD.Parameters.AddWithValue("@prodID", adminAddProducts_id.Text.Trim()); 248 | 249 | updateD.ExecuteNonQuery(); 250 | clearFields(); 251 | 252 | MessageBox.Show("Updated successfully!", "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 253 | displayData(); 254 | 255 | } 256 | }catch(Exception ex) 257 | { 258 | MessageBox.Show("Connection failed: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 259 | } 260 | finally 261 | { 262 | connect.Close(); 263 | } 264 | } 265 | } 266 | } 267 | } 268 | 269 | private void adminAddProducts_deleteBtn_Click(object sender, EventArgs e) 270 | { 271 | if (emptyFields()) 272 | { 273 | MessageBox.Show("All fields are requried to be filled", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 274 | } 275 | else 276 | { 277 | DialogResult check = MessageBox.Show("Are you sure you want to Delete Product ID: " + adminAddProducts_id.Text.Trim() + "?" 278 | , "Confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question); 279 | 280 | if (check == DialogResult.Yes) 281 | { 282 | if (connect.State != ConnectionState.Open) 283 | { 284 | try 285 | { 286 | connect.Open(); 287 | 288 | string updateData = "UPDATE products SET date_delete = @dateDelete WHERE prod_id = @prodID"; 289 | DateTime today = DateTime.Today; 290 | 291 | using (SqlCommand updateD = new SqlCommand(updateData, connect)) 292 | { 293 | 294 | updateD.Parameters.AddWithValue("@dateDelete", today); 295 | updateD.Parameters.AddWithValue("@prodID", adminAddProducts_id.Text.Trim()); 296 | 297 | updateD.ExecuteNonQuery(); 298 | clearFields(); 299 | 300 | MessageBox.Show("Removed successfully!", "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 301 | displayData(); 302 | 303 | } 304 | } 305 | catch (Exception ex) 306 | { 307 | MessageBox.Show("Connection failed: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 308 | } 309 | finally 310 | { 311 | connect.Close(); 312 | } 313 | } 314 | } 315 | } 316 | } 317 | 318 | private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) 319 | { 320 | 321 | } 322 | } 323 | } 324 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/AdminAddProducts.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 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/AdminAddProductsData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Data; 7 | using System.Data.SqlClient; 8 | 9 | namespace CafeShopManagementSystem 10 | { 11 | class AdminAddProductsData 12 | { 13 | public int ID { set; get; } // 0 14 | public string ProductID { set; get; } // 1 15 | public string ProductName { set; get; } // 2 16 | public string Type { set; get; } // 3 17 | public string Stock { set; get; } // 4 18 | public string Price { set; get; } // 5 19 | public string Status { set; get; } // 6 20 | public string Image { set; get; } // 7 21 | public string DateInsert { set; get; } // 8 22 | public string DateUpdate { set; get; } // 9 23 | 24 | SqlConnection connect = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\USER\Documents\cafe.mdf;Integrated Security=True;Connect Timeout=30"); 25 | 26 | public List productsListData() 27 | { 28 | List listData = new List(); 29 | 30 | if(connect.State == ConnectionState.Closed) 31 | { 32 | try 33 | { 34 | connect.Open(); 35 | 36 | string selectData = "SELECT * FROM products WHERE date_delete IS NULL"; 37 | 38 | using(SqlCommand cmd = new SqlCommand(selectData, connect)) 39 | { 40 | SqlDataReader reader = cmd.ExecuteReader(); 41 | 42 | while (reader.Read()) 43 | { 44 | AdminAddProductsData apd = new AdminAddProductsData(); 45 | 46 | apd.ID = (int)reader["id"]; 47 | apd.ProductID = reader["prod_id"].ToString(); 48 | apd.ProductName = reader["prod_name"].ToString(); 49 | apd.Type = reader["prod_type"].ToString(); 50 | apd.Stock = reader["prod_stock"].ToString(); 51 | apd.Price = reader["prod_price"].ToString(); 52 | apd.Status = reader["prod_status"].ToString(); 53 | apd.Image = reader["prod_image"].ToString(); 54 | apd.DateInsert = reader["date_insert"].ToString(); 55 | apd.DateUpdate = reader["date_update"].ToString(); 56 | 57 | listData.Add(apd); 58 | } 59 | 60 | reader.Close(); 61 | } 62 | } 63 | catch(Exception ex) 64 | { 65 | Console.WriteLine("Failed connection: " + ex); 66 | } 67 | finally 68 | { 69 | connect.Close(); 70 | } 71 | } 72 | 73 | return listData; 74 | } 75 | 76 | public List availableProductsData() 77 | { 78 | List listData = new List(); 79 | 80 | if(connect.State == ConnectionState.Closed) 81 | { 82 | try 83 | { 84 | connect.Open(); 85 | 86 | string selectData = "SELECT * FROM products WHERE status = @stats"; 87 | 88 | using (SqlCommand cmd = new SqlCommand(selectData, connect)) 89 | { 90 | cmd.Parameters.AddWithValue("@stats", "Available"); 91 | 92 | SqlDataReader reader = cmd.ExecuteReader(); 93 | 94 | while (reader.Read()) 95 | { 96 | AdminAddProductsData apd = new AdminAddProductsData(); 97 | 98 | apd.ID = (int)reader["id"]; 99 | apd.ProductID = reader["prod_id"].ToString(); 100 | apd.ProductName = reader["prod_name"].ToString(); 101 | apd.Type = reader["prod_type"].ToString(); 102 | apd.Stock = reader["prod_stock"].ToString(); 103 | apd.Price = reader["prod_price"].ToString(); 104 | 105 | listData.Add(apd); 106 | } 107 | } 108 | } 109 | catch(Exception ex) 110 | { 111 | Console.WriteLine("Failed Connection: " + ex); 112 | } 113 | finally 114 | { 115 | connect.Close(); 116 | } 117 | } 118 | return listData; 119 | } 120 | 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/AdminAddUsers.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 | using System.Data; 11 | using System.Data.SqlClient; 12 | using System.IO; 13 | using System.Configuration; 14 | 15 | namespace CafeShopManagementSystem 16 | { 17 | public partial class AdminAddUsers : UserControl 18 | { 19 | static string conn = ConfigurationManager.ConnectionStrings["myDatabaseConnection"].ConnectionString; 20 | SqlConnection connect = new SqlConnection(conn); 21 | public AdminAddUsers() 22 | { 23 | InitializeComponent(); 24 | 25 | displayAddUsersData(); 26 | } 27 | 28 | public void refreshData() 29 | { 30 | if (InvokeRequired) 31 | { 32 | Invoke((MethodInvoker)refreshData); 33 | return; 34 | } 35 | displayAddUsersData(); 36 | } 37 | 38 | public void displayAddUsersData() 39 | { 40 | AdminAddUsersData usersData = new AdminAddUsersData(); 41 | List listData = usersData.usersListData(); 42 | 43 | dataGridView1.DataSource = listData; 44 | } 45 | 46 | private void label4_Click(object sender, EventArgs e) 47 | { 48 | 49 | } 50 | 51 | private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) 52 | { 53 | 54 | } 55 | 56 | public bool emptyFields() 57 | { 58 | if(adminAddUsers_username.Text == "" || adminAddUsers_password.Text == "" 59 | || adminAddUsers_role.Text == "" || adminAddUsers_status.Text == "" 60 | || adminAddUsers_imageView.Image == null) 61 | { 62 | return true; 63 | } 64 | else 65 | { 66 | return false; 67 | } 68 | } 69 | 70 | private void adminAddUsers_addBtn_Click(object sender, EventArgs e) 71 | { 72 | if (emptyFields()) 73 | { 74 | MessageBox.Show("All fields are required to be filled", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 75 | } 76 | else 77 | { 78 | if(connect.State == ConnectionState.Closed) 79 | { 80 | try 81 | { 82 | connect.Open(); 83 | 84 | // CHECK USERNAME IF EXISTING ALREADY 85 | string selectUsern = "SELECT * FROM users WHERE username = @usern"; 86 | 87 | using(SqlCommand checkUsern = new SqlCommand(selectUsern, connect)) 88 | { 89 | checkUsern.Parameters.AddWithValue("@usern", adminAddUsers_username.Text.Trim()); 90 | 91 | SqlDataAdapter adapter = new SqlDataAdapter(checkUsern); 92 | DataTable table = new DataTable(); 93 | adapter.Fill(table); 94 | 95 | if(table.Rows.Count >= 1) 96 | { 97 | string usern = adminAddUsers_username.Text.Substring(0,1).ToUpper() + adminAddUsers_username.Text.Substring(1); 98 | MessageBox.Show(usern + " is already taken", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 99 | } 100 | else 101 | { 102 | string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; 103 | 104 | string insertData = "INSERT INTO users (username, password, profile_image, role, status, date_reg) " + 105 | "VALUES(@usern, @pass, @image, @role, @status, @date)"; 106 | DateTime today = DateTime.Today; 107 | 108 | string relativePath = Path.Combine("User_Directory", adminAddUsers_username.Text.Trim() + ".jpg"); 109 | string path = Path.Combine(baseDirectory, relativePath); 110 | 111 | string directoryPath = Path.GetDirectoryName(path); 112 | 113 | if (!Directory.Exists(directoryPath)) 114 | { 115 | Directory.CreateDirectory(directoryPath); 116 | } 117 | 118 | File.Copy(adminAddUsers_imageView.ImageLocation, path, true); 119 | 120 | using(SqlCommand cmd = new SqlCommand(insertData, connect)) 121 | { 122 | cmd.Parameters.AddWithValue("@usern", adminAddUsers_username.Text.Trim()); 123 | cmd.Parameters.AddWithValue("@pass", adminAddUsers_password.Text.Trim()); 124 | cmd.Parameters.AddWithValue("@image", path); 125 | cmd.Parameters.AddWithValue("@role", adminAddUsers_role.Text.Trim()); 126 | cmd.Parameters.AddWithValue("@status", adminAddUsers_status.Text.Trim()); 127 | cmd.Parameters.AddWithValue("@date", today); 128 | 129 | cmd.ExecuteNonQuery(); 130 | clearFields(); 131 | 132 | MessageBox.Show("Added successfully!", "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 133 | 134 | displayAddUsersData(); 135 | } 136 | } 137 | } 138 | 139 | }catch(Exception ex) 140 | { 141 | MessageBox.Show("Connection failed: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 142 | } 143 | finally 144 | { 145 | connect.Close(); 146 | } 147 | } 148 | } 149 | } 150 | 151 | private void adminAddUsers_importBtn_Click(object sender, EventArgs e) 152 | { 153 | try 154 | { 155 | OpenFileDialog dialog = new OpenFileDialog(); 156 | dialog.Filter = "Image Files (*.jpg; *.png|*.jpg;*.png)"; 157 | string imagePath = ""; 158 | 159 | if(dialog.ShowDialog() == DialogResult.OK) 160 | { 161 | imagePath = dialog.FileName; 162 | adminAddUsers_imageView.ImageLocation = imagePath; 163 | } 164 | 165 | }catch(Exception ex) 166 | { 167 | MessageBox.Show("Error: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 168 | } 169 | } 170 | 171 | private int id = 0; 172 | 173 | private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) 174 | { 175 | 176 | 177 | DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; 178 | id = (int)row.Cells[0].Value; 179 | adminAddUsers_username.Text = row.Cells[1].Value.ToString(); 180 | adminAddUsers_password.Text = row.Cells[2].Value.ToString(); 181 | adminAddUsers_role.Text = row.Cells[3].Value.ToString(); 182 | adminAddUsers_status.Text = row.Cells[4].Value.ToString(); 183 | 184 | string imagePath = row.Cells[5].Value.ToString(); 185 | 186 | try 187 | { 188 | if (imagePath != null) 189 | { 190 | adminAddUsers_imageView.Image = Image.FromFile(imagePath); 191 | } 192 | else 193 | { 194 | adminAddUsers_imageView.Image = null; 195 | } 196 | } 197 | catch(Exception ex) 198 | { 199 | MessageBox.Show("No Image :3", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 200 | } 201 | 202 | } 203 | 204 | private void adminAddUsers_updateBtn_Click(object sender, EventArgs e) 205 | { 206 | if (emptyFields()) 207 | { 208 | MessageBox.Show("All fields are required to be filled.", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 209 | } 210 | else 211 | { 212 | DialogResult result = MessageBox.Show("Are you sure you want to Update Username: " + adminAddUsers_username.Text.Trim() + "?", "Confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question); 213 | 214 | if (result == DialogResult.Yes) 215 | { 216 | if (connect.State != ConnectionState.Open) 217 | { 218 | try 219 | { 220 | connect.Open(); 221 | 222 | string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; 223 | 224 | string updateData = "UPDATE users SET username = @usern, password = @pass, role = @role, status = @status, profile_image = @imagePath WHERE id = @id"; 225 | 226 | using (SqlCommand cmd = new SqlCommand(updateData, connect)) 227 | { 228 | cmd.Parameters.AddWithValue("@usern", adminAddUsers_username.Text.Trim()); 229 | cmd.Parameters.AddWithValue("@pass", adminAddUsers_password.Text.Trim()); 230 | cmd.Parameters.AddWithValue("@role", adminAddUsers_role.Text.Trim()); 231 | cmd.Parameters.AddWithValue("@status", adminAddUsers_status.Text.Trim()); 232 | cmd.Parameters.AddWithValue("@id", id); 233 | 234 | string relativePath = Path.Combine("User_Directory", adminAddUsers_username.Text.Trim() + ".jpg"); 235 | string path = Path.Combine(baseDirectory, relativePath); 236 | 237 | string directoryPath = Path.GetDirectoryName(path); 238 | 239 | if (!Directory.Exists(directoryPath)) 240 | { 241 | Directory.CreateDirectory(directoryPath); 242 | } 243 | 244 | File.Copy(adminAddUsers_imageView.ImageLocation, path, true); 245 | 246 | cmd.Parameters.AddWithValue("@imagePath", path); 247 | 248 | cmd.ExecuteNonQuery(); 249 | clearFields(); 250 | 251 | MessageBox.Show("Updated successfully!", "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 252 | 253 | displayAddUsersData(); 254 | } 255 | } 256 | catch (Exception ex) 257 | { 258 | MessageBox.Show("Connection failed: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 259 | } 260 | finally 261 | { 262 | connect.Close(); 263 | } 264 | } 265 | } 266 | } 267 | } 268 | 269 | public void clearFields() 270 | { 271 | adminAddUsers_username.Text = ""; 272 | adminAddUsers_password.Text = ""; 273 | adminAddUsers_role.SelectedIndex = -1; 274 | adminAddUsers_status.SelectedIndex = -1; 275 | adminAddUsers_imageView.Image = null; 276 | } 277 | 278 | private void adminAddUsers_clearBtn_Click(object sender, EventArgs e) 279 | { 280 | clearFields(); 281 | } 282 | 283 | private void adminAddUsers_deleteBtn_Click(object sender, EventArgs e) 284 | { 285 | if (emptyFields()) 286 | { 287 | MessageBox.Show("All fields are required to be filled.", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 288 | } 289 | else 290 | { 291 | DialogResult result = MessageBox.Show("Are you sure you want to Delete Username: " + adminAddUsers_username.Text.Trim() 292 | + "?", "Confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question); 293 | 294 | if (result == DialogResult.Yes) 295 | { 296 | if (connect.State != ConnectionState.Open) 297 | { 298 | try 299 | { 300 | connect.Open(); 301 | 302 | string deleteData = "DELETE FROM users WHERE id = @id"; 303 | 304 | using (SqlCommand cmd = new SqlCommand(deleteData, connect)) 305 | { 306 | cmd.Parameters.AddWithValue("@id", id); 307 | 308 | cmd.ExecuteNonQuery(); 309 | clearFields(); 310 | 311 | MessageBox.Show("Deleted successfully!", "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 312 | 313 | displayAddUsersData(); 314 | } 315 | } 316 | catch (Exception ex) 317 | { 318 | MessageBox.Show("Connection failed: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 319 | } 320 | finally 321 | { 322 | connect.Close(); 323 | } 324 | } 325 | } 326 | 327 | } 328 | } 329 | 330 | private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) 331 | { 332 | 333 | } 334 | } 335 | } 336 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/AdminAddUsers.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 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/AdminAddUsersData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Data; 7 | using System.Data.SqlClient; 8 | 9 | namespace CafeShopManagementSystem 10 | { 11 | class AdminAddUsersData 12 | { 13 | SqlConnection connect = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\USER\Documents\cafe.mdf;Integrated Security=True;Connect Timeout=30"); 14 | 15 | public int ID { set; get; } 16 | public string Username { set; get; } 17 | public string Password { set; get; } 18 | public string Role { set; get; } 19 | public string Status { set; get; } 20 | public string Image { set; get; } 21 | public string DateRegistered { set; get; } 22 | 23 | public List usersListData() 24 | { 25 | List listData = new List(); 26 | 27 | if(connect.State != ConnectionState.Open) 28 | { 29 | try 30 | { 31 | connect.Open(); 32 | 33 | string selectData = "SELECT * FROM users"; 34 | 35 | using (SqlCommand cmd = new SqlCommand(selectData, connect)) 36 | { 37 | 38 | SqlDataReader reader = cmd.ExecuteReader(); 39 | 40 | while (reader.Read()) 41 | { 42 | AdminAddUsersData userData = new AdminAddUsersData(); 43 | userData.ID = (int)reader["id"]; 44 | userData.Username = reader["username"].ToString(); 45 | userData.Password = reader["password"].ToString(); 46 | userData.Role = reader["role"].ToString(); 47 | userData.Status = reader["status"].ToString(); 48 | userData.Image = reader["profile_image"].ToString(); 49 | userData.DateRegistered = reader["date_reg"].ToString(); 50 | 51 | listData.Add(userData); 52 | } 53 | 54 | } 55 | }catch(Exception ex) 56 | { 57 | Console.WriteLine("Connection Failed: " + ex); 58 | } 59 | finally 60 | { 61 | connect.Close(); 62 | } 63 | } 64 | return listData; 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/AdminDashboardForm.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 | using System.Data.SqlClient; 11 | using System.Configuration; 12 | 13 | namespace CafeShopManagementSystem 14 | { 15 | public partial class AdminDashboardForm : UserControl 16 | { 17 | static string conn = ConfigurationManager.ConnectionStrings["myDatabaseConnection"].ConnectionString; 18 | SqlConnection connect = new SqlConnection(conn); 19 | 20 | public AdminDashboardForm() 21 | { 22 | InitializeComponent(); 23 | 24 | //displayTotalCashier(); 25 | //displayTotalCustomers(); 26 | //displayTotalIncome(); 27 | //displayTodaysIncome(); 28 | } 29 | 30 | //public void refreshData() 31 | //{ 32 | // if (InvokeRequired) 33 | // { 34 | // Invoke((MethodInvoker)refreshData); 35 | // return; 36 | // } 37 | // displayTotalCashier(); 38 | // displayTotalCustomers(); 39 | // displayTotalIncome(); 40 | // displayTodaysIncome(); 41 | //} 42 | 43 | public void displayTotalCashier() 44 | { 45 | if(connect.State == ConnectionState.Closed) 46 | { 47 | try 48 | { 49 | connect.Open(); 50 | 51 | string selectData = "SELECT COUNT(id) FROM users WHERE role = @role AND status = @status"; 52 | 53 | using(SqlCommand cmd = new SqlCommand(selectData, connect)) 54 | { 55 | cmd.Parameters.AddWithValue("@role", "Cashier"); 56 | cmd.Parameters.AddWithValue("@status", "Active"); 57 | 58 | SqlDataReader reader = cmd.ExecuteReader(); 59 | 60 | if (reader.Read()) 61 | { 62 | int count = Convert.ToInt32(reader[0]); 63 | dashboard_TC.Text = count.ToString(); 64 | } 65 | 66 | reader.Close(); 67 | } 68 | } 69 | catch(Exception ex) 70 | { 71 | MessageBox.Show("Failed connection: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 72 | } 73 | finally 74 | { 75 | connect.Close(); 76 | } 77 | } 78 | } 79 | 80 | public void displayTotalCustomers() 81 | { 82 | if (connect.State == ConnectionState.Closed) 83 | { 84 | try 85 | { 86 | connect.Open(); 87 | 88 | string selectData = "SELECT COUNT(id) FROM customers"; 89 | 90 | using (SqlCommand cmd = new SqlCommand(selectData, connect)) 91 | { 92 | 93 | SqlDataReader reader = cmd.ExecuteReader(); 94 | 95 | if (reader.Read()) 96 | { 97 | int count = Convert.ToInt32(reader[0]); 98 | dashboard_TCust.Text = count.ToString(); 99 | } 100 | 101 | reader.Close(); 102 | } 103 | } 104 | catch (Exception ex) 105 | { 106 | MessageBox.Show("Failed connection: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 107 | } 108 | finally 109 | { 110 | connect.Close(); 111 | } 112 | } 113 | } 114 | 115 | public void displayTodaysIncome() 116 | { 117 | if (connect.State == ConnectionState.Closed) 118 | { 119 | try 120 | { 121 | connect.Open(); 122 | 123 | string selectData = "SELECT sum(total_price) FROM customers WHERE DATE = @date"; 124 | 125 | using (SqlCommand cmd = new SqlCommand(selectData, connect)) 126 | { 127 | DateTime today = DateTime.Today; 128 | string getToday = today.ToString("yyyy-MM-dd"); 129 | 130 | cmd.Parameters.AddWithValue("@date", getToday); 131 | 132 | SqlDataReader reader = cmd.ExecuteReader(); 133 | 134 | if (reader.Read()) 135 | { 136 | object value = reader[0]; 137 | 138 | if (value != DBNull.Value) 139 | { 140 | float count = Convert.ToSingle(reader[0]); 141 | dashboard_TI.Text = "$" + count.ToString("0.00"); 142 | } 143 | } 144 | 145 | reader.Close(); 146 | } 147 | } 148 | catch (Exception ex) 149 | { 150 | MessageBox.Show("Failed connection: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 151 | } 152 | finally 153 | { 154 | connect.Close(); 155 | } 156 | } 157 | } 158 | 159 | public void displayTotalIncome() 160 | { 161 | if (connect.State == ConnectionState.Closed) 162 | { 163 | try 164 | { 165 | connect.Open(); 166 | 167 | string selectData = "SELECT SUM(total_price) FROM customers"; 168 | 169 | using (SqlCommand cmd = new SqlCommand(selectData, connect)) 170 | { 171 | 172 | SqlDataReader reader = cmd.ExecuteReader(); 173 | 174 | if (reader.Read()) 175 | { 176 | int count = Convert.ToInt32(reader[0]); 177 | dashboard_TIn.Text = "$" + count.ToString("0.00"); 178 | } 179 | 180 | reader.Close(); 181 | } 182 | } 183 | catch (Exception ex) 184 | { 185 | MessageBox.Show("Failed connection: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 186 | } 187 | finally 188 | { 189 | connect.Close(); 190 | } 191 | } 192 | } 193 | } 194 | 195 | } 196 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/AdminDashboardForm.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 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/AdminMainForm.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace CafeShopManagementSystem 3 | { 4 | partial class AdminMainForm 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.panel1 = new System.Windows.Forms.Panel(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.close = new System.Windows.Forms.Label(); 35 | this.panel2 = new System.Windows.Forms.Panel(); 36 | this.logout_btn = new System.Windows.Forms.Button(); 37 | this.button3 = new System.Windows.Forms.Button(); 38 | this.button4 = new System.Windows.Forms.Button(); 39 | this.button2 = new System.Windows.Forms.Button(); 40 | this.button1 = new System.Windows.Forms.Button(); 41 | this.label4 = new System.Windows.Forms.Label(); 42 | this.label3 = new System.Windows.Forms.Label(); 43 | this.label2 = new System.Windows.Forms.Label(); 44 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 45 | this.panel3 = new System.Windows.Forms.Panel(); 46 | this.cashierCustomersForm1 = new CafeShopManagementSystem.CashierCustomersForm(); 47 | this.adminAddProducts1 = new CafeShopManagementSystem.AdminAddProducts(); 48 | this.adminDashboardForm1 = new CafeShopManagementSystem.AdminDashboardForm(); 49 | this.adminAddUsers1 = new CafeShopManagementSystem.AdminAddUsers(); 50 | this.panel1.SuspendLayout(); 51 | this.panel2.SuspendLayout(); 52 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 53 | this.panel3.SuspendLayout(); 54 | this.SuspendLayout(); 55 | // 56 | // panel1 57 | // 58 | this.panel1.BackColor = System.Drawing.Color.White; 59 | this.panel1.Controls.Add(this.label1); 60 | this.panel1.Controls.Add(this.close); 61 | this.panel1.Dock = System.Windows.Forms.DockStyle.Top; 62 | this.panel1.Location = new System.Drawing.Point(0, 0); 63 | this.panel1.Name = "panel1"; 64 | this.panel1.Size = new System.Drawing.Size(1500, 45); 65 | this.panel1.TabIndex = 0; 66 | // 67 | // label1 68 | // 69 | this.label1.AutoSize = true; 70 | this.label1.Font = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 71 | this.label1.Location = new System.Drawing.Point(9, 15); 72 | this.label1.Name = "label1"; 73 | this.label1.Size = new System.Drawing.Size(237, 17); 74 | this.label1.TabIndex = 3; 75 | this.label1.Text = "Cafe Shop Management System"; 76 | // 77 | // close 78 | // 79 | this.close.AutoSize = true; 80 | this.close.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 81 | this.close.Location = new System.Drawing.Point(1474, 10); 82 | this.close.Name = "close"; 83 | this.close.Size = new System.Drawing.Size(18, 18); 84 | this.close.TabIndex = 2; 85 | this.close.Text = "X"; 86 | this.close.Click += new System.EventHandler(this.close_Click); 87 | // 88 | // panel2 89 | // 90 | this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 91 | this.panel2.Controls.Add(this.logout_btn); 92 | this.panel2.Controls.Add(this.button3); 93 | this.panel2.Controls.Add(this.button4); 94 | this.panel2.Controls.Add(this.button2); 95 | this.panel2.Controls.Add(this.button1); 96 | this.panel2.Controls.Add(this.label4); 97 | this.panel2.Controls.Add(this.label3); 98 | this.panel2.Controls.Add(this.label2); 99 | this.panel2.Controls.Add(this.pictureBox1); 100 | this.panel2.Dock = System.Windows.Forms.DockStyle.Left; 101 | this.panel2.Location = new System.Drawing.Point(0, 45); 102 | this.panel2.Name = "panel2"; 103 | this.panel2.Size = new System.Drawing.Size(249, 745); 104 | this.panel2.TabIndex = 1; 105 | // 106 | // logout_btn 107 | // 108 | this.logout_btn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 109 | this.logout_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 110 | this.logout_btn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 111 | this.logout_btn.ForeColor = System.Drawing.Color.White; 112 | this.logout_btn.Location = new System.Drawing.Point(12, 687); 113 | this.logout_btn.Name = "logout_btn"; 114 | this.logout_btn.Size = new System.Drawing.Size(224, 46); 115 | this.logout_btn.TabIndex = 17; 116 | this.logout_btn.Text = "Logout"; 117 | this.logout_btn.UseVisualStyleBackColor = false; 118 | this.logout_btn.Click += new System.EventHandler(this.logout_btn_Click); 119 | // 120 | // button3 121 | // 122 | this.button3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 123 | this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 124 | this.button3.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 125 | this.button3.ForeColor = System.Drawing.Color.White; 126 | this.button3.Location = new System.Drawing.Point(12, 442); 127 | this.button3.Name = "button3"; 128 | this.button3.Size = new System.Drawing.Size(224, 46); 129 | this.button3.TabIndex = 16; 130 | this.button3.Text = "Customers"; 131 | this.button3.UseVisualStyleBackColor = false; 132 | this.button3.Click += new System.EventHandler(this.button3_Click); 133 | // 134 | // button4 135 | // 136 | this.button4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 137 | this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 138 | this.button4.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 139 | this.button4.ForeColor = System.Drawing.Color.White; 140 | this.button4.Location = new System.Drawing.Point(12, 380); 141 | this.button4.Name = "button4"; 142 | this.button4.Size = new System.Drawing.Size(224, 46); 143 | this.button4.TabIndex = 15; 144 | this.button4.Text = "Add Products"; 145 | this.button4.UseVisualStyleBackColor = false; 146 | this.button4.Click += new System.EventHandler(this.button4_Click); 147 | // 148 | // button2 149 | // 150 | this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 151 | this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 152 | this.button2.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 153 | this.button2.ForeColor = System.Drawing.Color.White; 154 | this.button2.Location = new System.Drawing.Point(12, 318); 155 | this.button2.Name = "button2"; 156 | this.button2.Size = new System.Drawing.Size(224, 46); 157 | this.button2.TabIndex = 14; 158 | this.button2.Text = "Add Cashier"; 159 | this.button2.UseVisualStyleBackColor = false; 160 | this.button2.Click += new System.EventHandler(this.button2_Click); 161 | // 162 | // button1 163 | // 164 | this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 165 | this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 166 | this.button1.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 167 | this.button1.ForeColor = System.Drawing.Color.White; 168 | this.button1.Location = new System.Drawing.Point(12, 256); 169 | this.button1.Name = "button1"; 170 | this.button1.Size = new System.Drawing.Size(224, 46); 171 | this.button1.TabIndex = 13; 172 | this.button1.Text = "Dashboard"; 173 | this.button1.UseVisualStyleBackColor = false; 174 | this.button1.Click += new System.EventHandler(this.button1_Click); 175 | // 176 | // label4 177 | // 178 | this.label4.AutoSize = true; 179 | this.label4.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 180 | this.label4.ForeColor = System.Drawing.Color.White; 181 | this.label4.Location = new System.Drawing.Point(93, 194); 182 | this.label4.Name = "label4"; 183 | this.label4.Size = new System.Drawing.Size(48, 15); 184 | this.label4.TabIndex = 12; 185 | this.label4.Text = "Admin"; 186 | // 187 | // label3 188 | // 189 | this.label3.AutoSize = true; 190 | this.label3.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 191 | this.label3.ForeColor = System.Drawing.Color.White; 192 | this.label3.Location = new System.Drawing.Point(12, 194); 193 | this.label3.Name = "label3"; 194 | this.label3.Size = new System.Drawing.Size(78, 15); 195 | this.label3.TabIndex = 4; 196 | this.label3.Text = "Username:"; 197 | // 198 | // label2 199 | // 200 | this.label2.AutoSize = true; 201 | this.label2.Font = new System.Drawing.Font("Arial Rounded MT Bold", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 202 | this.label2.ForeColor = System.Drawing.Color.White; 203 | this.label2.Location = new System.Drawing.Point(48, 157); 204 | this.label2.Name = "label2"; 205 | this.label2.Size = new System.Drawing.Size(144, 22); 206 | this.label2.TabIndex = 4; 207 | this.label2.Text = "Admin\'s Portal"; 208 | // 209 | // pictureBox1 210 | // 211 | this.pictureBox1.Image = global::CafeShopManagementSystem.Properties.Resources.icons8_Cafe_100px_6; 212 | this.pictureBox1.Location = new System.Drawing.Point(71, 54); 213 | this.pictureBox1.Name = "pictureBox1"; 214 | this.pictureBox1.Size = new System.Drawing.Size(100, 100); 215 | this.pictureBox1.TabIndex = 11; 216 | this.pictureBox1.TabStop = false; 217 | // 218 | // panel3 219 | // 220 | this.panel3.Controls.Add(this.adminDashboardForm1); 221 | this.panel3.Controls.Add(this.adminAddUsers1); 222 | this.panel3.Controls.Add(this.adminAddProducts1); 223 | this.panel3.Controls.Add(this.cashierCustomersForm1); 224 | this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; 225 | this.panel3.Location = new System.Drawing.Point(249, 45); 226 | this.panel3.Name = "panel3"; 227 | this.panel3.Size = new System.Drawing.Size(1251, 745); 228 | this.panel3.TabIndex = 2; 229 | // 230 | // cashierCustomersForm1 231 | // 232 | this.cashierCustomersForm1.Location = new System.Drawing.Point(0, 0); 233 | this.cashierCustomersForm1.Name = "cashierCustomersForm1"; 234 | this.cashierCustomersForm1.Size = new System.Drawing.Size(1251, 745); 235 | this.cashierCustomersForm1.TabIndex = 0; 236 | // 237 | // adminAddProducts1 238 | // 239 | this.adminAddProducts1.Location = new System.Drawing.Point(0, 0); 240 | this.adminAddProducts1.Name = "adminAddProducts1"; 241 | this.adminAddProducts1.Size = new System.Drawing.Size(1251, 745); 242 | this.adminAddProducts1.TabIndex = 1; 243 | // 244 | // adminDashboardForm1 245 | // 246 | this.adminDashboardForm1.Location = new System.Drawing.Point(0, 0); 247 | this.adminDashboardForm1.Name = "adminDashboardForm1"; 248 | this.adminDashboardForm1.Size = new System.Drawing.Size(1251, 745); 249 | this.adminDashboardForm1.TabIndex = 3; 250 | // 251 | // adminAddUsers1 252 | // 253 | this.adminAddUsers1.Location = new System.Drawing.Point(0, 0); 254 | this.adminAddUsers1.Name = "adminAddUsers1"; 255 | this.adminAddUsers1.Size = new System.Drawing.Size(1251, 745); 256 | this.adminAddUsers1.TabIndex = 2; 257 | // 258 | // AdminMainForm 259 | // 260 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 261 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 262 | this.ClientSize = new System.Drawing.Size(1500, 790); 263 | this.Controls.Add(this.panel3); 264 | this.Controls.Add(this.panel2); 265 | this.Controls.Add(this.panel1); 266 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 267 | this.Name = "AdminMainForm"; 268 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 269 | this.Text = "AdminMainForm"; 270 | this.panel1.ResumeLayout(false); 271 | this.panel1.PerformLayout(); 272 | this.panel2.ResumeLayout(false); 273 | this.panel2.PerformLayout(); 274 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 275 | this.panel3.ResumeLayout(false); 276 | this.ResumeLayout(false); 277 | 278 | } 279 | 280 | #endregion 281 | 282 | private System.Windows.Forms.Panel panel1; 283 | private System.Windows.Forms.Panel panel2; 284 | private System.Windows.Forms.PictureBox pictureBox1; 285 | private System.Windows.Forms.Label close; 286 | private System.Windows.Forms.Label label1; 287 | private System.Windows.Forms.Label label2; 288 | private System.Windows.Forms.Label label4; 289 | private System.Windows.Forms.Label label3; 290 | private System.Windows.Forms.Button button3; 291 | private System.Windows.Forms.Button button4; 292 | private System.Windows.Forms.Button button2; 293 | private System.Windows.Forms.Button button1; 294 | private System.Windows.Forms.Button logout_btn; 295 | private System.Windows.Forms.Panel panel3; 296 | private AdminDashboardForm adminDashboardForm1; 297 | private AdminAddUsers adminAddUsers1; 298 | private AdminAddProducts adminAddProducts1; 299 | private CashierCustomersForm cashierCustomersForm1; 300 | } 301 | } -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/AdminMainForm.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 CafeShopManagementSystem 12 | { 13 | public partial class AdminMainForm : Form 14 | { 15 | public AdminMainForm() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | public void displayUsername() 21 | { 22 | } 23 | 24 | private void close_Click(object sender, EventArgs e) 25 | { 26 | DialogResult result = MessageBox.Show("Are you sure you want to exit?", "Confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question); 27 | 28 | if(result == DialogResult.Yes) 29 | { 30 | Application.Exit(); 31 | } 32 | } 33 | 34 | private void logout_btn_Click(object sender, EventArgs e) 35 | { 36 | DialogResult check = MessageBox.Show("Are you sure you want to Sign out?", "Confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question); 37 | 38 | if(check == DialogResult.Yes) 39 | { 40 | Form1 loginForm = new Form1(); 41 | loginForm.Show(); 42 | 43 | this.Hide(); 44 | } 45 | } 46 | 47 | private void button1_Click(object sender, EventArgs e) 48 | { 49 | //adminDashboardForm1.Visible = true; 50 | //adminAddUsers1.Visible = false; 51 | //adminAddProducts1.Visible = false; 52 | //cashierCustomersForm1.Visible = false; 53 | 54 | //AdminDashboardForm adForm = adminDashboardForm1 as AdminDashboardForm; 55 | 56 | //if(adForm != null) 57 | //{ 58 | // adForm.refreshData(); 59 | //} 60 | } 61 | 62 | private void button2_Click(object sender, EventArgs e) 63 | { 64 | adminDashboardForm1.Visible = false; 65 | adminAddUsers1.Visible = true; 66 | adminAddProducts1.Visible = false; 67 | cashierCustomersForm1.Visible = false; 68 | 69 | AdminAddUsers aaUsers = adminAddUsers1 as AdminAddUsers; 70 | 71 | if (aaUsers != null) 72 | { 73 | aaUsers.refreshData(); 74 | } 75 | } 76 | 77 | private void button4_Click(object sender, EventArgs e) 78 | { 79 | adminDashboardForm1.Visible = false; 80 | adminAddUsers1.Visible = false; 81 | adminAddProducts1.Visible = true; 82 | cashierCustomersForm1.Visible = false; 83 | 84 | AdminAddProducts aaProd = adminAddProducts1 as AdminAddProducts; 85 | 86 | if (aaProd != null) 87 | { 88 | aaProd.refreshData(); 89 | } 90 | } 91 | 92 | private void button3_Click(object sender, EventArgs e) 93 | { 94 | adminDashboardForm1.Visible = false; 95 | adminAddUsers1.Visible = false; 96 | adminAddProducts1.Visible = false; 97 | cashierCustomersForm1.Visible = true; 98 | 99 | CashierCustomersForm ccForm = cashierCustomersForm1 as CashierCustomersForm; 100 | 101 | if (ccForm != null) 102 | { 103 | ccForm.refreshData(); 104 | } 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/AdminMainForm.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 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Assets/cafeShop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Assets/cafeShop.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Assets/icons8_Cafe_100px_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Assets/icons8_Cafe_100px_6.png -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Assets/icons8_Money_Bag_Bitcoin_90px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Assets/icons8_Money_Bag_Bitcoin_90px.png -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Assets/icons8_group_90px_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Assets/icons8_group_90px_1.png -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Assets/icons8_money_90px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Assets/icons8_money_90px.png -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Assets/icons8_user_filled_90px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Assets/icons8_user_filled_90px.png -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/CafeShopManagementSystem.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {CFCA91BE-E943-4BA0-8CE9-1546CF57E2F9} 8 | WinExe 9 | CafeShopManagementSystem 10 | CafeShopManagementSystem 11 | v4.7.2 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | UserControl 52 | 53 | 54 | AdminAddProducts.cs 55 | 56 | 57 | 58 | UserControl 59 | 60 | 61 | AdminAddUsers.cs 62 | 63 | 64 | 65 | UserControl 66 | 67 | 68 | AdminDashboardForm.cs 69 | 70 | 71 | Form 72 | 73 | 74 | AdminMainForm.cs 75 | 76 | 77 | UserControl 78 | 79 | 80 | CashierCustomersForm.cs 81 | 82 | 83 | Form 84 | 85 | 86 | CashierMainForm.cs 87 | 88 | 89 | UserControl 90 | 91 | 92 | CashierOrderForm.cs 93 | 94 | 95 | 96 | 97 | 98 | Form 99 | 100 | 101 | Form1.cs 102 | 103 | 104 | 105 | 106 | Form 107 | 108 | 109 | RegisterForm.cs 110 | 111 | 112 | AdminAddProducts.cs 113 | 114 | 115 | AdminAddUsers.cs 116 | 117 | 118 | AdminDashboardForm.cs 119 | 120 | 121 | AdminMainForm.cs 122 | 123 | 124 | CashierCustomersForm.cs 125 | 126 | 127 | CashierMainForm.cs 128 | 129 | 130 | CashierOrderForm.cs 131 | 132 | 133 | Form1.cs 134 | 135 | 136 | ResXFileCodeGenerator 137 | Resources.Designer.cs 138 | Designer 139 | 140 | 141 | True 142 | Resources.resx 143 | True 144 | 145 | 146 | RegisterForm.cs 147 | 148 | 149 | SettingsSingleFileGenerator 150 | Settings.Designer.cs 151 | 152 | 153 | True 154 | Settings.settings 155 | True 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/CashierCustomersForm.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace CafeShopManagementSystem 3 | { 4 | partial class CashierCustomersForm 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 Component 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 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); 33 | this.panel1 = new System.Windows.Forms.Panel(); 34 | this.label1 = new System.Windows.Forms.Label(); 35 | this.datagridview1 = new System.Windows.Forms.DataGridView(); 36 | this.panel1.SuspendLayout(); 37 | ((System.ComponentModel.ISupportInitialize)(this.datagridview1)).BeginInit(); 38 | this.SuspendLayout(); 39 | // 40 | // panel1 41 | // 42 | this.panel1.BackColor = System.Drawing.Color.White; 43 | this.panel1.Controls.Add(this.label1); 44 | this.panel1.Controls.Add(this.datagridview1); 45 | this.panel1.Location = new System.Drawing.Point(16, 18); 46 | this.panel1.Name = "panel1"; 47 | this.panel1.Size = new System.Drawing.Size(1216, 698); 48 | this.panel1.TabIndex = 1; 49 | // 50 | // label1 51 | // 52 | this.label1.AutoSize = true; 53 | this.label1.Font = new System.Drawing.Font("Arial Rounded MT Bold", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 54 | this.label1.Location = new System.Drawing.Point(12, 21); 55 | this.label1.Name = "label1"; 56 | this.label1.Size = new System.Drawing.Size(138, 22); 57 | this.label1.TabIndex = 3; 58 | this.label1.Text = "All Customers"; 59 | // 60 | // datagridview1 61 | // 62 | this.datagridview1.AllowUserToAddRows = false; 63 | this.datagridview1.AllowUserToDeleteRows = false; 64 | this.datagridview1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; 65 | this.datagridview1.BorderStyle = System.Windows.Forms.BorderStyle.None; 66 | dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; 67 | dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 68 | dataGridViewCellStyle1.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 69 | dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White; 70 | dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; 71 | dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; 72 | dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; 73 | this.datagridview1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; 74 | this.datagridview1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 75 | this.datagridview1.EnableHeadersVisualStyles = false; 76 | this.datagridview1.Location = new System.Drawing.Point(16, 59); 77 | this.datagridview1.Name = "datagridview1"; 78 | this.datagridview1.ReadOnly = true; 79 | this.datagridview1.RowHeadersVisible = false; 80 | this.datagridview1.Size = new System.Drawing.Size(1183, 620); 81 | this.datagridview1.TabIndex = 2; 82 | // 83 | // CashierCustomersForm 84 | // 85 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 86 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 87 | this.Controls.Add(this.panel1); 88 | this.Name = "CashierCustomersForm"; 89 | this.Size = new System.Drawing.Size(1251, 745); 90 | this.panel1.ResumeLayout(false); 91 | this.panel1.PerformLayout(); 92 | ((System.ComponentModel.ISupportInitialize)(this.datagridview1)).EndInit(); 93 | this.ResumeLayout(false); 94 | 95 | } 96 | 97 | #endregion 98 | 99 | private System.Windows.Forms.Panel panel1; 100 | private System.Windows.Forms.Label label1; 101 | private System.Windows.Forms.DataGridView datagridview1; 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/CashierCustomersForm.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 | using System.Configuration; 11 | 12 | namespace CafeShopManagementSystem 13 | { 14 | public partial class CashierCustomersForm : UserControl 15 | { 16 | public CashierCustomersForm() 17 | { 18 | InitializeComponent(); 19 | 20 | displayCustomersData(); 21 | } 22 | 23 | public void refreshData() 24 | { 25 | if (InvokeRequired) 26 | { 27 | Invoke((MethodInvoker)refreshData); 28 | return; 29 | } 30 | displayCustomersData(); 31 | } 32 | 33 | public void displayCustomersData() 34 | { 35 | CustomersData cData = new CustomersData(); 36 | 37 | List listData = cData.allCustomersData(); 38 | 39 | datagridview1.DataSource = listData; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/CashierCustomersForm.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 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/CashierMainForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace CafeShopManagementSystem 5 | { 6 | public partial class CashierMainForm : Form 7 | { 8 | public CashierMainForm() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | private void close_Click(object sender, EventArgs e) 14 | { 15 | DialogResult check = MessageBox.Show("Are you sure you want to exit?", "Confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question); 16 | 17 | if (check == DialogResult.Yes) 18 | { 19 | Application.Exit(); 20 | } 21 | } 22 | 23 | private void logout_btn_Click(object sender, EventArgs e) 24 | { 25 | DialogResult check = MessageBox.Show("Are you sure you want to sign out?" 26 | , "Confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question); 27 | 28 | if (check == DialogResult.Yes) 29 | { 30 | Form1 loginForm = new Form1(); 31 | loginForm.Show(); 32 | 33 | this.Hide(); 34 | } 35 | } 36 | 37 | private void cashierOrderForm1_Load(object sender, EventArgs e) 38 | { 39 | 40 | } 41 | 42 | private void addProducts_btn_Click(object sender, EventArgs e) 43 | { 44 | adminDashboardForm1.Visible = false; 45 | adminAddProducts1.Visible = true; 46 | cashierOrderForm1.Visible = false; 47 | cashierCustomersForm1.Visible = false; 48 | 49 | AdminAddProducts aaProd = adminAddProducts1 as AdminAddProducts; 50 | 51 | if (aaProd != null) 52 | { 53 | aaProd.refreshData(); 54 | } 55 | } 56 | 57 | private void dashboard_btn_Click(object sender, EventArgs e) 58 | { 59 | //adminDashboardForm1.Visible = true; 60 | //adminAddProducts1.Visible = false; 61 | //cashierOrderForm1.Visible = false; 62 | //cashierCustomersForm1.Visible = false; 63 | 64 | //AdminDashboardForm adForm = adminDashboardForm1 as AdminDashboardForm; 65 | 66 | //if (adForm != null) 67 | //{ 68 | // adForm.refreshData(); 69 | //} 70 | } 71 | 72 | private void order_btn_Click(object sender, EventArgs e) 73 | { 74 | adminDashboardForm1.Visible = false; 75 | adminAddProducts1.Visible = false; 76 | cashierOrderForm1.Visible = true; 77 | cashierCustomersForm1.Visible = false; 78 | 79 | CashierOrderForm coForm = cashierOrderForm1 as CashierOrderForm; 80 | 81 | if (coForm != null) 82 | { 83 | coForm.refreshData(); 84 | } 85 | } 86 | 87 | private void customer_btn_Click(object sender, EventArgs e) 88 | { 89 | adminDashboardForm1.Visible = false; 90 | adminAddProducts1.Visible = false; 91 | cashierOrderForm1.Visible = false; 92 | cashierCustomersForm1.Visible = true; 93 | 94 | CashierCustomersForm ccForm = cashierCustomersForm1 as CashierCustomersForm; 95 | 96 | if (ccForm != null) 97 | { 98 | ccForm.refreshData(); 99 | } 100 | } 101 | } 102 | } 103 | 104 | 105 | // THATS IT FOR THIS VIDEO, THANKS FOR WATCHING !! 106 | // HOPE YOU ENJOY THIS VIDEO TUTORIAL 107 | // SUBSCRIBE OUR CHANNEL FOR MORE COOL PROJECT TUTORIALS : ) 108 | // THANK YOU !! -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/CashierMainForm.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 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/CashierOrderFormProdData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Data; 7 | using System.Data.SqlClient; 8 | 9 | namespace CafeShopManagementSystem 10 | { 11 | class CashierOrderFormProdData 12 | { 13 | public int ID { set; get; } // 0 14 | public string ProductID { set; get; } // 1 15 | public string ProductName { set; get; } // 2 16 | public string Type { set; get; } // 3 17 | public string Stock { set; get; } // 4 18 | public string Price { set; get; } // 5 19 | public string Status { set; get; } // 6 20 | 21 | SqlConnection connect = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\USER\Documents\cafe.mdf;Integrated Security=True;Connect Timeout=30"); 22 | 23 | public List availableProductsData() 24 | { 25 | List listData = new List(); 26 | 27 | if (connect.State == ConnectionState.Closed) 28 | { 29 | try 30 | { 31 | connect.Open(); 32 | 33 | string selectData = "SELECT * FROM products WHERE prod_status = @stats AND date_delete IS NULL"; 34 | 35 | using (SqlCommand cmd = new SqlCommand(selectData, connect)) 36 | { 37 | cmd.Parameters.AddWithValue("@stats", "Available"); 38 | 39 | SqlDataReader reader = cmd.ExecuteReader(); 40 | 41 | while (reader.Read()) 42 | { 43 | CashierOrderFormProdData apd = new CashierOrderFormProdData(); 44 | 45 | apd.ID = (int)reader["id"]; 46 | apd.ProductID = reader["prod_id"].ToString(); 47 | apd.ProductName = reader["prod_name"].ToString(); 48 | apd.Type = reader["prod_type"].ToString(); 49 | apd.Stock = reader["prod_stock"].ToString(); 50 | apd.Price = reader["prod_price"].ToString(); 51 | apd.Status = reader["prod_status"].ToString(); 52 | 53 | listData.Add(apd); 54 | } 55 | } 56 | } 57 | catch (Exception ex) 58 | { 59 | Console.WriteLine("Failed Connection: " + ex); 60 | } 61 | finally 62 | { 63 | connect.Close(); 64 | } 65 | } 66 | return listData; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/CashierOrdersData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data; 4 | using System.Data.SqlClient; 5 | 6 | namespace CafeShopManagementSystem 7 | { 8 | class CashierOrdersData 9 | { 10 | SqlConnection connect = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\USER\Documents\cafe.mdf;Integrated Security=True;Connect Timeout=30"); 11 | 12 | public int ID { set; get; } 13 | public int CID { set; get; } 14 | public string ProdID { set; get; } 15 | public string ProdName { set; get; } 16 | public string ProdType { set; get; } 17 | public int Qty { set; get; } 18 | public string Price { set; get; } 19 | 20 | public List ordersListData() 21 | { 22 | List listData = new List(); 23 | if (connect.State == ConnectionState.Closed) 24 | { 25 | try 26 | { 27 | connect.Open(); 28 | int custID = 0; 29 | string selectCustData = "SELECT MAX(customer_id) FROM orders"; 30 | 31 | using (SqlCommand getCustData = new SqlCommand(selectCustData, connect)) 32 | { 33 | object result = getCustData.ExecuteScalar(); 34 | 35 | if (result != DBNull.Value) 36 | { 37 | int temp = Convert.ToInt32(result); 38 | 39 | if (temp == 0) 40 | { 41 | custID = 1; 42 | } 43 | else 44 | { 45 | custID = temp; 46 | } 47 | } 48 | else 49 | { 50 | Console.WriteLine("Error ID"); 51 | } 52 | } 53 | 54 | string selectOrders = "SELECT * FROM orders WHERE customer_id = @customerID"; 55 | 56 | using(SqlCommand cmd = new SqlCommand(selectOrders, connect)) 57 | { 58 | cmd.Parameters.AddWithValue("@customerID", custID); 59 | 60 | SqlDataReader reader = cmd.ExecuteReader(); 61 | 62 | while (reader.Read()) 63 | { 64 | CashierOrdersData coData = new CashierOrdersData(); 65 | 66 | coData.ID = (int)reader["id"]; 67 | coData.CID = (int)reader["customer_id"]; 68 | coData.ProdID = reader["prod_id"].ToString(); 69 | coData.ProdName = reader["prod_name"].ToString(); 70 | coData.ProdType = reader["prod_type"].ToString(); 71 | coData.Qty = (int)reader["qty"]; 72 | coData.Price = reader["prod_price"].ToString(); 73 | 74 | listData.Add(coData); 75 | } 76 | } 77 | } 78 | catch (Exception ex) 79 | { 80 | Console.WriteLine("Connection failed: " + ex); 81 | } 82 | finally 83 | { 84 | connect.Close(); 85 | } 86 | } 87 | return listData; 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/CustomersData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Data; 7 | using System.Data.SqlClient; 8 | 9 | namespace CafeShopManagementSystem 10 | { 11 | class CustomersData 12 | { 13 | SqlConnection connect = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\USER\Documents\cafe.mdf;Integrated Security=True;Connect Timeout=30"); 14 | 15 | public int CustomerID { set; get; } 16 | public string TotalPrice { set; get; } 17 | public string Amount { set; get; } 18 | public string Change { set; get; } 19 | public string Date { set; get; } 20 | 21 | public List allCustomersData() 22 | { 23 | List listData = new List(); 24 | 25 | if(connect.State == ConnectionState.Closed) 26 | { 27 | try 28 | { 29 | connect.Open(); 30 | 31 | string selectData = "SELECT * FROM customers"; 32 | 33 | using (SqlCommand cmd = new SqlCommand(selectData, connect)) 34 | { 35 | SqlDataReader reader = cmd.ExecuteReader(); 36 | 37 | while (reader.Read()) 38 | { 39 | CustomersData cData = new CustomersData(); 40 | 41 | cData.CustomerID = (int)reader["customer_id"]; 42 | cData.TotalPrice = reader["total_price"].ToString(); 43 | cData.Amount = reader["amount"].ToString(); 44 | cData.Change = reader["change"].ToString(); 45 | cData.Date = reader["date"].ToString(); 46 | 47 | listData.Add(cData); 48 | } 49 | } 50 | } 51 | catch(Exception ex) 52 | { 53 | Console.WriteLine("Failed connection: " + ex); 54 | } 55 | finally 56 | { 57 | connect.Close(); 58 | } 59 | } 60 | 61 | return listData; 62 | } 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Data.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 CafeShopManagementSystem 8 | { 9 | class Data 10 | { 11 | public static string username; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace CafeShopManagementSystem 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.panel1 = new System.Windows.Forms.Panel(); 33 | this.label6 = new System.Windows.Forms.Label(); 34 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 35 | this.label5 = new System.Windows.Forms.Label(); 36 | this.login_registerBtn = new System.Windows.Forms.Button(); 37 | this.close = new System.Windows.Forms.Label(); 38 | this.label2 = new System.Windows.Forms.Label(); 39 | this.label3 = new System.Windows.Forms.Label(); 40 | this.login_username = new System.Windows.Forms.TextBox(); 41 | this.login_password = new System.Windows.Forms.TextBox(); 42 | this.label4 = new System.Windows.Forms.Label(); 43 | this.login_showPass = new System.Windows.Forms.CheckBox(); 44 | this.login_btn = new System.Windows.Forms.Button(); 45 | this.panel1.SuspendLayout(); 46 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 47 | this.SuspendLayout(); 48 | // 49 | // panel1 50 | // 51 | this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 52 | this.panel1.Controls.Add(this.label6); 53 | this.panel1.Controls.Add(this.pictureBox1); 54 | this.panel1.Controls.Add(this.label5); 55 | this.panel1.Controls.Add(this.login_registerBtn); 56 | this.panel1.Dock = System.Windows.Forms.DockStyle.Left; 57 | this.panel1.Location = new System.Drawing.Point(0, 0); 58 | this.panel1.Name = "panel1"; 59 | this.panel1.Size = new System.Drawing.Size(337, 484); 60 | this.panel1.TabIndex = 0; 61 | // 62 | // label6 63 | // 64 | this.label6.AutoSize = true; 65 | this.label6.Font = new System.Drawing.Font("Arial Rounded MT Bold", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 66 | this.label6.ForeColor = System.Drawing.Color.White; 67 | this.label6.Location = new System.Drawing.Point(15, 191); 68 | this.label6.Name = "label6"; 69 | this.label6.Size = new System.Drawing.Size(300, 22); 70 | this.label6.TabIndex = 9; 71 | this.label6.Text = "Cafe Shop Management System"; 72 | // 73 | // pictureBox1 74 | // 75 | this.pictureBox1.Image = global::CafeShopManagementSystem.Properties.Resources.icons8_Cafe_100px_6; 76 | this.pictureBox1.Location = new System.Drawing.Point(108, 84); 77 | this.pictureBox1.Name = "pictureBox1"; 78 | this.pictureBox1.Size = new System.Drawing.Size(100, 100); 79 | this.pictureBox1.TabIndex = 10; 80 | this.pictureBox1.TabStop = false; 81 | // 82 | // label5 83 | // 84 | this.label5.AutoSize = true; 85 | this.label5.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 86 | this.label5.ForeColor = System.Drawing.Color.White; 87 | this.label5.Location = new System.Drawing.Point(87, 397); 88 | this.label5.Name = "label5"; 89 | this.label5.Size = new System.Drawing.Size(159, 18); 90 | this.label5.TabIndex = 9; 91 | this.label5.Text = "Create an Account"; 92 | // 93 | // login_registerBtn 94 | // 95 | this.login_registerBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 96 | this.login_registerBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 97 | this.login_registerBtn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 98 | this.login_registerBtn.ForeColor = System.Drawing.Color.White; 99 | this.login_registerBtn.Location = new System.Drawing.Point(28, 423); 100 | this.login_registerBtn.Name = "login_registerBtn"; 101 | this.login_registerBtn.Size = new System.Drawing.Size(270, 37); 102 | this.login_registerBtn.TabIndex = 9; 103 | this.login_registerBtn.Text = "REGISTER"; 104 | this.login_registerBtn.UseVisualStyleBackColor = false; 105 | this.login_registerBtn.Click += new System.EventHandler(this.login_registerBtn_Click); 106 | // 107 | // close 108 | // 109 | this.close.AutoSize = true; 110 | this.close.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 111 | this.close.Location = new System.Drawing.Point(661, 10); 112 | this.close.Name = "close"; 113 | this.close.Size = new System.Drawing.Size(18, 18); 114 | this.close.TabIndex = 1; 115 | this.close.Text = "X"; 116 | this.close.Click += new System.EventHandler(this.close_Click); 117 | // 118 | // label2 119 | // 120 | this.label2.AutoSize = true; 121 | this.label2.Font = new System.Drawing.Font("Arial Rounded MT Bold", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 122 | this.label2.Location = new System.Drawing.Point(370, 96); 123 | this.label2.Name = "label2"; 124 | this.label2.Size = new System.Drawing.Size(83, 22); 125 | this.label2.TabIndex = 2; 126 | this.label2.Text = "SIGN IN"; 127 | // 128 | // label3 129 | // 130 | this.label3.AutoSize = true; 131 | this.label3.Font = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 132 | this.label3.Location = new System.Drawing.Point(370, 153); 133 | this.label3.Name = "label3"; 134 | this.label3.Size = new System.Drawing.Size(88, 17); 135 | this.label3.TabIndex = 3; 136 | this.label3.Text = "Username:"; 137 | // 138 | // login_username 139 | // 140 | this.login_username.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 141 | this.login_username.Location = new System.Drawing.Point(373, 174); 142 | this.login_username.Name = "login_username"; 143 | this.login_username.Size = new System.Drawing.Size(275, 26); 144 | this.login_username.TabIndex = 4; 145 | // 146 | // login_password 147 | // 148 | this.login_password.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 149 | this.login_password.Location = new System.Drawing.Point(374, 235); 150 | this.login_password.Name = "login_password"; 151 | this.login_password.PasswordChar = '*'; 152 | this.login_password.Size = new System.Drawing.Size(275, 26); 153 | this.login_password.TabIndex = 6; 154 | // 155 | // label4 156 | // 157 | this.label4.AutoSize = true; 158 | this.label4.Font = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 159 | this.label4.Location = new System.Drawing.Point(371, 214); 160 | this.label4.Name = "label4"; 161 | this.label4.Size = new System.Drawing.Size(85, 17); 162 | this.label4.TabIndex = 5; 163 | this.label4.Text = "Password:"; 164 | // 165 | // login_showPass 166 | // 167 | this.login_showPass.AutoSize = true; 168 | this.login_showPass.Font = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 169 | this.login_showPass.Location = new System.Drawing.Point(373, 268); 170 | this.login_showPass.Name = "login_showPass"; 171 | this.login_showPass.Size = new System.Drawing.Size(143, 21); 172 | this.login_showPass.TabIndex = 7; 173 | this.login_showPass.Text = "Show Password"; 174 | this.login_showPass.UseVisualStyleBackColor = true; 175 | this.login_showPass.CheckedChanged += new System.EventHandler(this.login_showPass_CheckedChanged); 176 | // 177 | // login_btn 178 | // 179 | this.login_btn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 180 | this.login_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 181 | this.login_btn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 182 | this.login_btn.ForeColor = System.Drawing.Color.White; 183 | this.login_btn.Location = new System.Drawing.Point(374, 317); 184 | this.login_btn.Name = "login_btn"; 185 | this.login_btn.Size = new System.Drawing.Size(115, 37); 186 | this.login_btn.TabIndex = 8; 187 | this.login_btn.Text = "LOGIN"; 188 | this.login_btn.UseVisualStyleBackColor = false; 189 | this.login_btn.Click += new System.EventHandler(this.login_btn_Click); 190 | // 191 | // Form1 192 | // 193 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 194 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 195 | this.BackColor = System.Drawing.Color.White; 196 | this.ClientSize = new System.Drawing.Size(685, 484); 197 | this.Controls.Add(this.login_btn); 198 | this.Controls.Add(this.login_showPass); 199 | this.Controls.Add(this.login_password); 200 | this.Controls.Add(this.label4); 201 | this.Controls.Add(this.login_username); 202 | this.Controls.Add(this.label3); 203 | this.Controls.Add(this.label2); 204 | this.Controls.Add(this.close); 205 | this.Controls.Add(this.panel1); 206 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 207 | this.Name = "Form1"; 208 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 209 | this.Text = "Form1"; 210 | this.panel1.ResumeLayout(false); 211 | this.panel1.PerformLayout(); 212 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 213 | this.ResumeLayout(false); 214 | this.PerformLayout(); 215 | 216 | } 217 | 218 | #endregion 219 | 220 | private System.Windows.Forms.Panel panel1; 221 | private System.Windows.Forms.Label close; 222 | private System.Windows.Forms.Label label2; 223 | private System.Windows.Forms.Label label3; 224 | private System.Windows.Forms.TextBox login_username; 225 | private System.Windows.Forms.TextBox login_password; 226 | private System.Windows.Forms.Label label4; 227 | private System.Windows.Forms.CheckBox login_showPass; 228 | private System.Windows.Forms.Button login_btn; 229 | private System.Windows.Forms.Label label5; 230 | private System.Windows.Forms.Button login_registerBtn; 231 | private System.Windows.Forms.Label label6; 232 | private System.Windows.Forms.PictureBox pictureBox1; 233 | } 234 | } 235 | 236 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/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 | using System.Data; 11 | using System.Data.SqlClient; 12 | using System.Configuration; 13 | 14 | namespace CafeShopManagementSystem 15 | { 16 | public partial class Form1 : Form 17 | { 18 | static string conn = ConfigurationManager.ConnectionStrings["myDatabaseConnection"].ConnectionString; 19 | SqlConnection connect = new SqlConnection(conn); 20 | 21 | public Form1() 22 | { 23 | InitializeComponent(); 24 | } 25 | 26 | private void close_Click(object sender, EventArgs e) 27 | { 28 | Application.Exit(); 29 | } 30 | 31 | private void login_registerBtn_Click(object sender, EventArgs e) 32 | { 33 | RegisterForm regForm = new RegisterForm(); 34 | regForm.Show(); 35 | 36 | this.Hide(); 37 | } 38 | 39 | private void login_showPass_CheckedChanged(object sender, EventArgs e) 40 | { 41 | login_password.PasswordChar = login_showPass.Checked ? '\0' : '*'; 42 | } 43 | 44 | public bool emptyFields() 45 | { 46 | if(login_username.Text == "" || login_password.Text == "") 47 | { 48 | return true; 49 | } 50 | else 51 | { 52 | return false; 53 | } 54 | } 55 | 56 | private void login_btn_Click(object sender, EventArgs e) 57 | { 58 | if (emptyFields()) 59 | { 60 | MessageBox.Show("All fields are required to be filled.", "Error Message", MessageBoxButtons.OK); 61 | } 62 | else 63 | { 64 | if(connect.State == ConnectionState.Closed) 65 | { 66 | try 67 | { 68 | connect.Open(); 69 | 70 | string selectAccount = "SELECT COUNT(*) FROM users WHERE username = @usern AND password = @pass AND status = @status"; 71 | 72 | using (SqlCommand cmd = new SqlCommand(selectAccount, connect)) 73 | { 74 | cmd.Parameters.AddWithValue("@usern", login_username.Text.Trim()); 75 | cmd.Parameters.AddWithValue("@pass", login_password.Text.Trim()); 76 | cmd.Parameters.AddWithValue("@status", "Active"); 77 | 78 | int rowCount = (int)cmd.ExecuteScalar(); 79 | 80 | if(rowCount > 0) 81 | { 82 | string selectRole = "SELECT role FROM users WHERE username = @usern AND password = @pass"; 83 | 84 | using(SqlCommand getRole = new SqlCommand(selectRole, connect)) 85 | { 86 | getRole.Parameters.AddWithValue("@usern", login_username.Text.Trim()); 87 | getRole.Parameters.AddWithValue("@pass", login_password.Text.Trim()); 88 | 89 | string userRole = getRole.ExecuteScalar() as string; 90 | 91 | MessageBox.Show("Login successfully!", "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 92 | 93 | if (userRole == "Admin") 94 | { 95 | //username = login_username.Text; 96 | AdminMainForm adminForm = new AdminMainForm(); 97 | adminForm.Show(); 98 | 99 | this.Hide(); 100 | } 101 | else if (userRole == "Cashier") 102 | { 103 | CashierMainForm cashierForm = new CashierMainForm(); 104 | cashierForm.Show(); 105 | 106 | this.Hide(); 107 | } 108 | } 109 | } 110 | else 111 | { 112 | MessageBox.Show("Incorrect Username/Password or there's no Admin's approval.", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 113 | 114 | } 115 | } 116 | 117 | } 118 | catch (Exception ex) 119 | { 120 | MessageBox.Show("Connection failed: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 121 | } 122 | finally 123 | { 124 | connect.Close(); 125 | } 126 | } 127 | 128 | } 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/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 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/PROD-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/PROD-1.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/PROD-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/PROD-2.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/PROD-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/PROD-3.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/PROD-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/PROD-4.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/PROD-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/PROD-5.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/wqeqwe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/Product_Directory/wqeqwe.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/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 CafeShopManagementSystem 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.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Form1()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/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("CafeShopManagementSystem")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CafeShopManagementSystem")] 13 | [assembly: AssemblyCopyright("Copyright © 2023")] 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("cfca91be-e943-4ba0-8ce9-1546cf57e2f9")] 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 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace CafeShopManagementSystem.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CafeShopManagementSystem.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap cafeShop { 67 | get { 68 | object obj = ResourceManager.GetObject("cafeShop", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap icons8_Cafe_100px_6 { 77 | get { 78 | object obj = ResourceManager.GetObject("icons8_Cafe_100px_6", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap icons8_group_90px_1 { 87 | get { 88 | object obj = ResourceManager.GetObject("icons8_group_90px_1", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized resource of type System.Drawing.Bitmap. 95 | /// 96 | internal static System.Drawing.Bitmap icons8_money_90px { 97 | get { 98 | object obj = ResourceManager.GetObject("icons8_money_90px", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Drawing.Bitmap. 105 | /// 106 | internal static System.Drawing.Bitmap icons8_Money_Bag_Bitcoin_90px { 107 | get { 108 | object obj = ResourceManager.GetObject("icons8_Money_Bag_Bitcoin_90px", resourceCulture); 109 | return ((System.Drawing.Bitmap)(obj)); 110 | } 111 | } 112 | 113 | /// 114 | /// Looks up a localized resource of type System.Drawing.Bitmap. 115 | /// 116 | internal static System.Drawing.Bitmap icons8_user_filled_90px { 117 | get { 118 | object obj = ResourceManager.GetObject("icons8_user_filled_90px", resourceCulture); 119 | return ((System.Drawing.Bitmap)(obj)); 120 | } 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Properties/Resources.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 | 121 | 122 | ..\Assets\icons8_money_90px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Assets\icons8_user_filled_90px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Assets\icons8_group_90px_1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Assets\icons8_Cafe_100px_6.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Assets\icons8_Money_Bag_Bitcoin_90px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\Assets\cafeShop.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | 12 | namespace CafeShopManagementSystem.Properties 13 | { 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 17 | { 18 | 19 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 20 | 21 | public static Settings Default 22 | { 23 | get 24 | { 25 | return defaultInstance; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/RegisterForm.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace CafeShopManagementSystem 3 | { 4 | partial class RegisterForm 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.register_btn = new System.Windows.Forms.Button(); 33 | this.register_showPass = new System.Windows.Forms.CheckBox(); 34 | this.register_password = new System.Windows.Forms.TextBox(); 35 | this.label4 = new System.Windows.Forms.Label(); 36 | this.register_username = new System.Windows.Forms.TextBox(); 37 | this.label3 = new System.Windows.Forms.Label(); 38 | this.label2 = new System.Windows.Forms.Label(); 39 | this.close = new System.Windows.Forms.Label(); 40 | this.panel1 = new System.Windows.Forms.Panel(); 41 | this.label6 = new System.Windows.Forms.Label(); 42 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 43 | this.label5 = new System.Windows.Forms.Label(); 44 | this.register_loginBtn = new System.Windows.Forms.Button(); 45 | this.register_cPassword = new System.Windows.Forms.TextBox(); 46 | this.label7 = new System.Windows.Forms.Label(); 47 | this.panel1.SuspendLayout(); 48 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 49 | this.SuspendLayout(); 50 | // 51 | // register_btn 52 | // 53 | this.register_btn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 54 | this.register_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 55 | this.register_btn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 56 | this.register_btn.ForeColor = System.Drawing.Color.White; 57 | this.register_btn.Location = new System.Drawing.Point(377, 378); 58 | this.register_btn.Name = "register_btn"; 59 | this.register_btn.Size = new System.Drawing.Size(115, 37); 60 | this.register_btn.TabIndex = 17; 61 | this.register_btn.Text = "SIGNUP"; 62 | this.register_btn.UseVisualStyleBackColor = false; 63 | this.register_btn.Click += new System.EventHandler(this.register_btn_Click); 64 | // 65 | // register_showPass 66 | // 67 | this.register_showPass.AutoSize = true; 68 | this.register_showPass.Font = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 69 | this.register_showPass.Location = new System.Drawing.Point(376, 329); 70 | this.register_showPass.Name = "register_showPass"; 71 | this.register_showPass.Size = new System.Drawing.Size(143, 21); 72 | this.register_showPass.TabIndex = 16; 73 | this.register_showPass.Text = "Show Password"; 74 | this.register_showPass.UseVisualStyleBackColor = true; 75 | this.register_showPass.CheckedChanged += new System.EventHandler(this.register_showPass_CheckedChanged); 76 | // 77 | // register_password 78 | // 79 | this.register_password.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 80 | this.register_password.Location = new System.Drawing.Point(377, 235); 81 | this.register_password.Name = "register_password"; 82 | this.register_password.PasswordChar = '*'; 83 | this.register_password.Size = new System.Drawing.Size(275, 26); 84 | this.register_password.TabIndex = 15; 85 | // 86 | // label4 87 | // 88 | this.label4.AutoSize = true; 89 | this.label4.Font = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 90 | this.label4.Location = new System.Drawing.Point(374, 214); 91 | this.label4.Name = "label4"; 92 | this.label4.Size = new System.Drawing.Size(85, 17); 93 | this.label4.TabIndex = 14; 94 | this.label4.Text = "Password:"; 95 | // 96 | // register_username 97 | // 98 | this.register_username.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 99 | this.register_username.Location = new System.Drawing.Point(376, 174); 100 | this.register_username.Name = "register_username"; 101 | this.register_username.Size = new System.Drawing.Size(275, 26); 102 | this.register_username.TabIndex = 13; 103 | // 104 | // label3 105 | // 106 | this.label3.AutoSize = true; 107 | this.label3.Font = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 108 | this.label3.Location = new System.Drawing.Point(373, 153); 109 | this.label3.Name = "label3"; 110 | this.label3.Size = new System.Drawing.Size(88, 17); 111 | this.label3.TabIndex = 12; 112 | this.label3.Text = "Username:"; 113 | // 114 | // label2 115 | // 116 | this.label2.AutoSize = true; 117 | this.label2.Font = new System.Drawing.Font("Arial Rounded MT Bold", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 118 | this.label2.Location = new System.Drawing.Point(373, 96); 119 | this.label2.Name = "label2"; 120 | this.label2.Size = new System.Drawing.Size(110, 22); 121 | this.label2.TabIndex = 11; 122 | this.label2.Text = "REGISTER"; 123 | // 124 | // close 125 | // 126 | this.close.AutoSize = true; 127 | this.close.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 128 | this.close.Location = new System.Drawing.Point(664, 10); 129 | this.close.Name = "close"; 130 | this.close.Size = new System.Drawing.Size(18, 18); 131 | this.close.TabIndex = 10; 132 | this.close.Text = "X"; 133 | this.close.Click += new System.EventHandler(this.close_Click); 134 | // 135 | // panel1 136 | // 137 | this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 138 | this.panel1.Controls.Add(this.label6); 139 | this.panel1.Controls.Add(this.pictureBox1); 140 | this.panel1.Controls.Add(this.label5); 141 | this.panel1.Controls.Add(this.register_loginBtn); 142 | this.panel1.Dock = System.Windows.Forms.DockStyle.Left; 143 | this.panel1.Location = new System.Drawing.Point(0, 0); 144 | this.panel1.Name = "panel1"; 145 | this.panel1.Size = new System.Drawing.Size(337, 484); 146 | this.panel1.TabIndex = 9; 147 | // 148 | // label6 149 | // 150 | this.label6.AutoSize = true; 151 | this.label6.Font = new System.Drawing.Font("Arial Rounded MT Bold", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 152 | this.label6.ForeColor = System.Drawing.Color.White; 153 | this.label6.Location = new System.Drawing.Point(15, 191); 154 | this.label6.Name = "label6"; 155 | this.label6.Size = new System.Drawing.Size(300, 22); 156 | this.label6.TabIndex = 9; 157 | this.label6.Text = "Cafe Shop Management System"; 158 | // 159 | // pictureBox1 160 | // 161 | this.pictureBox1.Image = global::CafeShopManagementSystem.Properties.Resources.icons8_Cafe_100px_6; 162 | this.pictureBox1.Location = new System.Drawing.Point(108, 84); 163 | this.pictureBox1.Name = "pictureBox1"; 164 | this.pictureBox1.Size = new System.Drawing.Size(100, 100); 165 | this.pictureBox1.TabIndex = 10; 166 | this.pictureBox1.TabStop = false; 167 | // 168 | // label5 169 | // 170 | this.label5.AutoSize = true; 171 | this.label5.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 172 | this.label5.ForeColor = System.Drawing.Color.White; 173 | this.label5.Location = new System.Drawing.Point(60, 397); 174 | this.label5.Name = "label5"; 175 | this.label5.Size = new System.Drawing.Size(216, 18); 176 | this.label5.TabIndex = 9; 177 | this.label5.Text = "Already have an account?"; 178 | // 179 | // register_loginBtn 180 | // 181 | this.register_loginBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(99)))), ((int)(((byte)(102))))); 182 | this.register_loginBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 183 | this.register_loginBtn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 184 | this.register_loginBtn.ForeColor = System.Drawing.Color.White; 185 | this.register_loginBtn.Location = new System.Drawing.Point(28, 423); 186 | this.register_loginBtn.Name = "register_loginBtn"; 187 | this.register_loginBtn.Size = new System.Drawing.Size(270, 37); 188 | this.register_loginBtn.TabIndex = 9; 189 | this.register_loginBtn.Text = "SIGN IN"; 190 | this.register_loginBtn.UseVisualStyleBackColor = false; 191 | this.register_loginBtn.Click += new System.EventHandler(this.register_loginBtn_Click); 192 | // 193 | // register_cPassword 194 | // 195 | this.register_cPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 196 | this.register_cPassword.Location = new System.Drawing.Point(376, 297); 197 | this.register_cPassword.Name = "register_cPassword"; 198 | this.register_cPassword.PasswordChar = '*'; 199 | this.register_cPassword.Size = new System.Drawing.Size(275, 26); 200 | this.register_cPassword.TabIndex = 19; 201 | // 202 | // label7 203 | // 204 | this.label7.AutoSize = true; 205 | this.label7.Font = new System.Drawing.Font("Arial Rounded MT Bold", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 206 | this.label7.Location = new System.Drawing.Point(373, 276); 207 | this.label7.Name = "label7"; 208 | this.label7.Size = new System.Drawing.Size(147, 17); 209 | this.label7.TabIndex = 18; 210 | this.label7.Text = "Confirm Password:"; 211 | // 212 | // RegisterForm 213 | // 214 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 215 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 216 | this.BackColor = System.Drawing.Color.White; 217 | this.ClientSize = new System.Drawing.Size(685, 484); 218 | this.Controls.Add(this.register_cPassword); 219 | this.Controls.Add(this.label7); 220 | this.Controls.Add(this.register_btn); 221 | this.Controls.Add(this.register_showPass); 222 | this.Controls.Add(this.register_password); 223 | this.Controls.Add(this.label4); 224 | this.Controls.Add(this.register_username); 225 | this.Controls.Add(this.label3); 226 | this.Controls.Add(this.label2); 227 | this.Controls.Add(this.close); 228 | this.Controls.Add(this.panel1); 229 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 230 | this.Name = "RegisterForm"; 231 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 232 | this.Text = "RegisterForm"; 233 | this.panel1.ResumeLayout(false); 234 | this.panel1.PerformLayout(); 235 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 236 | this.ResumeLayout(false); 237 | this.PerformLayout(); 238 | 239 | } 240 | 241 | #endregion 242 | 243 | private System.Windows.Forms.Button register_btn; 244 | private System.Windows.Forms.CheckBox register_showPass; 245 | private System.Windows.Forms.TextBox register_password; 246 | private System.Windows.Forms.Label label4; 247 | private System.Windows.Forms.TextBox register_username; 248 | private System.Windows.Forms.Label label3; 249 | private System.Windows.Forms.Label label2; 250 | private System.Windows.Forms.Label close; 251 | private System.Windows.Forms.Panel panel1; 252 | private System.Windows.Forms.Label label6; 253 | private System.Windows.Forms.PictureBox pictureBox1; 254 | private System.Windows.Forms.Label label5; 255 | private System.Windows.Forms.Button register_loginBtn; 256 | private System.Windows.Forms.TextBox register_cPassword; 257 | private System.Windows.Forms.Label label7; 258 | } 259 | } -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/RegisterForm.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 | using System.Data; 11 | using System.Data.SqlClient; 12 | using System.Configuration; 13 | 14 | namespace CafeShopManagementSystem 15 | { 16 | public partial class RegisterForm : Form 17 | { 18 | static string conn = ConfigurationManager.ConnectionStrings["myDatabaseConnection"].ConnectionString; 19 | SqlConnection connect = new SqlConnection(conn); 20 | public RegisterForm() 21 | { 22 | InitializeComponent(); 23 | } 24 | 25 | private void close_Click(object sender, EventArgs e) 26 | { 27 | Application.Exit(); 28 | } 29 | 30 | private void register_loginBtn_Click(object sender, EventArgs e) 31 | { 32 | Form1 loginForm = new Form1(); 33 | loginForm.Show(); 34 | 35 | this.Hide(); 36 | } 37 | 38 | private void register_showPass_CheckedChanged(object sender, EventArgs e) 39 | { 40 | register_password.PasswordChar = register_showPass.Checked ? '\0' : '*'; 41 | register_cPassword.PasswordChar = register_showPass.Checked ? '\0' : '*'; 42 | } 43 | 44 | public bool emptyFields() 45 | { 46 | if(register_username.Text == "" || register_password.Text == "" || register_cPassword.Text == "") 47 | { 48 | return true; 49 | } 50 | else 51 | { 52 | return false; 53 | } 54 | } 55 | private void register_btn_Click(object sender, EventArgs e) 56 | { 57 | if (emptyFields()) 58 | { 59 | MessageBox.Show("All fields are required to be filled.", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 60 | } 61 | else 62 | { 63 | if(connect.State == ConnectionState.Closed) 64 | { 65 | try 66 | { 67 | connect.Open(); 68 | 69 | string selectUsername = "SELECT * FROM users WHERE username = @usern"; // LETS CHECK IF THE USERNAME YOU WANT TO USE IS TAKEN ALREADY 70 | 71 | using (SqlCommand checkUsername = new SqlCommand(selectUsername, connect)) 72 | { 73 | checkUsername.Parameters.AddWithValue("@usern", register_username.Text.Trim()); 74 | 75 | SqlDataAdapter adapter = new SqlDataAdapter(checkUsername); 76 | DataTable table = new DataTable(); 77 | adapter.Fill(table); 78 | 79 | if (table.Rows.Count >= 1) 80 | { 81 | string usern = register_username.Text.Substring(0, 1).ToUpper() + register_username.Text.Substring(1); 82 | MessageBox.Show(usern + " is already taken.", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 83 | } 84 | else if(register_password.Text != register_cPassword.Text) 85 | { 86 | MessageBox.Show("Password does not match.", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 87 | } 88 | else if(register_password.Text.Length < 8) 89 | { 90 | MessageBox.Show("Invalid password, at least 8 characters are needed.", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 91 | } 92 | else 93 | { 94 | string insertData = "INSERT INTO users (username, password, profile_image, role, status, date_reg) " + 95 | "VALUES(@usern, @pass, @image, @role, @status, @date)"; 96 | DateTime today = DateTime.Today; 97 | 98 | using(SqlCommand cmd = new SqlCommand(insertData, connect)) 99 | { 100 | cmd.Parameters.AddWithValue("@usern", register_username.Text.Trim()); 101 | cmd.Parameters.AddWithValue("@pass", register_password.Text.Trim()); 102 | cmd.Parameters.AddWithValue("@image", ""); 103 | cmd.Parameters.AddWithValue("@role", "Cashier"); 104 | cmd.Parameters.AddWithValue("@status", "Approval"); 105 | cmd.Parameters.AddWithValue("@date", today); 106 | 107 | cmd.ExecuteNonQuery(); 108 | 109 | MessageBox.Show("Registered successfully!", "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 110 | 111 | // SWITCH FORM INTO LOGIN FORM 112 | Form1 loginForm = new Form1(); 113 | loginForm.Show(); 114 | 115 | this.Hide(); 116 | } 117 | } 118 | } 119 | } 120 | catch (Exception ex) 121 | { 122 | MessageBox.Show("Connection failed: " + ex, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 123 | } 124 | finally 125 | { 126 | connect.Close(); 127 | } 128 | } 129 | 130 | 131 | } 132 | } 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/RegisterForm.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 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/Testing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/Testing.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/test2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/test2.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/test3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/test3.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/CafeShopManagementSystem.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/CafeShopManagementSystem.exe -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/CafeShopManagementSystem.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/CafeShopManagementSystem.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/CafeShopManagementSystem.pdb -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/User_Directory/Test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/User_Directory/Test.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/User_Directory/test123.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/User_Directory/test123.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/source/repos/CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/Test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/source/repos/CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/Test.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/source/repos/CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/admin1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/source/repos/CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/admin1.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/source/repos/CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/test3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/source/repos/CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/test3.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/source/repos/CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/testing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/bin/Debug/source/repos/CafeShopManagementSystem/CafeShopManagementSystem/User_Directory/testing.jpg -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] 5 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.AdminAddProducts.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.AdminAddProducts.resources -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.AdminAddUsers.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.AdminAddUsers.resources -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.AdminDashboardForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.AdminDashboardForm.resources -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.AdminMainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.AdminMainForm.resources -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.CashierCustomersForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.CashierCustomersForm.resources -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.CashierMainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.CashierMainForm.resources -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.CashierOrderForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.CashierOrderForm.resources -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.Form1.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.Form1.resources -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.Properties.Resources.resources -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.RegisterForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.RegisterForm.resources -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- 1 | MBRSC -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 00d4435466ae6649fa95a909b017b2cd6d598af4 2 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\bin\Debug\CafeShopManagementSystem.exe.config 2 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\bin\Debug\CafeShopManagementSystem.exe 3 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\bin\Debug\CafeShopManagementSystem.pdb 4 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.Form1.resources 5 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.Properties.Resources.resources 6 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.csproj.GenerateResource.cache 7 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.csproj.CoreCompileInputs.cache 8 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.exe 9 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.pdb 10 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.RegisterForm.resources 11 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.AdminMainForm.resources 12 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.AdminAddUsers.resources 13 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.AdminDashboardForm.resources 14 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.AdminAddProducts.resources 15 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.csproj.AssemblyReference.cache 16 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.CashierMainForm.resources 17 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.CashierOrderForm.resources 18 | C:\Users\USER\source\repos\CafeShopManagementSystem\CafeShopManagementSystem\obj\Debug\CafeShopManagementSystem.CashierCustomersForm.resources 19 | -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.exe -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/CafeShopManagementSystem.pdb -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/CafeShopManagementSystemCSharp/6e7ceea65202b9c0dba6469ae24d1a413fdc3395/CafeShopManagementSystem/CafeShopManagementSystem/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CafeShopManagementSystemCSharp 2 | Cafe Shop Management System using C# 3 | -------------------------------------------------------------------------------- /gitattributes: -------------------------------------------------------------------------------- 1 | ## Unity ## 2 | 3 | *.cs diff=csharp text 4 | *.cginc text 5 | *.shader text 6 | 7 | *.mat merge=unityyamlmerge eol=lf 8 | *.anim merge=unityyamlmerge eol=lf 9 | *.unity merge=unityyamlmerge eol=lf 10 | *.prefab merge=unityyamlmerge eol=lf 11 | *.physicsMaterial2D merge=unityyamlmerge eol=lf 12 | *.physicMaterial merge=unityyamlmerge eol=lf 13 | *.asset merge=unityyamlmerge eol=lf 14 | *.meta merge=unityyamlmerge eol=lf 15 | *.controller merge=unityyamlmerge eol=lf 16 | 17 | 18 | ## git-lfs ## 19 | 20 | #Image 21 | *.jpg filter=lfs diff=lfs merge=lfs -text 22 | *.jpeg filter=lfs diff=lfs merge=lfs -text 23 | *.png filter=lfs diff=lfs merge=lfs -text 24 | *.gif filter=lfs diff=lfs merge=lfs -text 25 | *.psd filter=lfs diff=lfs merge=lfs -text 26 | *.ai filter=lfs diff=lfs merge=lfs -text 27 | *.tif filter=lfs diff=lfs merge=lfs -text 28 | 29 | #Audio 30 | *.mp3 filter=lfs diff=lfs merge=lfs -text 31 | *.wav filter=lfs diff=lfs merge=lfs -text 32 | *.ogg filter=lfs diff=lfs merge=lfs -text 33 | 34 | #Video 35 | *.mp4 filter=lfs diff=lfs merge=lfs -text 36 | *.mov filter=lfs diff=lfs merge=lfs -text 37 | 38 | #3D Object 39 | *.FBX filter=lfs diff=lfs merge=lfs -text 40 | *.fbx filter=lfs diff=lfs merge=lfs -text 41 | *.blend filter=lfs diff=lfs merge=lfs -text 42 | *.obj filter=lfs diff=lfs merge=lfs -text 43 | 44 | #ETC 45 | *.a filter=lfs diff=lfs merge=lfs -text 46 | *.exr filter=lfs diff=lfs merge=lfs -text 47 | *.tga filter=lfs diff=lfs merge=lfs -text 48 | *.pdf filter=lfs diff=lfs merge=lfs -text 49 | *.zip filter=lfs diff=lfs merge=lfs -text 50 | *.dll filter=lfs diff=lfs merge=lfs -text 51 | *.unitypackage filter=lfs diff=lfs merge=lfs -text 52 | *.aif filter=lfs diff=lfs merge=lfs -text 53 | *.ttf filter=lfs diff=lfs merge=lfs -text 54 | *.rns filter=lfs diff=lfs merge=lfs -text 55 | *.reason filter=lfs diff=lfs merge=lfs -text 56 | *.lxo filter=lfs diff=lfs merge=lfs -text 57 | *.bc filter=lfs diff=lfs merge=lfs -text --------------------------------------------------------------------------------