├── .gitattributes ├── .gitignore ├── Positive.sln ├── Positive ├── App.config ├── App.xaml ├── App.xaml.cs ├── DataModels │ ├── UserAccount.cs │ └── UserAccounts.cs ├── Fonts │ └── MaterialIcons-Regular.ttf ├── Main.xaml ├── Main.xaml.cs ├── Pages │ ├── Login.xaml │ ├── Login.xaml.cs │ ├── MainMenu.xaml │ └── MainMenu.xaml.cs ├── Positive.csproj ├── Positive.mdb ├── PositiveDataSet.Designer.cs ├── PositiveDataSet.cs ├── PositiveDataSet.xsc ├── PositiveDataSet.xsd ├── PositiveDataSet.xss ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings └── packages.config └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | [Xx]64/ 19 | [Xx]86/ 20 | [Bb]uild/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | artifacts/ 46 | 47 | *_i.c 48 | *_p.c 49 | *_i.h 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.tmp_proj 64 | *.log 65 | *.vspscc 66 | *.vssscc 67 | .builds 68 | *.pidb 69 | *.svclog 70 | *.scc 71 | 72 | # Chutzpah Test files 73 | _Chutzpah* 74 | 75 | # Visual C++ cache files 76 | ipch/ 77 | *.aps 78 | *.ncb 79 | *.opendb 80 | *.opensdf 81 | *.sdf 82 | *.cachefile 83 | *.VC.db 84 | 85 | # Visual Studio profiler 86 | *.psess 87 | *.vsp 88 | *.vspx 89 | *.sap 90 | 91 | # TFS 2012 Local Workspace 92 | $tf/ 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | *.DotSettings.user 101 | 102 | # JustCode is a .NET coding add-in 103 | .JustCode 104 | 105 | # TeamCity is a build add-in 106 | _TeamCity* 107 | 108 | # DotCover is a Code Coverage Tool 109 | *.dotCover 110 | 111 | # NCrunch 112 | _NCrunch_* 113 | .*crunch*.local.xml 114 | nCrunchTemp_* 115 | 116 | # MightyMoose 117 | *.mm.* 118 | AutoTest.Net/ 119 | 120 | # Web workbench (sass) 121 | .sass-cache/ 122 | 123 | # Installshield output folder 124 | [Ee]xpress/ 125 | 126 | # DocProject is a documentation generator add-in 127 | DocProject/buildhelp/ 128 | DocProject/Help/*.HxT 129 | DocProject/Help/*.HxC 130 | DocProject/Help/*.hhc 131 | DocProject/Help/*.hhk 132 | DocProject/Help/*.hhp 133 | DocProject/Help/Html2 134 | DocProject/Help/html 135 | 136 | # Click-Once directory 137 | publish/ 138 | 139 | # Publish Web Output 140 | *.[Pp]ublish.xml 141 | *.azurePubxml 142 | 143 | # TODO: Un-comment the next line if you do not want to checkin 144 | # your web deploy settings because they may include unencrypted 145 | # passwords 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # NuGet Packages 150 | *.nupkg 151 | # The packages folder can be ignored because of Package Restore 152 | **/packages/* 153 | # except build/, which is used as an MSBuild target. 154 | !**/packages/build/ 155 | # Uncomment if necessary however generally it will be regenerated when needed 156 | #!**/packages/repositories.config 157 | # NuGet v3's project.json files produces more ignoreable files 158 | *.nuget.props 159 | *.nuget.targets 160 | 161 | # Microsoft Azure Build Output 162 | csx/ 163 | *.build.csdef 164 | 165 | # Microsoft Azure Emulator 166 | ecf/ 167 | rcf/ 168 | 169 | # Microsoft Azure ApplicationInsights config file 170 | ApplicationInsights.config 171 | 172 | # Windows Store app package directory 173 | AppPackages/ 174 | BundleArtifacts/ 175 | 176 | # Visual Studio cache files 177 | # files ending in .cache can be ignored 178 | *.[Cc]ache 179 | # but keep track of directories ending in .cache 180 | !*.[Cc]ache/ 181 | 182 | # Others 183 | ClientBin/ 184 | [Ss]tyle[Cc]op.* 185 | ~$* 186 | *~ 187 | *.dbmdl 188 | *.dbproj.schemaview 189 | *.pfx 190 | *.publishsettings 191 | node_modules/ 192 | orleans.codegen.cs 193 | 194 | # RIA/Silverlight projects 195 | Generated_Code/ 196 | 197 | # Backup & report files from converting an old project file 198 | # to a newer Visual Studio version. Backup files are not needed, 199 | # because we have git ;-) 200 | _UpgradeReport_Files/ 201 | Backup*/ 202 | UpgradeLog*.XML 203 | UpgradeLog*.htm 204 | 205 | # SQL Server files 206 | *.mdf 207 | *.ldf 208 | 209 | # Business Intelligence projects 210 | *.rdl.data 211 | *.bim.layout 212 | *.bim_*.settings 213 | 214 | # Microsoft Fakes 215 | FakesAssemblies/ 216 | 217 | # GhostDoc plugin setting file 218 | *.GhostDoc.xml 219 | 220 | # Node.js Tools for Visual Studio 221 | .ntvs_analysis.dat 222 | 223 | # Visual Studio 6 build log 224 | *.plg 225 | 226 | # Visual Studio 6 workspace options file 227 | *.opt 228 | 229 | # Visual Studio LightSwitch build output 230 | **/*.HTMLClient/GeneratedArtifacts 231 | **/*.DesktopClient/GeneratedArtifacts 232 | **/*.DesktopClient/ModelManifest.xml 233 | **/*.Server/GeneratedArtifacts 234 | **/*.Server/ModelManifest.xml 235 | _Pvt_Extensions 236 | 237 | # LightSwitch generated files 238 | GeneratedArtifacts/ 239 | ModelManifest.xml 240 | 241 | # Paket dependency manager 242 | .paket/paket.exe 243 | 244 | # FAKE - F# Make 245 | .fake/ -------------------------------------------------------------------------------- /Positive.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Positive", "Positive\Positive.csproj", "{7D1E7F75-AF08-4B68-92A6-06CC42076D0B}" 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 | {7D1E7F75-AF08-4B68-92A6-06CC42076D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {7D1E7F75-AF08-4B68-92A6-06CC42076D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {7D1E7F75-AF08-4B68-92A6-06CC42076D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {7D1E7F75-AF08-4B68-92A6-06CC42076D0B}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Positive/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Positive/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | /Fonts/MaterialIcons-Regular.ttf#Material Icons 8 | 9 | 44 | 45 | 80 | 81 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /Positive/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace Positive 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Positive/DataModels/UserAccount.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 Positive.DataModels 8 | { 9 | public class UserAccount 10 | { 11 | public int ID{ get; set; } 12 | public int PINNumber{ get; set; } 13 | public string FirstName{ get; set; } 14 | public string LastName { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Positive/DataModels/UserAccounts.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 Positive.PositiveDataSetTableAdapters; 8 | 9 | namespace Positive.DataModels 10 | { 11 | public class UserAccounts 12 | { 13 | private UserAccountsTableAdapter adapter; 14 | private PositiveDataSet dataset; 15 | 16 | public UserAccounts() 17 | { 18 | this.dataset = new PositiveDataSet(); 19 | 20 | this.adapter = new UserAccountsTableAdapter(); 21 | this.adapter.Fill(dataset.UserAccounts); 22 | } 23 | 24 | public List GetUserAccounts() 25 | { 26 | this.adapter.Fill(dataset.UserAccounts); 27 | List userAccounts = new List(); 28 | 29 | foreach (DataRow row in this.dataset.UserAccounts) 30 | { 31 | userAccounts.Add(GetUserAccountFromDataRow(row)); 32 | } 33 | 34 | return userAccounts; 35 | } 36 | 37 | public UserAccount GetUserAccountByID(int? ID) 38 | { 39 | if (ID == null) 40 | return null; 41 | 42 | this.adapter.FillByID(dataset.UserAccounts, ID); 43 | 44 | // Check if account exists 45 | if (this.dataset.UserAccounts.Rows.Count > 0) 46 | return GetUserAccountFromDataRow(this.dataset.UserAccounts.Rows[0]); 47 | 48 | return null; 49 | } 50 | 51 | #region Data Mapping 52 | 53 | private UserAccount GetUserAccountFromDataRow(DataRow row) 54 | { 55 | PositiveDataSet.UserAccountsRow userAccountRow = row as PositiveDataSet.UserAccountsRow; 56 | 57 | UserAccount userAccount = new UserAccount 58 | { 59 | ID = userAccountRow.ID, 60 | PINNumber = userAccountRow.PINNumber, 61 | FirstName = userAccountRow.Firstname, 62 | LastName = userAccountRow.Lastname 63 | }; 64 | return userAccount; 65 | } 66 | 67 | #endregion 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Positive/Fonts/MaterialIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/wpf_pos_sample/27b7c07351a0a9acdca3411f8dcddc23cfef14fd/Positive/Fonts/MaterialIcons-Regular.ttf -------------------------------------------------------------------------------- /Positive/Main.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | -------------------------------------------------------------------------------- /Positive/Main.xaml.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.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | using OxyPlot.Wpf; 16 | 17 | namespace Positive 18 | { 19 | /// 20 | /// Interaction logic for MainWindow.xaml 21 | /// 22 | public partial class MainWindow : Window 23 | { 24 | public MainWindow() 25 | { 26 | InitializeComponent(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Positive/Pages/Login.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 58 | P O S 59 | I T I V E 60 | 61 | 62 | 63 | 64 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 78 | 79 | 80 | 81 | 82 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 96 | 97 | 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /Positive/Pages/Login.xaml.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.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | using Positive.DataModels; 17 | 18 | namespace Positive.Pages 19 | { 20 | /// 21 | /// Interaction logic for Login.xaml 22 | /// 23 | public partial class Login : Page 24 | { 25 | // Data model to access the UserAccount table. 26 | private UserAccounts userAccounts; 27 | 28 | public Login() 29 | { 30 | InitializeComponent(); 31 | 32 | // Create a new UserAccounts object to access the database. 33 | userAccounts = new UserAccounts(); 34 | } 35 | 36 | private void LoginLoaded(object sender, RoutedEventArgs e) 37 | { 38 | // First focus on the ID textbox. 39 | IDTextbox.Focus(); 40 | } 41 | 42 | private void LoginButton_Click(object sender, RoutedEventArgs e) 43 | { 44 | int? ID = null; 45 | int? PINNumber = null; 46 | 47 | // Get the ID and PIN number from the textboxes. 48 | if (IDTextbox.Text != string.Empty) 49 | ID = Convert.ToInt32(IDTextbox.Text); 50 | if (PINNumberTextbox.Password != string.Empty) 51 | PINNumber = Convert.ToInt32(PINNumberTextbox.Password); 52 | 53 | UserAccount userAccount = userAccounts.GetUserAccountByID(ID); 54 | 55 | // Check is the ID exists. 56 | if (userAccount != null) 57 | { 58 | // Check the PIN number matches the account's PIN. 59 | if (userAccount.PINNumber == PINNumber) 60 | { 61 | WarningTextBlock.Visibility = Visibility.Hidden; 62 | System.Windows.Navigation.NavigationService test = NavigationService; 63 | test.Navigate(new MainMenu()); 64 | } 65 | else 66 | { 67 | WarningTextBlock.Visibility = Visibility.Visible; 68 | } 69 | } 70 | else 71 | { 72 | WarningTextBlock.Visibility = Visibility.Visible; 73 | } 74 | } 75 | 76 | private void FormTextBox_KeyDown(object sender, KeyEventArgs e) 77 | { 78 | if (e.Key == Key.Enter) 79 | { 80 | TextBox s = e.Source as TextBox; 81 | if (s != null) 82 | { 83 | s.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); 84 | } 85 | 86 | e.Handled = true; 87 | } 88 | } 89 | 90 | private void IDTextBox_KeyDown(object sender, KeyEventArgs e) 91 | { 92 | if (e.Key == Key.Enter) 93 | { 94 | PINNumberTextbox.Focus(); 95 | e.Handled = true; 96 | } 97 | } 98 | 99 | private void PINNumberTextbox_KeyDown(object sender, KeyEventArgs e) 100 | { 101 | if (e.Key == Key.Enter) 102 | { 103 | LoginButton.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); 104 | e.Handled = true; 105 | } 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /Positive/Pages/MainMenu.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 30 | Positive 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 59 | 61 |  62 | 63 | 64 | 65 | 66 | Welcome to Positive! 67 | 68 | 69 | 70 | Choose an action below to begin. 71 | 72 | 73 | 112 | 113 | 153 | 154 | 192 | 193 | 232 | 233 | 234 | 235 | 236 | 237 | -------------------------------------------------------------------------------- /Positive/Pages/MainMenu.xaml.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.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Positive.Pages 17 | { 18 | /// 19 | /// Interaction logic for MainMenu.xaml 20 | /// 21 | public partial class MainMenu : Page 22 | { 23 | public MainMenu() 24 | { 25 | InitializeComponent(); 26 | } 27 | 28 | private void LogoutButton_Click(object sender, RoutedEventArgs e) 29 | { 30 | NavigationService.Navigate(new Login()); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Positive/Positive.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {7D1E7F75-AF08-4B68-92A6-06CC42076D0B} 8 | WinExe 9 | Properties 10 | Positive 11 | Positive 12 | v4.5.2 13 | 512 14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15 | 4 16 | true 17 | publish\ 18 | true 19 | Disk 20 | false 21 | Foreground 22 | 7 23 | Days 24 | false 25 | false 26 | true 27 | 0 28 | 1.0.0.%2a 29 | false 30 | false 31 | true 32 | 33 | 34 | AnyCPU 35 | true 36 | full 37 | false 38 | bin\Debug\ 39 | DEBUG;TRACE 40 | prompt 41 | 4 42 | 43 | 44 | AnyCPU 45 | pdbonly 46 | true 47 | bin\Release\ 48 | TRACE 49 | prompt 50 | 4 51 | 52 | 53 | 54 | ..\packages\OxyPlot.Core.1.0.0\lib\net45\OxyPlot.dll 55 | True 56 | 57 | 58 | ..\packages\OxyPlot.Wpf.1.0.0\lib\net45\OxyPlot.Wpf.dll 59 | True 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 4.0 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | MSBuild:Compile 79 | Designer 80 | 81 | 82 | MSBuild:Compile 83 | Designer 84 | 85 | 86 | App.xaml 87 | Code 88 | 89 | 90 | 91 | 92 | Main.xaml 93 | Code 94 | 95 | 96 | Designer 97 | MSBuild:Compile 98 | 99 | 100 | Designer 101 | MSBuild:Compile 102 | 103 | 104 | 105 | 106 | Login.xaml 107 | 108 | 109 | MainMenu.xaml 110 | 111 | 112 | PositiveDataSet.xsd 113 | 114 | 115 | True 116 | True 117 | PositiveDataSet.xsd 118 | 119 | 120 | Code 121 | 122 | 123 | True 124 | True 125 | Resources.resx 126 | 127 | 128 | True 129 | Settings.settings 130 | True 131 | 132 | 133 | ResXFileCodeGenerator 134 | Resources.Designer.cs 135 | Designer 136 | 137 | 138 | 139 | 140 | PositiveDataSet.xsd 141 | 142 | 143 | MSDataSetGenerator 144 | PositiveDataSet.Designer.cs 145 | Designer 146 | 147 | 148 | PositiveDataSet.xsd 149 | 150 | 151 | SettingsSingleFileGenerator 152 | Settings.Designer.cs 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | False 162 | Microsoft .NET Framework 4.5.2 %28x86 and x64%29 163 | true 164 | 165 | 166 | False 167 | .NET Framework 3.5 SP1 168 | false 169 | 170 | 171 | 172 | 173 | Always 174 | 175 | 176 | 177 | 178 | 179 | 180 | 187 | -------------------------------------------------------------------------------- /Positive/Positive.mdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/wpf_pos_sample/27b7c07351a0a9acdca3411f8dcddc23cfef14fd/Positive/Positive.mdb -------------------------------------------------------------------------------- /Positive/PositiveDataSet.cs: -------------------------------------------------------------------------------- 1 | namespace Positive 2 | { 3 | 4 | 5 | partial class PositiveDataSet 6 | { 7 | } 8 | } 9 | 10 | namespace Positive.PositiveDataSetTableAdapters { 11 | 12 | 13 | public partial class TransactionsTableAdapter { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Positive/PositiveDataSet.xsc: -------------------------------------------------------------------------------- 1 |  2 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Positive/PositiveDataSet.xsd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | DELETE FROM `CreditAccounts` WHERE ((`ID` = ?) AND ((? = 1 AND `PINNUMBER` IS NULL) OR (`PINNUMBER` = ?)) AND ((? = 1 AND `FIRSTNAME` IS NULL) OR (`FIRSTNAME` = ?)) AND ((? = 1 AND `MaidenName` IS NULL) OR (`MaidenName` = ?)) AND ((? = 1 AND `LASTNAME` IS NULL) OR (`LASTNAME` = ?))) 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | INSERT INTO `CreditAccounts` (`ID`, `PINNUMBER`, `FIRSTNAME`, `MaidenName`, `LASTNAME`) VALUES (?, ?, ?, ?, ?) 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | SELECT ID, PINNUMBER, FIRSTNAME, MaidenName, LASTNAME FROM CreditAccounts 44 | 45 | 46 | 47 | 48 | 49 | UPDATE `CreditAccounts` SET `ID` = ?, `PINNUMBER` = ?, `FIRSTNAME` = ?, `MaidenName` = ?, `LASTNAME` = ? WHERE ((`ID` = ?) AND ((? = 1 AND `PINNUMBER` IS NULL) OR (`PINNUMBER` = ?)) AND ((? = 1 AND `FIRSTNAME` IS NULL) OR (`FIRSTNAME` = ?)) AND ((? = 1 AND `MaidenName` IS NULL) OR (`MaidenName` = ?)) AND ((? = 1 AND `LASTNAME` IS NULL) OR (`LASTNAME` = ?))) 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | DELETE FROM `Products` WHERE ((`ID` = ?) AND ((? = 1 AND `Name` IS NULL) OR (`Name` = ?)) AND ((? = 1 AND `Price` IS NULL) OR (`Price` = ?)) AND ((? = 1 AND `Amount` IS NULL) OR (`Amount` = ?))) 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | INSERT INTO `Products` (`ID`, `Name`, `Price`, `Amount`) VALUES (?, ?, ?, ?) 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | SELECT ID, Name, Price, Amount FROM Products 110 | 111 | 112 | 113 | 114 | 115 | UPDATE `Products` SET `ID` = ?, `Name` = ?, `Price` = ?, `Amount` = ? WHERE ((`ID` = ?) AND ((? = 1 AND `Name` IS NULL) OR (`Name` = ?)) AND ((? = 1 AND `Price` IS NULL) OR (`Price` = ?)) AND ((? = 1 AND `Amount` IS NULL) OR (`Amount` = ?))) 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | DELETE FROM `ProductTransactions` WHERE ((`ID` = ?) AND ((? = 1 AND `TransactionID` IS NULL) OR (`TransactionID` = ?)) AND ((? = 1 AND `ProductID` IS NULL) OR (`ProductID` = ?))) 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | INSERT INTO `ProductTransactions` (`TransactionID`, `ProductID`) VALUES (?, ?) 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | SELECT ID, TransactionID, ProductID FROM ProductTransactions 168 | 169 | 170 | 171 | 172 | 173 | UPDATE `ProductTransactions` SET `TransactionID` = ?, `ProductID` = ? WHERE ((`ID` = ?) AND ((? = 1 AND `TransactionID` IS NULL) OR (`TransactionID` = ?)) AND ((? = 1 AND `ProductID` IS NULL) OR (`ProductID` = ?))) 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | DELETE FROM `Transactions` WHERE ((`ID` = ?) AND ((? = 1 AND `TransactionerID` IS NULL) OR (`TransactionerID` = ?)) AND ((? = 1 AND `TransactionDate` IS NULL) OR (`TransactionDate` = ?)) AND ((? = 1 AND `TransactioneeID` IS NULL) OR (`TransactioneeID` = ?)) AND ((? = 1 AND `PaidStatus` IS NULL) OR (`PaidStatus` = ?))) 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | INSERT INTO `Transactions` (`TransactionerID`, `TransactionDate`, `TransactioneeID`, `PaidStatus`) VALUES (?, ?, ?, ?) 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | SELECT ID, TransactionerID, TransactionDate, TransactioneeID, PaidStatus FROM Transactions 227 | 228 | 229 | 230 | 231 | 232 | UPDATE `Transactions` SET `TransactionerID` = ?, `TransactionDate` = ?, `TransactioneeID` = ?, `PaidStatus` = ? WHERE ((`ID` = ?) AND ((? = 1 AND `TransactionerID` IS NULL) OR (`TransactionerID` = ?)) AND ((? = 1 AND `TransactionDate` IS NULL) OR (`TransactionDate` = ?)) AND ((? = 1 AND `TransactioneeID` IS NULL) OR (`TransactioneeID` = ?)) AND ((? = 1 AND `PaidStatus` IS NULL) OR (`PaidStatus` = ?))) 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | DELETE FROM `UserAccounts` WHERE ((`ID` = ?) AND ((? = 1 AND `PINNUMBER` IS NULL) OR (`PINNUMBER` = ?)) AND ((? = 1 AND `Firstname` IS NULL) OR (`Firstname` = ?)) AND ((? = 1 AND `MaidenName` IS NULL) OR (`MaidenName` = ?)) AND ((? = 1 AND `Lastname` IS NULL) OR (`Lastname` = ?))) 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | INSERT INTO `UserAccounts` (`ID`, `PINNUMBER`, `Firstname`, `MaidenName`, `Lastname`) VALUES (?, ?, ?, ?, ?) 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | SELECT ID, PINNUMBER, Firstname, MaidenName, Lastname FROM UserAccounts 295 | 296 | 297 | 298 | 299 | 300 | UPDATE `UserAccounts` SET `ID` = ?, `PINNUMBER` = ?, `Firstname` = ?, `MaidenName` = ?, `Lastname` = ? WHERE ((`ID` = ?) AND ((? = 1 AND `PINNUMBER` IS NULL) OR (`PINNUMBER` = ?)) AND ((? = 1 AND `Firstname` IS NULL) OR (`Firstname` = ?)) AND ((? = 1 AND `MaidenName` IS NULL) OR (`MaidenName` = ?)) AND ((? = 1 AND `Lastname` IS NULL) OR (`Lastname` = ?))) 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | SELECT ID, PINNUMBER, Firstname, MaidenName, Lastname 334 | FROM UserAccounts 335 | WHERE ID = @ID 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | -------------------------------------------------------------------------------- /Positive/PositiveDataSet.xss: -------------------------------------------------------------------------------- 1 |  2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 415 20 | 380 21 | 22 | 23 | 371 24 | 380 25 | 26 | 27 | 28 | 29 | 30 | 31 | 546 32 | 294 33 | 34 | 35 | 546 36 | 216 37 | 38 | 39 | 40 | 41 | 42 | 43 | 328 44 | 144 45 | 46 | 47 | 412 48 | 144 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Positive/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("Positive")] 11 | [assembly: AssemblyDescription("Point of Sale System")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("Junel Lawrence Cordova")] 14 | [assembly: AssemblyProduct("Positive")] 15 | [assembly: AssemblyCopyright("Copyright © 2016")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /Positive/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 Positive.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", "4.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("Positive.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 | -------------------------------------------------------------------------------- /Positive/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 | -------------------------------------------------------------------------------- /Positive/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 | namespace Positive.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.ApplicationScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] 29 | [global::System.Configuration.DefaultSettingValueAttribute("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\Positive.mdb")] 30 | public string PositiveConnectionString { 31 | get { 32 | return ((string)(this["PositiveConnectionString"])); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Positive/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | <?xml version="1.0" encoding="utf-16"?> 7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 8 | <ConnectionString>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Positive.mdb</ConnectionString> 9 | <ProviderName>System.Data.OleDb</ProviderName> 10 | </SerializableConnectionString> 11 | Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Positive.mdb 12 | 13 | 14 | -------------------------------------------------------------------------------- /Positive/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wpf_pos_sample 2 | wpf_pos_sample 3 | 4 | Admin User ID = 1 5 | PIN Number = 1 6 | --------------------------------------------------------------------------------