├── .gitattributes ├── .gitignore ├── PandaMart.sln ├── PandaMart ├── App.config ├── Form1.Designer.cs ├── Form1.cs ├── Form1.resx ├── Form2.Designer.cs ├── Form2.cs ├── Form2.resx ├── Form3.Designer.cs ├── Form3.cs ├── Form3.resx ├── Form4.Designer.cs ├── Form4.cs ├── Form4.resx ├── Form5.Designer.cs ├── Form5.cs ├── Form5.resx ├── Form6.Designer.cs ├── Form6.cs ├── Form6.resx ├── Form7.Designer.cs ├── Form7.cs ├── PandaMart.csproj ├── Program.cs └── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings └── PandaMartDB.sql /.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 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /PandaMart.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.6.33723.286 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PandaMart", "PandaMart\PandaMart.csproj", "{C8372F71-5146-4770-B4E6-BAD2A59915FE}" 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 | {C8372F71-5146-4770-B4E6-BAD2A59915FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {C8372F71-5146-4770-B4E6-BAD2A59915FE}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {C8372F71-5146-4770-B4E6-BAD2A59915FE}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {C8372F71-5146-4770-B4E6-BAD2A59915FE}.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 = {AE39E234-C554-4277-B58D-CC26F9638420} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /PandaMart/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PandaMart/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PandaMart 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); 32 | this.INVOICEtextBox = new System.Windows.Forms.TextBox(); 33 | this.label2 = new System.Windows.Forms.Label(); 34 | this.label3 = new System.Windows.Forms.Label(); 35 | this.USERtextBox = new System.Windows.Forms.TextBox(); 36 | this.label4 = new System.Windows.Forms.Label(); 37 | this.label5 = new System.Windows.Forms.Label(); 38 | this.DISCOUNTtextBox = new System.Windows.Forms.TextBox(); 39 | this.label6 = new System.Windows.Forms.Label(); 40 | this.UNITPRICEtextBox = new System.Windows.Forms.TextBox(); 41 | this.label7 = new System.Windows.Forms.Label(); 42 | this.label8 = new System.Windows.Forms.Label(); 43 | this.label9 = new System.Windows.Forms.Label(); 44 | this.label10 = new System.Windows.Forms.Label(); 45 | this.label11 = new System.Windows.Forms.Label(); 46 | this.FINALCOSTtextBox = new System.Windows.Forms.TextBox(); 47 | this.label12 = new System.Windows.Forms.Label(); 48 | this.TOTALCOSTtextBox = new System.Windows.Forms.TextBox(); 49 | this.label13 = new System.Windows.Forms.Label(); 50 | this.TAXtextBox = new System.Windows.Forms.TextBox(); 51 | this.label14 = new System.Windows.Forms.Label(); 52 | this.SUBTOTALtextBox = new System.Windows.Forms.TextBox(); 53 | this.label15 = new System.Windows.Forms.Label(); 54 | this.QUANTITYtextBox = new System.Windows.Forms.TextBox(); 55 | this.label16 = new System.Windows.Forms.Label(); 56 | this.CHANGEtextBox = new System.Windows.Forms.TextBox(); 57 | this.label17 = new System.Windows.Forms.Label(); 58 | this.AMOUNTPAIDtextBox = new System.Windows.Forms.TextBox(); 59 | this.label18 = new System.Windows.Forms.Label(); 60 | this.label19 = new System.Windows.Forms.Label(); 61 | this.SELECTITEMcomboBox = new System.Windows.Forms.ComboBox(); 62 | this.ADDbutton = new System.Windows.Forms.Button(); 63 | this.RESETbutton = new System.Windows.Forms.Button(); 64 | this.dataGridView1 = new System.Windows.Forms.DataGridView(); 65 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 66 | this.button1 = new System.Windows.Forms.Button(); 67 | this.INSERTbutton = new System.Windows.Forms.Button(); 68 | this.menuStrip1 = new System.Windows.Forms.MenuStrip(); 69 | this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 70 | this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 71 | this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 72 | this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 73 | this.addItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 74 | this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 75 | this.editItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 76 | this.viewDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 77 | this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 78 | this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); 79 | this.detailsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 80 | this.searchRecordToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 81 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); 82 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 83 | this.menuStrip1.SuspendLayout(); 84 | this.SuspendLayout(); 85 | // 86 | // INVOICEtextBox 87 | // 88 | this.INVOICEtextBox.Location = new System.Drawing.Point(39, 168); 89 | this.INVOICEtextBox.Name = "INVOICEtextBox"; 90 | this.INVOICEtextBox.ReadOnly = true; 91 | this.INVOICEtextBox.Size = new System.Drawing.Size(172, 20); 92 | this.INVOICEtextBox.TabIndex = 0; 93 | this.INVOICEtextBox.TextChanged += new System.EventHandler(this.INVOICEtextBox_TextChanged); 94 | // 95 | // label2 96 | // 97 | this.label2.AutoSize = true; 98 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 99 | this.label2.Location = new System.Drawing.Point(35, 145); 100 | this.label2.Name = "label2"; 101 | this.label2.Size = new System.Drawing.Size(71, 20); 102 | this.label2.TabIndex = 2; 103 | this.label2.Text = "Invoice:"; 104 | this.label2.Click += new System.EventHandler(this.label2_Click); 105 | // 106 | // label3 107 | // 108 | this.label3.AutoSize = true; 109 | this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 110 | this.label3.Location = new System.Drawing.Point(35, 193); 111 | this.label3.Name = "label3"; 112 | this.label3.Size = new System.Drawing.Size(52, 20); 113 | this.label3.TabIndex = 4; 114 | this.label3.Text = "User:"; 115 | this.label3.Click += new System.EventHandler(this.label3_Click); 116 | // 117 | // USERtextBox 118 | // 119 | this.USERtextBox.Location = new System.Drawing.Point(39, 216); 120 | this.USERtextBox.Name = "USERtextBox"; 121 | this.USERtextBox.ReadOnly = true; 122 | this.USERtextBox.Size = new System.Drawing.Size(172, 20); 123 | this.USERtextBox.TabIndex = 3; 124 | this.USERtextBox.TextChanged += new System.EventHandler(this.USERtextBox_TextChanged); 125 | // 126 | // label4 127 | // 128 | this.label4.AutoSize = true; 129 | this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 130 | this.label4.Location = new System.Drawing.Point(37, 246); 131 | this.label4.Name = "label4"; 132 | this.label4.Size = new System.Drawing.Size(106, 20); 133 | this.label4.TabIndex = 6; 134 | this.label4.Text = "Select Item:"; 135 | // 136 | // label5 137 | // 138 | this.label5.AutoSize = true; 139 | this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 140 | this.label5.Location = new System.Drawing.Point(343, 355); 141 | this.label5.Name = "label5"; 142 | this.label5.Size = new System.Drawing.Size(95, 20); 143 | this.label5.TabIndex = 10; 144 | this.label5.Text = "Final Cost:"; 145 | // 146 | // DISCOUNTtextBox 147 | // 148 | this.DISCOUNTtextBox.Location = new System.Drawing.Point(39, 379); 149 | this.DISCOUNTtextBox.Name = "DISCOUNTtextBox"; 150 | this.DISCOUNTtextBox.ReadOnly = true; 151 | this.DISCOUNTtextBox.Size = new System.Drawing.Size(172, 20); 152 | this.DISCOUNTtextBox.TabIndex = 9; 153 | this.DISCOUNTtextBox.TextChanged += new System.EventHandler(this.DISCOUNTtextBox_TextChanged); 154 | // 155 | // label6 156 | // 157 | this.label6.AutoSize = true; 158 | this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 159 | this.label6.Location = new System.Drawing.Point(37, 301); 160 | this.label6.Name = "label6"; 161 | this.label6.Size = new System.Drawing.Size(92, 20); 162 | this.label6.TabIndex = 8; 163 | this.label6.Text = "Unit Price:"; 164 | // 165 | // UNITPRICEtextBox 166 | // 167 | this.UNITPRICEtextBox.Location = new System.Drawing.Point(39, 324); 168 | this.UNITPRICEtextBox.Name = "UNITPRICEtextBox"; 169 | this.UNITPRICEtextBox.ReadOnly = true; 170 | this.UNITPRICEtextBox.Size = new System.Drawing.Size(172, 20); 171 | this.UNITPRICEtextBox.TabIndex = 7; 172 | this.UNITPRICEtextBox.TextChanged += new System.EventHandler(this.UNITPRICEtextBox_TextChanged); 173 | // 174 | // label7 175 | // 176 | this.label7.AutoSize = true; 177 | this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 178 | this.label7.Location = new System.Drawing.Point(358, 224); 179 | this.label7.Name = "label7"; 180 | this.label7.Size = new System.Drawing.Size(0, 20); 181 | this.label7.TabIndex = 14; 182 | // 183 | // label8 184 | // 185 | this.label8.AutoSize = true; 186 | this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 187 | this.label8.Location = new System.Drawing.Point(358, 175); 188 | this.label8.Name = "label8"; 189 | this.label8.Size = new System.Drawing.Size(0, 20); 190 | this.label8.TabIndex = 12; 191 | // 192 | // label9 193 | // 194 | this.label9.AutoSize = true; 195 | this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 196 | this.label9.Location = new System.Drawing.Point(358, 319); 197 | this.label9.Name = "label9"; 198 | this.label9.Size = new System.Drawing.Size(0, 20); 199 | this.label9.TabIndex = 18; 200 | // 201 | // label10 202 | // 203 | this.label10.AutoSize = true; 204 | this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 205 | this.label10.Location = new System.Drawing.Point(358, 270); 206 | this.label10.Name = "label10"; 207 | this.label10.Size = new System.Drawing.Size(0, 20); 208 | this.label10.TabIndex = 16; 209 | // 210 | // label11 211 | // 212 | this.label11.AutoSize = true; 213 | this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 214 | this.label11.Location = new System.Drawing.Point(37, 356); 215 | this.label11.Name = "label11"; 216 | this.label11.Size = new System.Drawing.Size(158, 20); 217 | this.label11.TabIndex = 28; 218 | this.label11.Text = "Discount Per Item:"; 219 | // 220 | // FINALCOSTtextBox 221 | // 222 | this.FINALCOSTtextBox.Location = new System.Drawing.Point(345, 378); 223 | this.FINALCOSTtextBox.Name = "FINALCOSTtextBox"; 224 | this.FINALCOSTtextBox.ReadOnly = true; 225 | this.FINALCOSTtextBox.Size = new System.Drawing.Size(171, 20); 226 | this.FINALCOSTtextBox.TabIndex = 27; 227 | this.FINALCOSTtextBox.TextChanged += new System.EventHandler(this.FINALCOSTtextBox_TextChanged); 228 | // 229 | // label12 230 | // 231 | this.label12.AutoSize = true; 232 | this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 233 | this.label12.Location = new System.Drawing.Point(343, 300); 234 | this.label12.Name = "label12"; 235 | this.label12.Size = new System.Drawing.Size(96, 20); 236 | this.label12.TabIndex = 26; 237 | this.label12.Text = "Total Cost:"; 238 | // 239 | // TOTALCOSTtextBox 240 | // 241 | this.TOTALCOSTtextBox.Location = new System.Drawing.Point(347, 324); 242 | this.TOTALCOSTtextBox.Name = "TOTALCOSTtextBox"; 243 | this.TOTALCOSTtextBox.ReadOnly = true; 244 | this.TOTALCOSTtextBox.Size = new System.Drawing.Size(169, 20); 245 | this.TOTALCOSTtextBox.TabIndex = 25; 246 | this.TOTALCOSTtextBox.TextChanged += new System.EventHandler(this.TOTALCOSTtextBox_TextChanged); 247 | // 248 | // label13 249 | // 250 | this.label13.AutoSize = true; 251 | this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 252 | this.label13.Location = new System.Drawing.Point(343, 246); 253 | this.label13.Name = "label13"; 254 | this.label13.Size = new System.Drawing.Size(42, 20); 255 | this.label13.TabIndex = 24; 256 | this.label13.Text = "Tax:"; 257 | // 258 | // TAXtextBox 259 | // 260 | this.TAXtextBox.Location = new System.Drawing.Point(345, 269); 261 | this.TAXtextBox.Name = "TAXtextBox"; 262 | this.TAXtextBox.ReadOnly = true; 263 | this.TAXtextBox.Size = new System.Drawing.Size(171, 20); 264 | this.TAXtextBox.TabIndex = 23; 265 | this.TAXtextBox.TextChanged += new System.EventHandler(this.TAXtextBox_TextChanged); 266 | // 267 | // label14 268 | // 269 | this.label14.AutoSize = true; 270 | this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 271 | this.label14.Location = new System.Drawing.Point(341, 193); 272 | this.label14.Name = "label14"; 273 | this.label14.Size = new System.Drawing.Size(91, 20); 274 | this.label14.TabIndex = 22; 275 | this.label14.Text = "Sub Total:"; 276 | // 277 | // SUBTOTALtextBox 278 | // 279 | this.SUBTOTALtextBox.Location = new System.Drawing.Point(345, 216); 280 | this.SUBTOTALtextBox.Name = "SUBTOTALtextBox"; 281 | this.SUBTOTALtextBox.ReadOnly = true; 282 | this.SUBTOTALtextBox.Size = new System.Drawing.Size(171, 20); 283 | this.SUBTOTALtextBox.TabIndex = 21; 284 | this.SUBTOTALtextBox.TextChanged += new System.EventHandler(this.SUBTOTALtextBox_TextChanged); 285 | // 286 | // label15 287 | // 288 | this.label15.AutoSize = true; 289 | this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 290 | this.label15.Location = new System.Drawing.Point(341, 145); 291 | this.label15.Name = "label15"; 292 | this.label15.Size = new System.Drawing.Size(81, 20); 293 | this.label15.TabIndex = 20; 294 | this.label15.Text = "Quantity:"; 295 | // 296 | // QUANTITYtextBox 297 | // 298 | this.QUANTITYtextBox.Enabled = false; 299 | this.QUANTITYtextBox.Location = new System.Drawing.Point(345, 168); 300 | this.QUANTITYtextBox.Name = "QUANTITYtextBox"; 301 | this.QUANTITYtextBox.Size = new System.Drawing.Size(171, 20); 302 | this.QUANTITYtextBox.TabIndex = 19; 303 | this.QUANTITYtextBox.TextChanged += new System.EventHandler(this.QUANTITYtextBox_TextChanged); 304 | // 305 | // label16 306 | // 307 | this.label16.AutoSize = true; 308 | this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 309 | this.label16.Location = new System.Drawing.Point(641, 196); 310 | this.label16.Name = "label16"; 311 | this.label16.Size = new System.Drawing.Size(76, 20); 312 | this.label16.TabIndex = 34; 313 | this.label16.Text = "Change:"; 314 | // 315 | // CHANGEtextBox 316 | // 317 | this.CHANGEtextBox.Location = new System.Drawing.Point(645, 222); 318 | this.CHANGEtextBox.Name = "CHANGEtextBox"; 319 | this.CHANGEtextBox.ReadOnly = true; 320 | this.CHANGEtextBox.Size = new System.Drawing.Size(171, 20); 321 | this.CHANGEtextBox.TabIndex = 33; 322 | this.CHANGEtextBox.TextChanged += new System.EventHandler(this.CHANGEtextBox_TextChanged); 323 | // 324 | // label17 325 | // 326 | this.label17.AutoSize = true; 327 | this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 328 | this.label17.Location = new System.Drawing.Point(641, 145); 329 | this.label17.Name = "label17"; 330 | this.label17.Size = new System.Drawing.Size(116, 20); 331 | this.label17.TabIndex = 32; 332 | this.label17.Text = "Amount Paid:"; 333 | // 334 | // AMOUNTPAIDtextBox 335 | // 336 | this.AMOUNTPAIDtextBox.Location = new System.Drawing.Point(645, 168); 337 | this.AMOUNTPAIDtextBox.Name = "AMOUNTPAIDtextBox"; 338 | this.AMOUNTPAIDtextBox.Size = new System.Drawing.Size(171, 20); 339 | this.AMOUNTPAIDtextBox.TabIndex = 31; 340 | this.AMOUNTPAIDtextBox.TextChanged += new System.EventHandler(this.AMOUNTPAIDtextBox_TextChanged); 341 | // 342 | // label18 343 | // 344 | this.label18.AutoSize = true; 345 | this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 346 | this.label18.Location = new System.Drawing.Point(651, 217); 347 | this.label18.Name = "label18"; 348 | this.label18.Size = new System.Drawing.Size(0, 20); 349 | this.label18.TabIndex = 30; 350 | // 351 | // label19 352 | // 353 | this.label19.AutoSize = true; 354 | this.label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 355 | this.label19.Location = new System.Drawing.Point(651, 165); 356 | this.label19.Name = "label19"; 357 | this.label19.Size = new System.Drawing.Size(0, 20); 358 | this.label19.TabIndex = 29; 359 | // 360 | // SELECTITEMcomboBox 361 | // 362 | this.SELECTITEMcomboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; 363 | this.SELECTITEMcomboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; 364 | this.SELECTITEMcomboBox.FormattingEnabled = true; 365 | this.SELECTITEMcomboBox.Location = new System.Drawing.Point(41, 268); 366 | this.SELECTITEMcomboBox.Name = "SELECTITEMcomboBox"; 367 | this.SELECTITEMcomboBox.Size = new System.Drawing.Size(170, 21); 368 | this.SELECTITEMcomboBox.TabIndex = 35; 369 | this.SELECTITEMcomboBox.SelectedIndexChanged += new System.EventHandler(this.SELECTITEMcomboBox_SelectedIndexChanged); 370 | // 371 | // ADDbutton 372 | // 373 | this.ADDbutton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 374 | this.ADDbutton.Location = new System.Drawing.Point(39, 409); 375 | this.ADDbutton.Name = "ADDbutton"; 376 | this.ADDbutton.Size = new System.Drawing.Size(104, 37); 377 | this.ADDbutton.TabIndex = 36; 378 | this.ADDbutton.Text = "ADD"; 379 | this.ADDbutton.UseVisualStyleBackColor = true; 380 | this.ADDbutton.Click += new System.EventHandler(this.ADDbutton_Click); 381 | // 382 | // RESETbutton 383 | // 384 | this.RESETbutton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 385 | this.RESETbutton.Location = new System.Drawing.Point(164, 409); 386 | this.RESETbutton.Name = "RESETbutton"; 387 | this.RESETbutton.Size = new System.Drawing.Size(104, 37); 388 | this.RESETbutton.TabIndex = 37; 389 | this.RESETbutton.Text = "RESET"; 390 | this.RESETbutton.UseVisualStyleBackColor = true; 391 | this.RESETbutton.Click += new System.EventHandler(this.RESETbutton_Click); 392 | // 393 | // dataGridView1 394 | // 395 | this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; 396 | this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 397 | this.dataGridView1.Location = new System.Drawing.Point(39, 455); 398 | this.dataGridView1.Name = "dataGridView1"; 399 | this.dataGridView1.Size = new System.Drawing.Size(829, 180); 400 | this.dataGridView1.TabIndex = 38; 401 | // 402 | // pictureBox1 403 | // 404 | this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 405 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); 406 | this.pictureBox1.Location = new System.Drawing.Point(-1, 22); 407 | this.pictureBox1.Name = "pictureBox1"; 408 | this.pictureBox1.Size = new System.Drawing.Size(919, 114); 409 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 410 | this.pictureBox1.TabIndex = 39; 411 | this.pictureBox1.TabStop = false; 412 | // 413 | // button1 414 | // 415 | this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 416 | this.button1.Location = new System.Drawing.Point(724, 641); 417 | this.button1.Name = "button1"; 418 | this.button1.Size = new System.Drawing.Size(144, 34); 419 | this.button1.TabIndex = 40; 420 | this.button1.Text = "CLEAR ALL"; 421 | this.button1.UseVisualStyleBackColor = true; 422 | this.button1.Click += new System.EventHandler(this.button1_Click); 423 | // 424 | // INSERTbutton 425 | // 426 | this.INSERTbutton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 427 | this.INSERTbutton.Location = new System.Drawing.Point(292, 409); 428 | this.INSERTbutton.Name = "INSERTbutton"; 429 | this.INSERTbutton.Size = new System.Drawing.Size(109, 37); 430 | this.INSERTbutton.TabIndex = 41; 431 | this.INSERTbutton.Text = "INSERT"; 432 | this.INSERTbutton.UseVisualStyleBackColor = true; 433 | this.INSERTbutton.Click += new System.EventHandler(this.INSERTbutton_Click); 434 | // 435 | // menuStrip1 436 | // 437 | this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 438 | this.fileToolStripMenuItem, 439 | this.editToolStripMenuItem, 440 | this.viewToolStripMenuItem, 441 | this.aboutToolStripMenuItem, 442 | this.detailsToolStripMenuItem}); 443 | this.menuStrip1.Location = new System.Drawing.Point(0, 0); 444 | this.menuStrip1.Name = "menuStrip1"; 445 | this.menuStrip1.Size = new System.Drawing.Size(916, 24); 446 | this.menuStrip1.TabIndex = 42; 447 | this.menuStrip1.Text = "menuStrip1"; 448 | // 449 | // fileToolStripMenuItem 450 | // 451 | this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 452 | this.addItemToolStripMenuItem, 453 | this.exitToolStripMenuItem}); 454 | this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; 455 | this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); 456 | this.fileToolStripMenuItem.Text = "File"; 457 | // 458 | // editToolStripMenuItem 459 | // 460 | this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 461 | this.editItemToolStripMenuItem}); 462 | this.editToolStripMenuItem.Name = "editToolStripMenuItem"; 463 | this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20); 464 | this.editToolStripMenuItem.Text = "Edit"; 465 | // 466 | // viewToolStripMenuItem 467 | // 468 | this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 469 | this.viewDataToolStripMenuItem}); 470 | this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; 471 | this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); 472 | this.viewToolStripMenuItem.Text = "View"; 473 | // 474 | // aboutToolStripMenuItem 475 | // 476 | this.aboutToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 477 | this.toolStripMenuItem2, 478 | this.helpToolStripMenuItem}); 479 | this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; 480 | this.aboutToolStripMenuItem.Size = new System.Drawing.Size(52, 20); 481 | this.aboutToolStripMenuItem.Text = "About"; 482 | this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); 483 | // 484 | // addItemToolStripMenuItem 485 | // 486 | this.addItemToolStripMenuItem.Name = "addItemToolStripMenuItem"; 487 | this.addItemToolStripMenuItem.Size = new System.Drawing.Size(180, 22); 488 | this.addItemToolStripMenuItem.Text = "Add Item"; 489 | this.addItemToolStripMenuItem.Click += new System.EventHandler(this.addItemToolStripMenuItem_Click); 490 | // 491 | // exitToolStripMenuItem 492 | // 493 | this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; 494 | this.exitToolStripMenuItem.Size = new System.Drawing.Size(180, 22); 495 | this.exitToolStripMenuItem.Text = "Exit"; 496 | this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); 497 | // 498 | // editItemToolStripMenuItem 499 | // 500 | this.editItemToolStripMenuItem.Name = "editItemToolStripMenuItem"; 501 | this.editItemToolStripMenuItem.Size = new System.Drawing.Size(180, 22); 502 | this.editItemToolStripMenuItem.Text = "Edit Item"; 503 | this.editItemToolStripMenuItem.Click += new System.EventHandler(this.editItemToolStripMenuItem_Click); 504 | // 505 | // viewDataToolStripMenuItem 506 | // 507 | this.viewDataToolStripMenuItem.Name = "viewDataToolStripMenuItem"; 508 | this.viewDataToolStripMenuItem.Size = new System.Drawing.Size(180, 22); 509 | this.viewDataToolStripMenuItem.Text = "View Data"; 510 | // 511 | // helpToolStripMenuItem 512 | // 513 | this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; 514 | this.helpToolStripMenuItem.Size = new System.Drawing.Size(180, 22); 515 | this.helpToolStripMenuItem.Text = "Help"; 516 | // 517 | // toolStripMenuItem2 518 | // 519 | this.toolStripMenuItem2.Name = "toolStripMenuItem2"; 520 | this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 22); 521 | this.toolStripMenuItem2.Text = " "; 522 | // 523 | // detailsToolStripMenuItem 524 | // 525 | this.detailsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 526 | this.searchRecordToolStripMenuItem}); 527 | this.detailsToolStripMenuItem.Name = "detailsToolStripMenuItem"; 528 | this.detailsToolStripMenuItem.Size = new System.Drawing.Size(54, 20); 529 | this.detailsToolStripMenuItem.Text = "Details"; 530 | this.detailsToolStripMenuItem.Click += new System.EventHandler(this.detailsToolStripMenuItem_Click); 531 | // 532 | // searchRecordToolStripMenuItem 533 | // 534 | this.searchRecordToolStripMenuItem.Name = "searchRecordToolStripMenuItem"; 535 | this.searchRecordToolStripMenuItem.Size = new System.Drawing.Size(180, 22); 536 | this.searchRecordToolStripMenuItem.Text = "Search Record"; 537 | this.searchRecordToolStripMenuItem.Click += new System.EventHandler(this.searchRecordToolStripMenuItem_Click); 538 | // 539 | // Form1 540 | // 541 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 542 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 543 | this.ClientSize = new System.Drawing.Size(916, 683); 544 | this.Controls.Add(this.INSERTbutton); 545 | this.Controls.Add(this.button1); 546 | this.Controls.Add(this.pictureBox1); 547 | this.Controls.Add(this.dataGridView1); 548 | this.Controls.Add(this.RESETbutton); 549 | this.Controls.Add(this.ADDbutton); 550 | this.Controls.Add(this.SELECTITEMcomboBox); 551 | this.Controls.Add(this.label16); 552 | this.Controls.Add(this.CHANGEtextBox); 553 | this.Controls.Add(this.label17); 554 | this.Controls.Add(this.AMOUNTPAIDtextBox); 555 | this.Controls.Add(this.label18); 556 | this.Controls.Add(this.label19); 557 | this.Controls.Add(this.label11); 558 | this.Controls.Add(this.FINALCOSTtextBox); 559 | this.Controls.Add(this.label12); 560 | this.Controls.Add(this.TOTALCOSTtextBox); 561 | this.Controls.Add(this.label13); 562 | this.Controls.Add(this.TAXtextBox); 563 | this.Controls.Add(this.label14); 564 | this.Controls.Add(this.SUBTOTALtextBox); 565 | this.Controls.Add(this.label15); 566 | this.Controls.Add(this.QUANTITYtextBox); 567 | this.Controls.Add(this.label9); 568 | this.Controls.Add(this.label10); 569 | this.Controls.Add(this.label7); 570 | this.Controls.Add(this.label8); 571 | this.Controls.Add(this.label5); 572 | this.Controls.Add(this.DISCOUNTtextBox); 573 | this.Controls.Add(this.label6); 574 | this.Controls.Add(this.UNITPRICEtextBox); 575 | this.Controls.Add(this.label4); 576 | this.Controls.Add(this.label3); 577 | this.Controls.Add(this.USERtextBox); 578 | this.Controls.Add(this.label2); 579 | this.Controls.Add(this.INVOICEtextBox); 580 | this.Controls.Add(this.menuStrip1); 581 | this.MainMenuStrip = this.menuStrip1; 582 | this.Name = "Form1"; 583 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 584 | this.Text = "Form1"; 585 | this.Activated += new System.EventHandler(this.Form1_Activated); 586 | this.Load += new System.EventHandler(this.Form1_Load); 587 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); 588 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 589 | this.menuStrip1.ResumeLayout(false); 590 | this.menuStrip1.PerformLayout(); 591 | this.ResumeLayout(false); 592 | this.PerformLayout(); 593 | 594 | } 595 | 596 | #endregion 597 | 598 | private System.Windows.Forms.TextBox INVOICEtextBox; 599 | private System.Windows.Forms.Label label2; 600 | private System.Windows.Forms.Label label3; 601 | private System.Windows.Forms.TextBox USERtextBox; 602 | private System.Windows.Forms.Label label4; 603 | private System.Windows.Forms.Label label5; 604 | private System.Windows.Forms.TextBox DISCOUNTtextBox; 605 | private System.Windows.Forms.Label label6; 606 | private System.Windows.Forms.TextBox UNITPRICEtextBox; 607 | private System.Windows.Forms.Label label7; 608 | private System.Windows.Forms.Label label8; 609 | private System.Windows.Forms.Label label9; 610 | private System.Windows.Forms.Label label10; 611 | private System.Windows.Forms.Label label11; 612 | private System.Windows.Forms.TextBox FINALCOSTtextBox; 613 | private System.Windows.Forms.Label label12; 614 | private System.Windows.Forms.TextBox TOTALCOSTtextBox; 615 | private System.Windows.Forms.Label label13; 616 | private System.Windows.Forms.TextBox TAXtextBox; 617 | private System.Windows.Forms.Label label14; 618 | private System.Windows.Forms.TextBox SUBTOTALtextBox; 619 | private System.Windows.Forms.Label label15; 620 | private System.Windows.Forms.TextBox QUANTITYtextBox; 621 | private System.Windows.Forms.Label label16; 622 | private System.Windows.Forms.TextBox CHANGEtextBox; 623 | private System.Windows.Forms.Label label17; 624 | private System.Windows.Forms.TextBox AMOUNTPAIDtextBox; 625 | private System.Windows.Forms.Label label18; 626 | private System.Windows.Forms.Label label19; 627 | private System.Windows.Forms.ComboBox SELECTITEMcomboBox; 628 | private System.Windows.Forms.Button ADDbutton; 629 | private System.Windows.Forms.Button RESETbutton; 630 | private System.Windows.Forms.DataGridView dataGridView1; 631 | private System.Windows.Forms.PictureBox pictureBox1; 632 | private System.Windows.Forms.Button button1; 633 | private System.Windows.Forms.Button INSERTbutton; 634 | private System.Windows.Forms.MenuStrip menuStrip1; 635 | private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; 636 | private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; 637 | private System.Windows.Forms.ToolStripMenuItem addItemToolStripMenuItem; 638 | private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; 639 | private System.Windows.Forms.ToolStripMenuItem editItemToolStripMenuItem; 640 | private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem; 641 | private System.Windows.Forms.ToolStripMenuItem viewDataToolStripMenuItem; 642 | private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; 643 | private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; 644 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; 645 | private System.Windows.Forms.ToolStripMenuItem detailsToolStripMenuItem; 646 | private System.Windows.Forms.ToolStripMenuItem searchRecordToolStripMenuItem; 647 | } 648 | } 649 | 650 | -------------------------------------------------------------------------------- /PandaMart/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.Configuration; 11 | using System.Data.SqlClient; 12 | 13 | 14 | namespace PandaMart 15 | { 16 | public partial class Form1 : Form 17 | { 18 | int FinalCost = 0; 19 | int SrNo = 0; 20 | int tax = 0; 21 | string cs = ConfigurationManager.ConnectionStrings["dbcs"].ConnectionString; 22 | public Form1() 23 | { 24 | InitializeComponent(); 25 | getInvoiceID(); 26 | USERtextBox.Text = Form2.username; 27 | GetItems(); 28 | dataGridView1.ColumnCount = 8; 29 | dataGridView1.Columns[0].Name = "SR NO."; 30 | dataGridView1.Columns[1].Name = "ITEMS NAME"; 31 | dataGridView1.Columns[2].Name = "UNIT PRICE"; 32 | dataGridView1.Columns[3].Name = "DISCOUNT PER ITEM"; 33 | dataGridView1.Columns[4].Name = "QUANTITY"; 34 | dataGridView1.Columns[5].Name = "SUB TOTAL"; 35 | dataGridView1.Columns[6].Name = "TAX"; 36 | dataGridView1.Columns[7].Name = "TOTAL PRICE"; 37 | } 38 | void GetItems() 39 | { 40 | SELECTITEMcomboBox.Items.Clear(); 41 | SqlConnection con = new SqlConnection(cs); 42 | String query = "select * from items_tb1"; 43 | SqlCommand cmd = new SqlCommand(query, con); 44 | con.Open(); 45 | SqlDataReader dr = cmd.ExecuteReader(); 46 | while (dr.Read()) 47 | { 48 | String item_name = dr.GetString(1); 49 | SELECTITEMcomboBox.Items.Add(item_name); 50 | 51 | } 52 | con.Close(); 53 | } 54 | 55 | void getprice() 56 | { 57 | if (SELECTITEMcomboBox.SelectedItem == null) 58 | { 59 | 60 | } 61 | else 62 | { 63 | int price = 0; 64 | SqlConnection con = new SqlConnection(cs); 65 | String query = "select item_price from items_tb1 where item_name = @name"; 66 | SqlDataAdapter sda = new SqlDataAdapter(query, con); 67 | sda.SelectCommand.Parameters.AddWithValue("@name",SELECTITEMcomboBox.SelectedItem.ToString()); 68 | DataTable data = new DataTable(); 69 | sda.Fill(data); 70 | if (data.Rows.Count > 0) 71 | { 72 | price = Convert.ToInt32(data.Rows[0]["Item_price"]); 73 | } 74 | UNITPRICEtextBox.Text = price.ToString(); 75 | } 76 | } 77 | 78 | void getdiscount() 79 | { 80 | if (SELECTITEMcomboBox.SelectedItem == null) 81 | { 82 | 83 | } 84 | else 85 | { 86 | int discount = 0; 87 | SqlConnection con = new SqlConnection(cs); 88 | String query = "select item_discount from items_tb1 where item_name = @name"; 89 | SqlDataAdapter sda = new SqlDataAdapter(query, con); 90 | sda.SelectCommand.Parameters.AddWithValue("@name", SELECTITEMcomboBox.SelectedItem.ToString()); 91 | DataTable data = new DataTable(); 92 | sda.Fill(data); 93 | if (data.Rows.Count > 0) 94 | { 95 | discount = Convert.ToInt32(data.Rows[0]["Item_discount"]); 96 | } 97 | DISCOUNTtextBox.Text = discount.ToString(); 98 | } 99 | } 100 | 101 | private void label2_Click(object sender, EventArgs e) 102 | { 103 | 104 | } 105 | 106 | private void Form1_Load(object sender, EventArgs e) 107 | { 108 | 109 | } 110 | 111 | private void label3_Click(object sender, EventArgs e) 112 | { 113 | 114 | } 115 | 116 | private void USERtextBox_TextChanged(object sender, EventArgs e) 117 | { 118 | 119 | } 120 | 121 | private void UNITPRICEtextBox_TextChanged(object sender, EventArgs e) 122 | { 123 | 124 | } 125 | 126 | private void DISCOUNTtextBox_TextChanged(object sender, EventArgs e) 127 | { 128 | 129 | } 130 | 131 | private void SUBTOTALtextBox_TextChanged(object sender, EventArgs e) 132 | { 133 | if (string.IsNullOrEmpty(SUBTOTALtextBox.Text) == true) 134 | { 135 | 136 | } 137 | else 138 | { 139 | int subTotal = Convert.ToInt32(SUBTOTALtextBox.Text); 140 | if (subTotal >= 10000) 141 | { 142 | tax = (int)(subTotal * 0.15); 143 | TAXtextBox.Text = tax.ToString(); 144 | } 145 | else if (subTotal >= 6000) 146 | { 147 | tax = (int)(subTotal * 0.10); 148 | TAXtextBox.Text = tax.ToString(); 149 | } 150 | else if (subTotal >= 3000) 151 | { 152 | tax = (int)(subTotal * 0.07); 153 | TAXtextBox.Text = tax.ToString(); 154 | } 155 | else if (subTotal >= 1000) 156 | { 157 | tax = (int)(subTotal * 0.05); 158 | TAXtextBox.Text = tax.ToString(); 159 | } 160 | else 161 | { 162 | tax = (int)(subTotal * 0.03); 163 | TAXtextBox.Text = tax.ToString(); 164 | } 165 | } 166 | } 167 | 168 | private void TAXtextBox_TextChanged(object sender, EventArgs e) 169 | { 170 | if (string.IsNullOrEmpty(TAXtextBox.Text)==true) 171 | { 172 | 173 | } 174 | else 175 | { 176 | int subTotal = Convert.ToInt32(SUBTOTALtextBox.Text); 177 | int tax = Convert.ToInt32(TAXtextBox.Text); 178 | int TotalCost = subTotal + tax; 179 | TOTALCOSTtextBox.Text = TotalCost.ToString(); 180 | } 181 | } 182 | 183 | void AddDataToGridView(string Sr_no, string item_name, string unit_price, string discount, string quantity, string sub_total, string tax, string total_cost) 184 | { 185 | String[] row = { Sr_no, item_name, unit_price, discount, quantity, sub_total, tax, total_cost }; 186 | dataGridView1.Rows.Add(row); 187 | } 188 | 189 | private void TOTALCOSTtextBox_TextChanged(object sender, EventArgs e) 190 | { 191 | 192 | } 193 | 194 | private void INVOICEtextBox_TextChanged(object sender, EventArgs e) 195 | { 196 | 197 | } 198 | 199 | private void FINALCOSTtextBox_TextChanged(object sender, EventArgs e) 200 | { 201 | 202 | } 203 | 204 | private void CHANGEtextBox_TextChanged(object sender, EventArgs e) 205 | { 206 | 207 | } 208 | 209 | private void SELECTITEMcomboBox_SelectedIndexChanged(object sender, EventArgs e) 210 | { 211 | getprice(); 212 | getdiscount(); 213 | QUANTITYtextBox.Enabled = true; 214 | } 215 | 216 | private void QUANTITYtextBox_TextChanged(object sender, EventArgs e) 217 | { 218 | if (string.IsNullOrEmpty(QUANTITYtextBox.Text) == true) 219 | { 220 | 221 | } 222 | else 223 | { 224 | int price = Convert.ToInt32(UNITPRICEtextBox.Text); 225 | int discount = Convert.ToInt32(DISCOUNTtextBox.Text); 226 | int quantity = Convert.ToInt32(QUANTITYtextBox.Text); 227 | int SubTotal = price * quantity; 228 | SubTotal = SubTotal - discount * quantity; 229 | SUBTOTALtextBox.Text = SubTotal.ToString(); 230 | } 231 | } 232 | 233 | private void ADDbutton_Click(object sender, EventArgs e) 234 | { 235 | if (SELECTITEMcomboBox.SelectedItem != null) 236 | { 237 | AddDataToGridView((++SrNo).ToString(), SELECTITEMcomboBox.SelectedItem.ToString(), UNITPRICEtextBox.Text, DISCOUNTtextBox.Text, QUANTITYtextBox.Text, SUBTOTALtextBox.Text, TAXtextBox.Text, TOTALCOSTtextBox.Text); 238 | RestControls(); 239 | CalculateFinalCost(); 240 | } 241 | else 242 | { 243 | MessageBox.Show("Please Select an Item !!"); 244 | } 245 | } 246 | 247 | void RestControls() 248 | { 249 | SELECTITEMcomboBox.SelectedItem = null; 250 | UNITPRICEtextBox.Clear(); 251 | DISCOUNTtextBox.Clear(); 252 | QUANTITYtextBox.Clear(); 253 | SUBTOTALtextBox.Clear(); 254 | TAXtextBox.Clear(); 255 | TOTALCOSTtextBox.Clear(); 256 | FINALCOSTtextBox.Clear(); 257 | AMOUNTPAIDtextBox.Clear(); 258 | CHANGEtextBox.Clear(); 259 | QUANTITYtextBox.Enabled = false; 260 | //dataGridView1.Rows.Clear(); 261 | } 262 | void CalculateFinalCost() 263 | { 264 | FinalCost = 0; 265 | for (int i = 0; i < dataGridView1.Rows.Count; i++) 266 | { 267 | FinalCost = FinalCost + Convert.ToInt32(dataGridView1.Rows[i].Cells[7].Value); 268 | } 269 | FINALCOSTtextBox.Text = FinalCost.ToString(); 270 | } 271 | 272 | private void AMOUNTPAIDtextBox_TextChanged(object sender, EventArgs e) 273 | { 274 | if(string.IsNullOrEmpty(AMOUNTPAIDtextBox.Text) == true) 275 | { 276 | 277 | } 278 | else 279 | { 280 | int AmountPaid = Convert.ToInt32(AMOUNTPAIDtextBox.Text); 281 | int FCost = Convert.ToInt32(FINALCOSTtextBox.Text.ToString()); 282 | int change = AmountPaid - FCost; 283 | CHANGEtextBox.Text = change.ToString(); 284 | } 285 | } 286 | 287 | private void RESETbutton_Click(object sender, EventArgs e) 288 | { 289 | RestControls(); 290 | } 291 | 292 | private void button1_Click(object sender, EventArgs e) 293 | { 294 | dataGridView1.Rows.Clear(); 295 | SrNo = 0; 296 | } 297 | 298 | void getInvoiceID() 299 | { 300 | SqlConnection con = new SqlConnection(cs); 301 | String query = "select invoice_id from order_master"; 302 | SqlDataAdapter sda = new SqlDataAdapter(query, con); 303 | DataTable data = new DataTable(); 304 | sda.Fill(data); 305 | if(data.Rows.Count < 1 ) 306 | { 307 | INVOICEtextBox.Text = "1"; 308 | 309 | } 310 | else 311 | { 312 | String query2 = "select MAX(invoice_id) from order_master"; 313 | SqlCommand cmd = new SqlCommand(query2, con); 314 | con.Open(); 315 | int a = Convert.ToInt32(cmd.ExecuteScalar()); 316 | a = a + 1; 317 | INVOICEtextBox.Text = a.ToString(); 318 | con.Close(); 319 | } 320 | } 321 | 322 | private void INSERTbutton_Click(object sender, EventArgs e) 323 | { 324 | SqlConnection con = new SqlConnection(cs); 325 | String query = "Insert into order_master values(@username, @datetime, @finalcost)"; 326 | SqlCommand cmd = new SqlCommand(query, con); 327 | //cmd.Parameters.AddWithValue("@invoice_id", INVOICEtextBox.Text); 328 | cmd.Parameters.AddWithValue("@username", USERtextBox.Text); 329 | cmd.Parameters.AddWithValue("@datetime",DateTime.Now.ToString()); 330 | cmd.Parameters.AddWithValue("@finalcost", FINALCOSTtextBox.Text); 331 | con.Open(); 332 | int a = cmd.ExecuteNonQuery(); 333 | if(a > 0 ) 334 | { 335 | MessageBox.Show("Insertion Successfully !!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); 336 | getInvoiceID(); 337 | RestControls(); 338 | } 339 | else 340 | { 341 | MessageBox.Show("Insertion Failed !!", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Information); 342 | } 343 | con.Close(); 344 | InsertIntoOderDetails(); 345 | } 346 | 347 | int getlastInsertedInvoice() 348 | { 349 | SqlConnection con = new SqlConnection(cs); 350 | string query = "select max(invoice_id) from order_master "; 351 | SqlCommand cmd = new SqlCommand(query,con); 352 | con.Open(); 353 | int MaxInvoiceID = Convert.ToInt32(cmd.ExecuteScalar()); 354 | con.Close() ; 355 | return MaxInvoiceID; 356 | } 357 | 358 | void InsertIntoOderDetails() 359 | { 360 | int a = 0; 361 | SqlConnection con = new SqlConnection(cs); 362 | try 363 | { 364 | for (int i = 0; i < 10; i++) 365 | { 366 | String query = "insert into order_details values(@invoice_id, @name, @price, @discount,@quantity, @subtotal, @tax, @finalcost)"; 367 | SqlCommand cmd = new SqlCommand(query, con); 368 | cmd.Parameters.AddWithValue("@invoice_id", getlastInsertedInvoice()); 369 | cmd.Parameters.AddWithValue("@name", dataGridView1.Rows[i].Cells[1].Value.ToString()); 370 | cmd.Parameters.AddWithValue("@price", dataGridView1.Rows[i].Cells[2].Value); 371 | cmd.Parameters.AddWithValue("@discount", dataGridView1.Rows[i].Cells[3].Value); 372 | cmd.Parameters.AddWithValue("@quantity", dataGridView1.Rows[i].Cells[4].Value); 373 | cmd.Parameters.AddWithValue("@subtotal", dataGridView1.Rows[i].Cells[5].Value); 374 | cmd.Parameters.AddWithValue("@tax", dataGridView1.Rows[i].Cells[6].Value); 375 | cmd.Parameters.AddWithValue("@finalcost", dataGridView1.Rows[i].Cells[7].Value); 376 | con.Open(); 377 | a = a + cmd.ExecuteNonQuery(); 378 | con.Close(); 379 | } 380 | } 381 | catch { } 382 | if(a > 0) 383 | { 384 | MessageBox.Show("Data Added is Successfully !!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); 385 | 386 | } 387 | else 388 | { 389 | MessageBox.Show("Data Added is Failed !!", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Information); 390 | } 391 | 392 | } 393 | 394 | private void aboutToolStripMenuItem_Click(object sender, EventArgs e) 395 | { 396 | 397 | } 398 | 399 | private void Form1_Activated(object sender, EventArgs e) 400 | { 401 | GetItems(); 402 | } 403 | 404 | private void addItemToolStripMenuItem_Click(object sender, EventArgs e) 405 | { 406 | Form4 adf = new Form4(); 407 | adf.ShowDialog(); 408 | } 409 | 410 | private void exitToolStripMenuItem_Click(object sender, EventArgs e) 411 | { 412 | Application.Exit(); 413 | } 414 | 415 | private void editItemToolStripMenuItem_Click(object sender, EventArgs e) 416 | { 417 | Form5 edf = new Form5(); 418 | edf.ShowDialog(); 419 | } 420 | 421 | private void detailsToolStripMenuItem_Click(object sender, EventArgs e) 422 | { 423 | 424 | } 425 | 426 | private void searchRecordToolStripMenuItem_Click(object sender, EventArgs e) 427 | { 428 | Form6 dsa = new Form6(); 429 | dsa.ShowDialog(); 430 | } 431 | } 432 | } 433 | -------------------------------------------------------------------------------- /PandaMart/Form2.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PandaMart 2 | { 3 | partial class Form2 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form2)); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.USERNAMEtextBox = new System.Windows.Forms.TextBox(); 36 | this.PASSWORDtextBox = new System.Windows.Forms.TextBox(); 37 | this.label3 = new System.Windows.Forms.Label(); 38 | this.checkBox1 = new System.Windows.Forms.CheckBox(); 39 | this.LOGINbutton = new System.Windows.Forms.Button(); 40 | this.pictureBox2 = new System.Windows.Forms.PictureBox(); 41 | this.linkLabel1 = new System.Windows.Forms.LinkLabel(); 42 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 43 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); 44 | this.SuspendLayout(); 45 | // 46 | // label1 47 | // 48 | this.label1.AutoSize = true; 49 | this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 50 | this.label1.Location = new System.Drawing.Point(305, 28); 51 | this.label1.Name = "label1"; 52 | this.label1.Size = new System.Drawing.Size(239, 39); 53 | this.label1.TabIndex = 0; 54 | this.label1.Text = "LOGIN PAGE"; 55 | // 56 | // pictureBox1 57 | // 58 | this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 59 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); 60 | this.pictureBox1.Location = new System.Drawing.Point(95, 80); 61 | this.pictureBox1.Name = "pictureBox1"; 62 | this.pictureBox1.Size = new System.Drawing.Size(258, 277); 63 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 64 | this.pictureBox1.TabIndex = 1; 65 | this.pictureBox1.TabStop = false; 66 | // 67 | // label2 68 | // 69 | this.label2.AutoSize = true; 70 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 71 | this.label2.Location = new System.Drawing.Point(408, 101); 72 | this.label2.Name = "label2"; 73 | this.label2.Size = new System.Drawing.Size(114, 20); 74 | this.label2.TabIndex = 2; 75 | this.label2.Text = "USERNAME:"; 76 | // 77 | // USERNAMEtextBox 78 | // 79 | this.USERNAMEtextBox.Location = new System.Drawing.Point(412, 133); 80 | this.USERNAMEtextBox.Name = "USERNAMEtextBox"; 81 | this.USERNAMEtextBox.Size = new System.Drawing.Size(217, 20); 82 | this.USERNAMEtextBox.TabIndex = 3; 83 | // 84 | // PASSWORDtextBox 85 | // 86 | this.PASSWORDtextBox.Location = new System.Drawing.Point(412, 211); 87 | this.PASSWORDtextBox.Name = "PASSWORDtextBox"; 88 | this.PASSWORDtextBox.Size = new System.Drawing.Size(219, 20); 89 | this.PASSWORDtextBox.TabIndex = 5; 90 | this.PASSWORDtextBox.UseSystemPasswordChar = true; 91 | this.PASSWORDtextBox.TextChanged += new System.EventHandler(this.textBox2_TextChanged); 92 | // 93 | // label3 94 | // 95 | this.label3.AutoSize = true; 96 | this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 97 | this.label3.Location = new System.Drawing.Point(408, 179); 98 | this.label3.Name = "label3"; 99 | this.label3.Size = new System.Drawing.Size(116, 20); 100 | this.label3.TabIndex = 4; 101 | this.label3.Text = "PASSWORD:"; 102 | this.label3.Click += new System.EventHandler(this.label3_Click); 103 | // 104 | // checkBox1 105 | // 106 | this.checkBox1.AutoSize = true; 107 | this.checkBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 108 | this.checkBox1.Location = new System.Drawing.Point(482, 237); 109 | this.checkBox1.Name = "checkBox1"; 110 | this.checkBox1.Size = new System.Drawing.Size(149, 22); 111 | this.checkBox1.TabIndex = 6; 112 | this.checkBox1.Text = "Show Password"; 113 | this.checkBox1.UseVisualStyleBackColor = true; 114 | this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); 115 | // 116 | // LOGINbutton 117 | // 118 | this.LOGINbutton.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 119 | this.LOGINbutton.Location = new System.Drawing.Point(412, 274); 120 | this.LOGINbutton.Name = "LOGINbutton"; 121 | this.LOGINbutton.Size = new System.Drawing.Size(219, 40); 122 | this.LOGINbutton.TabIndex = 7; 123 | this.LOGINbutton.Text = "LOGIN"; 124 | this.LOGINbutton.UseVisualStyleBackColor = true; 125 | this.LOGINbutton.Click += new System.EventHandler(this.button1_Click); 126 | // 127 | // pictureBox2 128 | // 129 | this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 130 | this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image"))); 131 | this.pictureBox2.Location = new System.Drawing.Point(24, 378); 132 | this.pictureBox2.Name = "pictureBox2"; 133 | this.pictureBox2.Size = new System.Drawing.Size(754, 106); 134 | this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 135 | this.pictureBox2.TabIndex = 8; 136 | this.pictureBox2.TabStop = false; 137 | // 138 | // linkLabel1 139 | // 140 | this.linkLabel1.AutoSize = true; 141 | this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 142 | this.linkLabel1.Location = new System.Drawing.Point(408, 337); 143 | this.linkLabel1.Name = "linkLabel1"; 144 | this.linkLabel1.Size = new System.Drawing.Size(269, 20); 145 | this.linkLabel1.TabIndex = 9; 146 | this.linkLabel1.TabStop = true; 147 | this.linkLabel1.Text = " Not Registered Yed? Click Here"; 148 | this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); 149 | // 150 | // Form2 151 | // 152 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 153 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 154 | this.ClientSize = new System.Drawing.Size(804, 496); 155 | this.Controls.Add(this.linkLabel1); 156 | this.Controls.Add(this.pictureBox2); 157 | this.Controls.Add(this.LOGINbutton); 158 | this.Controls.Add(this.checkBox1); 159 | this.Controls.Add(this.PASSWORDtextBox); 160 | this.Controls.Add(this.label3); 161 | this.Controls.Add(this.USERNAMEtextBox); 162 | this.Controls.Add(this.label2); 163 | this.Controls.Add(this.pictureBox1); 164 | this.Controls.Add(this.label1); 165 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; 166 | this.Name = "Form2"; 167 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 168 | this.Text = " "; 169 | this.Load += new System.EventHandler(this.Form2_Load); 170 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 171 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); 172 | this.ResumeLayout(false); 173 | this.PerformLayout(); 174 | 175 | } 176 | 177 | #endregion 178 | 179 | private System.Windows.Forms.Label label1; 180 | private System.Windows.Forms.PictureBox pictureBox1; 181 | private System.Windows.Forms.Label label2; 182 | private System.Windows.Forms.TextBox USERNAMEtextBox; 183 | private System.Windows.Forms.TextBox PASSWORDtextBox; 184 | private System.Windows.Forms.Label label3; 185 | private System.Windows.Forms.CheckBox checkBox1; 186 | private System.Windows.Forms.Button LOGINbutton; 187 | private System.Windows.Forms.PictureBox pictureBox2; 188 | private System.Windows.Forms.LinkLabel linkLabel1; 189 | } 190 | } -------------------------------------------------------------------------------- /PandaMart/Form2.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 | using System.Data.SqlClient; 12 | 13 | namespace PandaMart 14 | { 15 | public partial class Form2 : Form 16 | { 17 | public static string username = ""; 18 | string cs = ConfigurationManager.ConnectionStrings["dbcs"].ConnectionString; 19 | public Form2() 20 | { 21 | InitializeComponent(); 22 | } 23 | 24 | private void Form2_Load(object sender, EventArgs e) 25 | { 26 | 27 | } 28 | 29 | private void label3_Click(object sender, EventArgs e) 30 | { 31 | 32 | } 33 | 34 | private void textBox2_TextChanged(object sender, EventArgs e) 35 | { 36 | 37 | } 38 | 39 | private void button1_Click(object sender, EventArgs e) 40 | { 41 | SqlConnection con = new SqlConnection(cs); 42 | String query = "select * from signup where fname = @user and Password = @pass"; 43 | SqlCommand cmd = new SqlCommand(query, con); 44 | cmd.Parameters.AddWithValue("@user", USERNAMEtextBox.Text); 45 | cmd.Parameters.AddWithValue("@pass", PASSWORDtextBox.Text); 46 | con.Open(); 47 | SqlDataReader dr = cmd.ExecuteReader(); 48 | if (dr.HasRows == true) 49 | { 50 | MessageBox.Show("Login SuccessFull !!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); 51 | username = USERNAMEtextBox.Text; 52 | this.Hide(); 53 | Form1 MainForm = new Form1(); 54 | MainForm.ShowDialog(); 55 | } 56 | else 57 | { 58 | MessageBox.Show("Login Failed !!", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Information); 59 | } 60 | con.Close(); 61 | } 62 | 63 | private void checkBox1_CheckedChanged(object sender, EventArgs e) 64 | { 65 | bool check = checkBox1.Checked; 66 | switch (check) 67 | { 68 | case true: 69 | PASSWORDtextBox.UseSystemPasswordChar = false; 70 | break; 71 | default: 72 | PASSWORDtextBox.UseSystemPasswordChar = true; 73 | break; 74 | 75 | } 76 | } 77 | 78 | private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 79 | { 80 | Form3 Signup = new Form3(); 81 | this.Hide(); 82 | Signup.ShowDialog(); 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /PandaMart/Form3.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PandaMart 2 | { 3 | partial class Form3 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form3)); 32 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.FIRSTNAMEtextBox = new System.Windows.Forms.TextBox(); 36 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); 37 | this.label3 = new System.Windows.Forms.Label(); 38 | this.label4 = new System.Windows.Forms.Label(); 39 | this.label5 = new System.Windows.Forms.Label(); 40 | this.label6 = new System.Windows.Forms.Label(); 41 | this.label7 = new System.Windows.Forms.Label(); 42 | this.label8 = new System.Windows.Forms.Label(); 43 | this.label9 = new System.Windows.Forms.Label(); 44 | this.LASTNAMEtextBox = new System.Windows.Forms.TextBox(); 45 | this.ADDRESStextBox = new System.Windows.Forms.TextBox(); 46 | this.EMAILtextBox = new System.Windows.Forms.TextBox(); 47 | this.PASSWORDtextBox = new System.Windows.Forms.TextBox(); 48 | this.CONFIRMPASStextBox = new System.Windows.Forms.TextBox(); 49 | this.AGEnumericUpDown = new System.Windows.Forms.NumericUpDown(); 50 | this.GENDERcomboBox = new System.Windows.Forms.ComboBox(); 51 | this.SIGNUPbutton = new System.Windows.Forms.Button(); 52 | this.RESETbutton = new System.Windows.Forms.Button(); 53 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 54 | this.tableLayoutPanel1.SuspendLayout(); 55 | ((System.ComponentModel.ISupportInitialize)(this.AGEnumericUpDown)).BeginInit(); 56 | this.SuspendLayout(); 57 | // 58 | // pictureBox1 59 | // 60 | this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 61 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); 62 | this.pictureBox1.Location = new System.Drawing.Point(12, 12); 63 | this.pictureBox1.Name = "pictureBox1"; 64 | this.pictureBox1.Size = new System.Drawing.Size(834, 149); 65 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 66 | this.pictureBox1.TabIndex = 0; 67 | this.pictureBox1.TabStop = false; 68 | // 69 | // label1 70 | // 71 | this.label1.AutoSize = true; 72 | this.label1.Font = new System.Drawing.Font("Cooper Black", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 73 | this.label1.Location = new System.Drawing.Point(327, 164); 74 | this.label1.Name = "label1"; 75 | this.label1.Size = new System.Drawing.Size(256, 36); 76 | this.label1.TabIndex = 1; 77 | this.label1.Text = "SIGNUP FORM"; 78 | // 79 | // label2 80 | // 81 | this.label2.Anchor = System.Windows.Forms.AnchorStyles.Left; 82 | this.label2.AutoSize = true; 83 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 84 | this.label2.Location = new System.Drawing.Point(3, 11); 85 | this.label2.Name = "label2"; 86 | this.label2.Size = new System.Drawing.Size(106, 20); 87 | this.label2.TabIndex = 2; 88 | this.label2.Text = "First Name: "; 89 | // 90 | // FIRSTNAMEtextBox 91 | // 92 | this.FIRSTNAMEtextBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 93 | this.FIRSTNAMEtextBox.Location = new System.Drawing.Point(157, 11); 94 | this.FIRSTNAMEtextBox.Name = "FIRSTNAMEtextBox"; 95 | this.FIRSTNAMEtextBox.Size = new System.Drawing.Size(208, 20); 96 | this.FIRSTNAMEtextBox.TabIndex = 3; 97 | // 98 | // tableLayoutPanel1 99 | // 100 | this.tableLayoutPanel1.ColumnCount = 2; 101 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37.3494F)); 102 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 62.6506F)); 103 | this.tableLayoutPanel1.Controls.Add(this.AGEnumericUpDown, 1, 2); 104 | this.tableLayoutPanel1.Controls.Add(this.CONFIRMPASStextBox, 1, 7); 105 | this.tableLayoutPanel1.Controls.Add(this.PASSWORDtextBox, 1, 6); 106 | this.tableLayoutPanel1.Controls.Add(this.EMAILtextBox, 1, 5); 107 | this.tableLayoutPanel1.Controls.Add(this.ADDRESStextBox, 1, 4); 108 | this.tableLayoutPanel1.Controls.Add(this.LASTNAMEtextBox, 1, 1); 109 | this.tableLayoutPanel1.Controls.Add(this.label3, 0, 1); 110 | this.tableLayoutPanel1.Controls.Add(this.label2, 0, 0); 111 | this.tableLayoutPanel1.Controls.Add(this.FIRSTNAMEtextBox, 1, 0); 112 | this.tableLayoutPanel1.Controls.Add(this.label4, 0, 2); 113 | this.tableLayoutPanel1.Controls.Add(this.label5, 0, 3); 114 | this.tableLayoutPanel1.Controls.Add(this.label6, 0, 4); 115 | this.tableLayoutPanel1.Controls.Add(this.label7, 0, 5); 116 | this.tableLayoutPanel1.Controls.Add(this.label8, 0, 6); 117 | this.tableLayoutPanel1.Controls.Add(this.label9, 0, 7); 118 | this.tableLayoutPanel1.Controls.Add(this.GENDERcomboBox, 1, 3); 119 | this.tableLayoutPanel1.Location = new System.Drawing.Point(237, 203); 120 | this.tableLayoutPanel1.Name = "tableLayoutPanel1"; 121 | this.tableLayoutPanel1.RowCount = 8; 122 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 12.5F)); 123 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 12.5F)); 124 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 12.5F)); 125 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 12.5F)); 126 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 12.5F)); 127 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 12.5F)); 128 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 12.5F)); 129 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 12.5F)); 130 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 131 | this.tableLayoutPanel1.Size = new System.Drawing.Size(415, 343); 132 | this.tableLayoutPanel1.TabIndex = 4; 133 | // 134 | // label3 135 | // 136 | this.label3.Anchor = System.Windows.Forms.AnchorStyles.Left; 137 | this.label3.AutoSize = true; 138 | this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 139 | this.label3.Location = new System.Drawing.Point(3, 53); 140 | this.label3.Name = "label3"; 141 | this.label3.Size = new System.Drawing.Size(105, 20); 142 | this.label3.TabIndex = 4; 143 | this.label3.Text = "Last Name: "; 144 | // 145 | // label4 146 | // 147 | this.label4.Anchor = System.Windows.Forms.AnchorStyles.Left; 148 | this.label4.AutoSize = true; 149 | this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 150 | this.label4.Location = new System.Drawing.Point(3, 95); 151 | this.label4.Name = "label4"; 152 | this.label4.Size = new System.Drawing.Size(51, 20); 153 | this.label4.TabIndex = 5; 154 | this.label4.Text = "Age: "; 155 | // 156 | // label5 157 | // 158 | this.label5.Anchor = System.Windows.Forms.AnchorStyles.Left; 159 | this.label5.AutoSize = true; 160 | this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 161 | this.label5.Location = new System.Drawing.Point(3, 137); 162 | this.label5.Name = "label5"; 163 | this.label5.Size = new System.Drawing.Size(79, 20); 164 | this.label5.TabIndex = 6; 165 | this.label5.Text = "Gender: "; 166 | this.label5.Click += new System.EventHandler(this.label5_Click); 167 | // 168 | // label6 169 | // 170 | this.label6.Anchor = System.Windows.Forms.AnchorStyles.Left; 171 | this.label6.AutoSize = true; 172 | this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 173 | this.label6.Location = new System.Drawing.Point(3, 179); 174 | this.label6.Name = "label6"; 175 | this.label6.Size = new System.Drawing.Size(85, 20); 176 | this.label6.TabIndex = 7; 177 | this.label6.Text = "Address: "; 178 | // 179 | // label7 180 | // 181 | this.label7.Anchor = System.Windows.Forms.AnchorStyles.Left; 182 | this.label7.AutoSize = true; 183 | this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 184 | this.label7.Location = new System.Drawing.Point(3, 221); 185 | this.label7.Name = "label7"; 186 | this.label7.Size = new System.Drawing.Size(58, 20); 187 | this.label7.TabIndex = 8; 188 | this.label7.Text = "Email:"; 189 | // 190 | // label8 191 | // 192 | this.label8.Anchor = System.Windows.Forms.AnchorStyles.Left; 193 | this.label8.AutoSize = true; 194 | this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 195 | this.label8.Location = new System.Drawing.Point(3, 263); 196 | this.label8.Name = "label8"; 197 | this.label8.Size = new System.Drawing.Size(96, 20); 198 | this.label8.TabIndex = 9; 199 | this.label8.Text = "Password: "; 200 | // 201 | // label9 202 | // 203 | this.label9.Anchor = System.Windows.Forms.AnchorStyles.Left; 204 | this.label9.AutoSize = true; 205 | this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 206 | this.label9.Location = new System.Drawing.Point(3, 298); 207 | this.label9.Name = "label9"; 208 | this.label9.Size = new System.Drawing.Size(96, 40); 209 | this.label9.TabIndex = 10; 210 | this.label9.Text = "Confirm Password: "; 211 | // 212 | // LASTNAMEtextBox 213 | // 214 | this.LASTNAMEtextBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 215 | this.LASTNAMEtextBox.Location = new System.Drawing.Point(157, 53); 216 | this.LASTNAMEtextBox.Name = "LASTNAMEtextBox"; 217 | this.LASTNAMEtextBox.Size = new System.Drawing.Size(208, 20); 218 | this.LASTNAMEtextBox.TabIndex = 11; 219 | // 220 | // ADDRESStextBox 221 | // 222 | this.ADDRESStextBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 223 | this.ADDRESStextBox.Location = new System.Drawing.Point(157, 171); 224 | this.ADDRESStextBox.Multiline = true; 225 | this.ADDRESStextBox.Name = "ADDRESStextBox"; 226 | this.ADDRESStextBox.Size = new System.Drawing.Size(208, 36); 227 | this.ADDRESStextBox.TabIndex = 14; 228 | // 229 | // EMAILtextBox 230 | // 231 | this.EMAILtextBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 232 | this.EMAILtextBox.Location = new System.Drawing.Point(157, 221); 233 | this.EMAILtextBox.Name = "EMAILtextBox"; 234 | this.EMAILtextBox.Size = new System.Drawing.Size(208, 20); 235 | this.EMAILtextBox.TabIndex = 15; 236 | // 237 | // PASSWORDtextBox 238 | // 239 | this.PASSWORDtextBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 240 | this.PASSWORDtextBox.Location = new System.Drawing.Point(157, 263); 241 | this.PASSWORDtextBox.Name = "PASSWORDtextBox"; 242 | this.PASSWORDtextBox.Size = new System.Drawing.Size(208, 20); 243 | this.PASSWORDtextBox.TabIndex = 16; 244 | this.PASSWORDtextBox.UseSystemPasswordChar = true; 245 | // 246 | // CONFIRMPASStextBox 247 | // 248 | this.CONFIRMPASStextBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 249 | this.CONFIRMPASStextBox.Location = new System.Drawing.Point(157, 308); 250 | this.CONFIRMPASStextBox.Name = "CONFIRMPASStextBox"; 251 | this.CONFIRMPASStextBox.Size = new System.Drawing.Size(208, 20); 252 | this.CONFIRMPASStextBox.TabIndex = 17; 253 | this.CONFIRMPASStextBox.UseSystemPasswordChar = true; 254 | // 255 | // AGEnumericUpDown 256 | // 257 | this.AGEnumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; 258 | this.AGEnumericUpDown.Location = new System.Drawing.Point(157, 95); 259 | this.AGEnumericUpDown.Name = "AGEnumericUpDown"; 260 | this.AGEnumericUpDown.Size = new System.Drawing.Size(208, 20); 261 | this.AGEnumericUpDown.TabIndex = 5; 262 | // 263 | // GENDERcomboBox 264 | // 265 | this.GENDERcomboBox.Anchor = System.Windows.Forms.AnchorStyles.Left; 266 | this.GENDERcomboBox.FormattingEnabled = true; 267 | this.GENDERcomboBox.Items.AddRange(new object[] { 268 | "Male", 269 | "Female"}); 270 | this.GENDERcomboBox.Location = new System.Drawing.Point(157, 136); 271 | this.GENDERcomboBox.Name = "GENDERcomboBox"; 272 | this.GENDERcomboBox.Size = new System.Drawing.Size(208, 21); 273 | this.GENDERcomboBox.TabIndex = 18; 274 | // 275 | // SIGNUPbutton 276 | // 277 | this.SIGNUPbutton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 278 | this.SIGNUPbutton.Location = new System.Drawing.Point(352, 556); 279 | this.SIGNUPbutton.Name = "SIGNUPbutton"; 280 | this.SIGNUPbutton.Size = new System.Drawing.Size(109, 44); 281 | this.SIGNUPbutton.TabIndex = 5; 282 | this.SIGNUPbutton.Text = "SIGNUP"; 283 | this.SIGNUPbutton.UseVisualStyleBackColor = true; 284 | this.SIGNUPbutton.Click += new System.EventHandler(this.SIGNUPbutton_Click); 285 | // 286 | // RESETbutton 287 | // 288 | this.RESETbutton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 289 | this.RESETbutton.Location = new System.Drawing.Point(467, 556); 290 | this.RESETbutton.Name = "RESETbutton"; 291 | this.RESETbutton.Size = new System.Drawing.Size(109, 44); 292 | this.RESETbutton.TabIndex = 6; 293 | this.RESETbutton.Text = "RESET"; 294 | this.RESETbutton.UseVisualStyleBackColor = true; 295 | // 296 | // Form3 297 | // 298 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 299 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 300 | this.ClientSize = new System.Drawing.Size(858, 602); 301 | this.Controls.Add(this.RESETbutton); 302 | this.Controls.Add(this.SIGNUPbutton); 303 | this.Controls.Add(this.tableLayoutPanel1); 304 | this.Controls.Add(this.label1); 305 | this.Controls.Add(this.pictureBox1); 306 | this.Name = "Form3"; 307 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 308 | this.Text = "Form3"; 309 | this.Load += new System.EventHandler(this.Form3_Load); 310 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 311 | this.tableLayoutPanel1.ResumeLayout(false); 312 | this.tableLayoutPanel1.PerformLayout(); 313 | ((System.ComponentModel.ISupportInitialize)(this.AGEnumericUpDown)).EndInit(); 314 | this.ResumeLayout(false); 315 | this.PerformLayout(); 316 | 317 | } 318 | 319 | #endregion 320 | 321 | private System.Windows.Forms.PictureBox pictureBox1; 322 | private System.Windows.Forms.Label label1; 323 | private System.Windows.Forms.Label label2; 324 | private System.Windows.Forms.TextBox FIRSTNAMEtextBox; 325 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; 326 | private System.Windows.Forms.Label label3; 327 | private System.Windows.Forms.Label label4; 328 | private System.Windows.Forms.Label label5; 329 | private System.Windows.Forms.Label label6; 330 | private System.Windows.Forms.Label label7; 331 | private System.Windows.Forms.Label label8; 332 | private System.Windows.Forms.Label label9; 333 | private System.Windows.Forms.NumericUpDown AGEnumericUpDown; 334 | private System.Windows.Forms.TextBox CONFIRMPASStextBox; 335 | private System.Windows.Forms.TextBox PASSWORDtextBox; 336 | private System.Windows.Forms.TextBox EMAILtextBox; 337 | private System.Windows.Forms.TextBox ADDRESStextBox; 338 | private System.Windows.Forms.TextBox LASTNAMEtextBox; 339 | private System.Windows.Forms.ComboBox GENDERcomboBox; 340 | private System.Windows.Forms.Button SIGNUPbutton; 341 | private System.Windows.Forms.Button RESETbutton; 342 | } 343 | } -------------------------------------------------------------------------------- /PandaMart/Form3.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 | using System.Data.SqlClient; 12 | 13 | namespace PandaMart 14 | { 15 | public partial class Form3 : Form 16 | { 17 | string cs = ConfigurationManager.ConnectionStrings["dbcs"].ConnectionString; 18 | public Form3() 19 | { 20 | InitializeComponent(); 21 | } 22 | 23 | private void label5_Click(object sender, EventArgs e) 24 | { 25 | 26 | } 27 | 28 | private void radioButton1_CheckedChanged(object sender, EventArgs e) 29 | { 30 | 31 | } 32 | 33 | private void Form3_Load(object sender, EventArgs e) 34 | { 35 | 36 | } 37 | 38 | private void SIGNUPbutton_Click(object sender, EventArgs e) 39 | { 40 | SqlConnection con = new SqlConnection(cs); 41 | String query = "insert into signup values(@f_name, @l_name,@age, @gender, @address, @email, @password) "; 42 | SqlCommand cmd = new SqlCommand(query, con); 43 | cmd.Parameters.AddWithValue("@f_name", FIRSTNAMEtextBox.Text); 44 | cmd.Parameters.AddWithValue("@l_name", LASTNAMEtextBox.Text); 45 | cmd.Parameters.AddWithValue("@age", AGEnumericUpDown.Value); 46 | cmd.Parameters.AddWithValue("@gender", GENDERcomboBox.SelectedItem.ToString()); 47 | cmd.Parameters.AddWithValue("@address", ADDRESStextBox.Text); 48 | cmd.Parameters.AddWithValue("@email", EMAILtextBox.Text); 49 | cmd.Parameters.AddWithValue("@password", PASSWORDtextBox.Text); 50 | con.Open(); 51 | int a = cmd.ExecuteNonQuery(); 52 | if(a > 0) 53 | { 54 | MessageBox.Show("Registered Successfully !!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); 55 | MessageBox.Show("Username is : "+ FIRSTNAMEtextBox.Text + "\n \n" + "Password is : "+ PASSWORDtextBox.Text,"Success", MessageBoxButtons.OK, MessageBoxIcon.Information); 56 | this.Hide(); 57 | Form2 LoginForm = new Form2(); 58 | LoginForm.ShowDialog(); 59 | } 60 | else 61 | { 62 | MessageBox.Show("Registered Failed !!", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Information); 63 | } 64 | con.Close(); 65 | 66 | 67 | con.Open(); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /PandaMart/Form4.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PandaMart 2 | { 3 | partial class Form4 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form4)); 32 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 33 | this.panel1 = new System.Windows.Forms.Panel(); 34 | this.INSERTNEWITEMbutton = new System.Windows.Forms.Button(); 35 | this.DISCOUNTtextBox = new System.Windows.Forms.TextBox(); 36 | this.label4 = new System.Windows.Forms.Label(); 37 | this.PRICEtextBox = new System.Windows.Forms.TextBox(); 38 | this.label3 = new System.Windows.Forms.Label(); 39 | this.NAMEtextBox = new System.Windows.Forms.TextBox(); 40 | this.label2 = new System.Windows.Forms.Label(); 41 | this.label1 = new System.Windows.Forms.Label(); 42 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 43 | this.panel1.SuspendLayout(); 44 | this.SuspendLayout(); 45 | // 46 | // pictureBox1 47 | // 48 | this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 49 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); 50 | this.pictureBox1.Location = new System.Drawing.Point(9, 3); 51 | this.pictureBox1.Name = "pictureBox1"; 52 | this.pictureBox1.Size = new System.Drawing.Size(839, 130); 53 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 54 | this.pictureBox1.TabIndex = 0; 55 | this.pictureBox1.TabStop = false; 56 | // 57 | // panel1 58 | // 59 | this.panel1.BackColor = System.Drawing.Color.LightGray; 60 | this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 61 | this.panel1.Controls.Add(this.INSERTNEWITEMbutton); 62 | this.panel1.Controls.Add(this.DISCOUNTtextBox); 63 | this.panel1.Controls.Add(this.label4); 64 | this.panel1.Controls.Add(this.PRICEtextBox); 65 | this.panel1.Controls.Add(this.label3); 66 | this.panel1.Controls.Add(this.NAMEtextBox); 67 | this.panel1.Controls.Add(this.label2); 68 | this.panel1.Controls.Add(this.label1); 69 | this.panel1.Location = new System.Drawing.Point(211, 139); 70 | this.panel1.Name = "panel1"; 71 | this.panel1.Size = new System.Drawing.Size(465, 257); 72 | this.panel1.TabIndex = 1; 73 | // 74 | // INSERTNEWITEMbutton 75 | // 76 | this.INSERTNEWITEMbutton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 77 | this.INSERTNEWITEMbutton.Location = new System.Drawing.Point(185, 195); 78 | this.INSERTNEWITEMbutton.Name = "INSERTNEWITEMbutton"; 79 | this.INSERTNEWITEMbutton.Size = new System.Drawing.Size(127, 35); 80 | this.INSERTNEWITEMbutton.TabIndex = 7; 81 | this.INSERTNEWITEMbutton.Text = "INSERT"; 82 | this.INSERTNEWITEMbutton.UseVisualStyleBackColor = true; 83 | this.INSERTNEWITEMbutton.Click += new System.EventHandler(this.INSERTNEWITEMbutton_Click); 84 | // 85 | // DISCOUNTtextBox 86 | // 87 | this.DISCOUNTtextBox.Location = new System.Drawing.Point(177, 150); 88 | this.DISCOUNTtextBox.Name = "DISCOUNTtextBox"; 89 | this.DISCOUNTtextBox.Size = new System.Drawing.Size(200, 20); 90 | this.DISCOUNTtextBox.TabIndex = 2; 91 | // 92 | // label4 93 | // 94 | this.label4.AutoSize = true; 95 | this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 96 | this.label4.Location = new System.Drawing.Point(90, 150); 97 | this.label4.Name = "label4"; 98 | this.label4.Size = new System.Drawing.Size(85, 20); 99 | this.label4.TabIndex = 5; 100 | this.label4.Text = "Discount:"; 101 | // 102 | // PRICEtextBox 103 | // 104 | this.PRICEtextBox.Location = new System.Drawing.Point(177, 109); 105 | this.PRICEtextBox.Name = "PRICEtextBox"; 106 | this.PRICEtextBox.Size = new System.Drawing.Size(200, 20); 107 | this.PRICEtextBox.TabIndex = 1; 108 | this.PRICEtextBox.TextChanged += new System.EventHandler(this.textBox2_TextChanged); 109 | // 110 | // label3 111 | // 112 | this.label3.AutoSize = true; 113 | this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 114 | this.label3.Location = new System.Drawing.Point(91, 109); 115 | this.label3.Name = "label3"; 116 | this.label3.Size = new System.Drawing.Size(54, 20); 117 | this.label3.TabIndex = 3; 118 | this.label3.Text = "Price:"; 119 | // 120 | // NAMEtextBox 121 | // 122 | this.NAMEtextBox.Location = new System.Drawing.Point(177, 68); 123 | this.NAMEtextBox.Name = "NAMEtextBox"; 124 | this.NAMEtextBox.Size = new System.Drawing.Size(200, 20); 125 | this.NAMEtextBox.TabIndex = 0; 126 | // 127 | // label2 128 | // 129 | this.label2.AutoSize = true; 130 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 131 | this.label2.Location = new System.Drawing.Point(92, 68); 132 | this.label2.Name = "label2"; 133 | this.label2.Size = new System.Drawing.Size(60, 20); 134 | this.label2.TabIndex = 1; 135 | this.label2.Text = "Name:"; 136 | // 137 | // label1 138 | // 139 | this.label1.AutoSize = true; 140 | this.label1.Font = new System.Drawing.Font("Cooper Black", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 141 | this.label1.Location = new System.Drawing.Point(165, 15); 142 | this.label1.Name = "label1"; 143 | this.label1.Size = new System.Drawing.Size(161, 31); 144 | this.label1.TabIndex = 0; 145 | this.label1.Text = "ADD ITEM"; 146 | this.label1.Click += new System.EventHandler(this.label1_Click); 147 | // 148 | // Form4 149 | // 150 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 151 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 152 | this.ClientSize = new System.Drawing.Size(855, 484); 153 | this.Controls.Add(this.panel1); 154 | this.Controls.Add(this.pictureBox1); 155 | this.Name = "Form4"; 156 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 157 | this.Text = "Form4"; 158 | this.Load += new System.EventHandler(this.Form4_Load); 159 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 160 | this.panel1.ResumeLayout(false); 161 | this.panel1.PerformLayout(); 162 | this.ResumeLayout(false); 163 | 164 | } 165 | 166 | #endregion 167 | 168 | private System.Windows.Forms.PictureBox pictureBox1; 169 | private System.Windows.Forms.Panel panel1; 170 | private System.Windows.Forms.Button INSERTNEWITEMbutton; 171 | private System.Windows.Forms.TextBox DISCOUNTtextBox; 172 | private System.Windows.Forms.Label label4; 173 | private System.Windows.Forms.TextBox PRICEtextBox; 174 | private System.Windows.Forms.Label label3; 175 | private System.Windows.Forms.TextBox NAMEtextBox; 176 | private System.Windows.Forms.Label label2; 177 | private System.Windows.Forms.Label label1; 178 | } 179 | } -------------------------------------------------------------------------------- /PandaMart/Form4.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 | using System.Data.SqlClient; 12 | 13 | namespace PandaMart 14 | { 15 | public partial class Form4 : Form 16 | { 17 | string cs = ConfigurationManager.ConnectionStrings["dbcs"].ConnectionString; 18 | public Form4() 19 | { 20 | InitializeComponent(); 21 | } 22 | 23 | private void label1_Click(object sender, EventArgs e) 24 | { 25 | 26 | } 27 | 28 | private void textBox2_TextChanged(object sender, EventArgs e) 29 | { 30 | 31 | } 32 | 33 | private void Form4_Load(object sender, EventArgs e) 34 | { 35 | 36 | } 37 | 38 | private void INSERTNEWITEMbutton_Click(object sender, EventArgs e) 39 | { 40 | SqlConnection con = new SqlConnection(cs); 41 | String query = "insert into items_tb1 values(@name, @price, @discount) "; 42 | SqlCommand cmd = new SqlCommand(query, con); 43 | cmd.Parameters.AddWithValue("@name", NAMEtextBox.Text); 44 | cmd.Parameters.AddWithValue("@price", PRICEtextBox.Text); 45 | cmd.Parameters.AddWithValue("@discount", DISCOUNTtextBox.Text); 46 | 47 | con.Open(); 48 | int a = cmd.ExecuteNonQuery(); 49 | if (a > 0) 50 | { 51 | MessageBox.Show("Item Added Successfully !!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); 52 | NAMEtextBox.Clear(); 53 | PRICEtextBox.Clear(); 54 | DISCOUNTtextBox.Clear(); 55 | NAMEtextBox.Focus(); 56 | } 57 | else 58 | { 59 | MessageBox.Show("Item not Added !!", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Information); 60 | } 61 | con.Close(); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /PandaMart/Form5.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PandaMart 2 | { 3 | partial class Form5 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form5)); 32 | this.panel1 = new System.Windows.Forms.Panel(); 33 | this.UPDATEbutton = new System.Windows.Forms.Button(); 34 | this.DISCOUNTtextBox = new System.Windows.Forms.TextBox(); 35 | this.label4 = new System.Windows.Forms.Label(); 36 | this.PRICEtextBox = new System.Windows.Forms.TextBox(); 37 | this.label3 = new System.Windows.Forms.Label(); 38 | this.NAMEtextBox = new System.Windows.Forms.TextBox(); 39 | this.label2 = new System.Windows.Forms.Label(); 40 | this.label1 = new System.Windows.Forms.Label(); 41 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 42 | this.DELETEbutton = new System.Windows.Forms.Button(); 43 | this.dataGridView1 = new System.Windows.Forms.DataGridView(); 44 | this.IDtextBox = new System.Windows.Forms.TextBox(); 45 | this.label5 = new System.Windows.Forms.Label(); 46 | this.panel1.SuspendLayout(); 47 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 48 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); 49 | this.SuspendLayout(); 50 | // 51 | // panel1 52 | // 53 | this.panel1.BackColor = System.Drawing.Color.LightGray; 54 | this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 55 | this.panel1.Controls.Add(this.IDtextBox); 56 | this.panel1.Controls.Add(this.label5); 57 | this.panel1.Controls.Add(this.DELETEbutton); 58 | this.panel1.Controls.Add(this.UPDATEbutton); 59 | this.panel1.Controls.Add(this.DISCOUNTtextBox); 60 | this.panel1.Controls.Add(this.label4); 61 | this.panel1.Controls.Add(this.PRICEtextBox); 62 | this.panel1.Controls.Add(this.label3); 63 | this.panel1.Controls.Add(this.NAMEtextBox); 64 | this.panel1.Controls.Add(this.label2); 65 | this.panel1.Controls.Add(this.label1); 66 | this.panel1.Location = new System.Drawing.Point(228, 135); 67 | this.panel1.Name = "panel1"; 68 | this.panel1.Size = new System.Drawing.Size(423, 253); 69 | this.panel1.TabIndex = 3; 70 | this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); 71 | // 72 | // UPDATEbutton 73 | // 74 | this.UPDATEbutton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 75 | this.UPDATEbutton.Location = new System.Drawing.Point(96, 201); 76 | this.UPDATEbutton.Name = "UPDATEbutton"; 77 | this.UPDATEbutton.Size = new System.Drawing.Size(127, 35); 78 | this.UPDATEbutton.TabIndex = 7; 79 | this.UPDATEbutton.Text = "UPDATE"; 80 | this.UPDATEbutton.UseVisualStyleBackColor = true; 81 | this.UPDATEbutton.Click += new System.EventHandler(this.INSERTNEWITEMbutton_Click); 82 | // 83 | // DISCOUNTtextBox 84 | // 85 | this.DISCOUNTtextBox.Location = new System.Drawing.Point(156, 158); 86 | this.DISCOUNTtextBox.Name = "DISCOUNTtextBox"; 87 | this.DISCOUNTtextBox.Size = new System.Drawing.Size(200, 20); 88 | this.DISCOUNTtextBox.TabIndex = 2; 89 | // 90 | // label4 91 | // 92 | this.label4.AutoSize = true; 93 | this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 94 | this.label4.Location = new System.Drawing.Point(69, 158); 95 | this.label4.Name = "label4"; 96 | this.label4.Size = new System.Drawing.Size(85, 20); 97 | this.label4.TabIndex = 5; 98 | this.label4.Text = "Discount:"; 99 | // 100 | // PRICEtextBox 101 | // 102 | this.PRICEtextBox.Location = new System.Drawing.Point(157, 122); 103 | this.PRICEtextBox.Name = "PRICEtextBox"; 104 | this.PRICEtextBox.Size = new System.Drawing.Size(200, 20); 105 | this.PRICEtextBox.TabIndex = 1; 106 | // 107 | // label3 108 | // 109 | this.label3.AutoSize = true; 110 | this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 111 | this.label3.Location = new System.Drawing.Point(71, 122); 112 | this.label3.Name = "label3"; 113 | this.label3.Size = new System.Drawing.Size(54, 20); 114 | this.label3.TabIndex = 3; 115 | this.label3.Text = "Price:"; 116 | // 117 | // NAMEtextBox 118 | // 119 | this.NAMEtextBox.Location = new System.Drawing.Point(156, 90); 120 | this.NAMEtextBox.Name = "NAMEtextBox"; 121 | this.NAMEtextBox.Size = new System.Drawing.Size(200, 20); 122 | this.NAMEtextBox.TabIndex = 0; 123 | // 124 | // label2 125 | // 126 | this.label2.AutoSize = true; 127 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 128 | this.label2.Location = new System.Drawing.Point(71, 90); 129 | this.label2.Name = "label2"; 130 | this.label2.Size = new System.Drawing.Size(60, 20); 131 | this.label2.TabIndex = 1; 132 | this.label2.Text = "Name:"; 133 | // 134 | // label1 135 | // 136 | this.label1.AutoSize = true; 137 | this.label1.Font = new System.Drawing.Font("Cooper Black", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 138 | this.label1.Location = new System.Drawing.Point(144, 9); 139 | this.label1.Name = "label1"; 140 | this.label1.Size = new System.Drawing.Size(167, 31); 141 | this.label1.TabIndex = 0; 142 | this.label1.Text = "EDIT ITEM"; 143 | // 144 | // pictureBox1 145 | // 146 | this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 147 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); 148 | this.pictureBox1.Location = new System.Drawing.Point(5, 1); 149 | this.pictureBox1.Name = "pictureBox1"; 150 | this.pictureBox1.Size = new System.Drawing.Size(852, 130); 151 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 152 | this.pictureBox1.TabIndex = 2; 153 | this.pictureBox1.TabStop = false; 154 | // 155 | // DELETEbutton 156 | // 157 | this.DELETEbutton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 158 | this.DELETEbutton.Location = new System.Drawing.Point(229, 201); 159 | this.DELETEbutton.Name = "DELETEbutton"; 160 | this.DELETEbutton.Size = new System.Drawing.Size(127, 35); 161 | this.DELETEbutton.TabIndex = 8; 162 | this.DELETEbutton.Text = "DELETE"; 163 | this.DELETEbutton.UseVisualStyleBackColor = true; 164 | this.DELETEbutton.Click += new System.EventHandler(this.DELETEbutton_Click); 165 | // 166 | // dataGridView1 167 | // 168 | this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; 169 | this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 170 | this.dataGridView1.Location = new System.Drawing.Point(169, 392); 171 | this.dataGridView1.Name = "dataGridView1"; 172 | this.dataGridView1.Size = new System.Drawing.Size(543, 209); 173 | this.dataGridView1.TabIndex = 4; 174 | this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); 175 | this.dataGridView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGrideView1_MouseDoubleClick); 176 | // 177 | // IDtextBox 178 | // 179 | this.IDtextBox.Location = new System.Drawing.Point(156, 56); 180 | this.IDtextBox.Name = "IDtextBox"; 181 | this.IDtextBox.ReadOnly = true; 182 | this.IDtextBox.Size = new System.Drawing.Size(200, 20); 183 | this.IDtextBox.TabIndex = 9; 184 | // 185 | // label5 186 | // 187 | this.label5.AutoSize = true; 188 | this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 189 | this.label5.Location = new System.Drawing.Point(71, 56); 190 | this.label5.Name = "label5"; 191 | this.label5.Size = new System.Drawing.Size(33, 20); 192 | this.label5.TabIndex = 10; 193 | this.label5.Text = "ID:"; 194 | // 195 | // Form5 196 | // 197 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 198 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 199 | this.ClientSize = new System.Drawing.Size(863, 605); 200 | this.Controls.Add(this.dataGridView1); 201 | this.Controls.Add(this.panel1); 202 | this.Controls.Add(this.pictureBox1); 203 | this.Name = "Form5"; 204 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 205 | this.Text = "Form5"; 206 | this.Load += new System.EventHandler(this.Form5_Load); 207 | this.panel1.ResumeLayout(false); 208 | this.panel1.PerformLayout(); 209 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 210 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); 211 | this.ResumeLayout(false); 212 | 213 | } 214 | 215 | #endregion 216 | 217 | private System.Windows.Forms.Panel panel1; 218 | private System.Windows.Forms.Button UPDATEbutton; 219 | private System.Windows.Forms.TextBox DISCOUNTtextBox; 220 | private System.Windows.Forms.Label label4; 221 | private System.Windows.Forms.TextBox PRICEtextBox; 222 | private System.Windows.Forms.Label label3; 223 | private System.Windows.Forms.TextBox NAMEtextBox; 224 | private System.Windows.Forms.Label label2; 225 | private System.Windows.Forms.Label label1; 226 | private System.Windows.Forms.PictureBox pictureBox1; 227 | private System.Windows.Forms.Button DELETEbutton; 228 | private System.Windows.Forms.DataGridView dataGridView1; 229 | private System.Windows.Forms.TextBox IDtextBox; 230 | private System.Windows.Forms.Label label5; 231 | } 232 | } -------------------------------------------------------------------------------- /PandaMart/Form5.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 | using System.Data.SqlClient; 12 | 13 | 14 | namespace PandaMart 15 | { 16 | public partial class Form5 : Form 17 | { 18 | string cs = ConfigurationManager.ConnectionStrings["dbcs"].ConnectionString; 19 | public Form5() 20 | { 21 | InitializeComponent(); 22 | BindGridView(); 23 | } 24 | 25 | void BindGridView() 26 | { 27 | SqlConnection con = new SqlConnection(cs); 28 | String query = "select * from items_tb1"; 29 | SqlDataAdapter sda = new SqlDataAdapter(query, con); 30 | DataTable data = new DataTable(); 31 | sda.Fill(data); 32 | dataGridView1.DataSource = data; 33 | 34 | } 35 | 36 | 37 | private void INSERTNEWITEMbutton_Click(object sender, EventArgs e) 38 | { 39 | SqlConnection con = new SqlConnection(cs); 40 | String query = "update items_tb1 set item_name = @name, item_price = @price, item_discount = @discount where item_id = @ID "; 41 | SqlCommand cmd = new SqlCommand(query, con); 42 | cmd.Parameters.AddWithValue("@ID", IDtextBox.Text); 43 | cmd.Parameters.AddWithValue("@name", NAMEtextBox.Text); 44 | cmd.Parameters.AddWithValue("@price", PRICEtextBox.Text); 45 | cmd.Parameters.AddWithValue("@discount", DISCOUNTtextBox.Text); 46 | 47 | con.Open(); 48 | int a = cmd.ExecuteNonQuery(); 49 | if (a > 0) 50 | { 51 | MessageBox.Show("Item Updated Successfully !!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); 52 | BindGridView(); 53 | IDtextBox.Clear(); 54 | NAMEtextBox.Clear(); 55 | PRICEtextBox.Clear(); 56 | DISCOUNTtextBox.Clear(); 57 | NAMEtextBox.Focus(); 58 | } 59 | else 60 | { 61 | MessageBox.Show("Item is not Updated !!", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Information); 62 | } 63 | con.Close(); 64 | } 65 | 66 | private void Form5_Load(object sender, EventArgs e) 67 | { 68 | 69 | } 70 | 71 | private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) 72 | { 73 | 74 | } 75 | 76 | private void dataGrideView1_MouseDoubleClick(object sender, MouseEventArgs e) 77 | { 78 | IDtextBox.Text = dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); 79 | NAMEtextBox.Text = dataGridView1.SelectedRows[0].Cells[1].Value.ToString(); 80 | PRICEtextBox.Text = dataGridView1.SelectedRows[0].Cells[2].Value.ToString(); 81 | DISCOUNTtextBox.Text = dataGridView1.SelectedRows[0].Cells[3].Value.ToString(); 82 | 83 | } 84 | 85 | private void panel1_Paint(object sender, PaintEventArgs e) 86 | { 87 | 88 | } 89 | 90 | private void DELETEbutton_Click(object sender, EventArgs e) 91 | { 92 | SqlConnection con = new SqlConnection(cs); 93 | String query = "delete from items_tb1 where item_id = @ID "; 94 | SqlCommand cmd = new SqlCommand(query, con); 95 | cmd.Parameters.AddWithValue("@ID", IDtextBox.Text); 96 | 97 | con.Open(); 98 | int a = cmd.ExecuteNonQuery(); 99 | if (a > 0) 100 | { 101 | MessageBox.Show("Item Deleted Successfully !!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); 102 | BindGridView(); 103 | IDtextBox.Clear(); 104 | NAMEtextBox.Clear(); 105 | PRICEtextBox.Clear(); 106 | DISCOUNTtextBox.Clear(); 107 | NAMEtextBox.Focus(); 108 | } 109 | else 110 | { 111 | MessageBox.Show("Item is not Deleted !!", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Information); 112 | } 113 | con.Close(); 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /PandaMart/Form6.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PandaMart 2 | { 3 | partial class Form6 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form6)); 32 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 33 | this.dataGridView1 = new System.Windows.Forms.DataGridView(); 34 | this.label1 = new System.Windows.Forms.Label(); 35 | this.SEARCHtextBox = new System.Windows.Forms.TextBox(); 36 | this.SEARCHbutton = new System.Windows.Forms.Button(); 37 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 38 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); 39 | this.SuspendLayout(); 40 | // 41 | // pictureBox1 42 | // 43 | this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 44 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); 45 | this.pictureBox1.Location = new System.Drawing.Point(0, 0); 46 | this.pictureBox1.Name = "pictureBox1"; 47 | this.pictureBox1.Size = new System.Drawing.Size(919, 114); 48 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 49 | this.pictureBox1.TabIndex = 40; 50 | this.pictureBox1.TabStop = false; 51 | // 52 | // dataGridView1 53 | // 54 | this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; 55 | this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 56 | this.dataGridView1.Location = new System.Drawing.Point(104, 321); 57 | this.dataGridView1.Name = "dataGridView1"; 58 | this.dataGridView1.Size = new System.Drawing.Size(739, 218); 59 | this.dataGridView1.TabIndex = 41; 60 | this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); 61 | // 62 | // label1 63 | // 64 | this.label1.AutoSize = true; 65 | this.label1.Font = new System.Drawing.Font("Cooper Black", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 66 | this.label1.Location = new System.Drawing.Point(371, 156); 67 | this.label1.Name = "label1"; 68 | this.label1.Size = new System.Drawing.Size(197, 24); 69 | this.label1.TabIndex = 42; 70 | this.label1.Text = "Search by Invoice"; 71 | // 72 | // SEARCHtextBox 73 | // 74 | this.SEARCHtextBox.Location = new System.Drawing.Point(355, 209); 75 | this.SEARCHtextBox.Name = "SEARCHtextBox"; 76 | this.SEARCHtextBox.Size = new System.Drawing.Size(231, 20); 77 | this.SEARCHtextBox.TabIndex = 43; 78 | this.SEARCHtextBox.TextChanged += new System.EventHandler(this.textBox1_TextChanged); 79 | // 80 | // SEARCHbutton 81 | // 82 | this.SEARCHbutton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 83 | this.SEARCHbutton.Location = new System.Drawing.Point(412, 260); 84 | this.SEARCHbutton.Name = "SEARCHbutton"; 85 | this.SEARCHbutton.Size = new System.Drawing.Size(131, 35); 86 | this.SEARCHbutton.TabIndex = 44; 87 | this.SEARCHbutton.Text = "SEARCH "; 88 | this.SEARCHbutton.UseVisualStyleBackColor = true; 89 | this.SEARCHbutton.Click += new System.EventHandler(this.SEARCHbutton_Click); 90 | // 91 | // Form6 92 | // 93 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 94 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 95 | this.ClientSize = new System.Drawing.Size(915, 544); 96 | this.Controls.Add(this.SEARCHbutton); 97 | this.Controls.Add(this.SEARCHtextBox); 98 | this.Controls.Add(this.label1); 99 | this.Controls.Add(this.dataGridView1); 100 | this.Controls.Add(this.pictureBox1); 101 | this.Name = "Form6"; 102 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 103 | this.Text = "Form6"; 104 | this.Load += new System.EventHandler(this.Form6_Load); 105 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 106 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); 107 | this.ResumeLayout(false); 108 | this.PerformLayout(); 109 | 110 | } 111 | 112 | #endregion 113 | 114 | private System.Windows.Forms.PictureBox pictureBox1; 115 | private System.Windows.Forms.DataGridView dataGridView1; 116 | private System.Windows.Forms.Label label1; 117 | private System.Windows.Forms.TextBox SEARCHtextBox; 118 | private System.Windows.Forms.Button SEARCHbutton; 119 | } 120 | } -------------------------------------------------------------------------------- /PandaMart/Form6.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 | using System.Data.SqlClient; 12 | 13 | namespace PandaMart 14 | { 15 | public partial class Form6 : Form 16 | { 17 | string cs = ConfigurationManager.ConnectionStrings["dbcs"].ConnectionString; 18 | public Form6() 19 | { 20 | InitializeComponent(); 21 | BindGridView(); 22 | } 23 | 24 | void BindGridView() 25 | { 26 | SqlConnection con = new SqlConnection(cs); 27 | String query = "sp_getBothTableData"; 28 | SqlCommand cmd = new SqlCommand(query, con); 29 | cmd.CommandType = CommandType.StoredProcedure; 30 | SqlDataAdapter sda = new SqlDataAdapter(cmd); 31 | sda.SelectCommand = cmd; 32 | DataTable data = new DataTable(); 33 | sda.Fill(data); 34 | dataGridView1.DataSource = data; 35 | 36 | } 37 | 38 | private void Form6_Load(object sender, EventArgs e) 39 | { 40 | 41 | } 42 | 43 | private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) 44 | { 45 | 46 | } 47 | 48 | private void textBox1_TextChanged(object sender, EventArgs e) 49 | { 50 | 51 | } 52 | 53 | private void SEARCHbutton_Click(object sender, EventArgs e) 54 | { 55 | try 56 | { 57 | SqlConnection con = new SqlConnection(cs); 58 | String query = "sp_getBothTableDataByInvoice"; 59 | SqlCommand cmd = new SqlCommand(query, con); 60 | cmd.CommandType = CommandType.StoredProcedure; 61 | cmd.Parameters.AddWithValue("@invoiceID", SEARCHtextBox.Text); 62 | SqlDataAdapter sda = new SqlDataAdapter(cmd); 63 | //sda.SelectCommand.Parameters.AddWithValue("@invoiceID", SEARCHbutton.Text); 64 | sda.SelectCommand = cmd; 65 | DataTable data = new DataTable(); 66 | sda.Fill(data); 67 | dataGridView1.DataSource = data; 68 | } 69 | catch 70 | { 71 | 72 | } 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /PandaMart/Form7.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PandaMart 2 | { 3 | partial class Form7 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 33 | this.ClientSize = new System.Drawing.Size(800, 450); 34 | this.Text = "Form7"; 35 | } 36 | 37 | #endregion 38 | } 39 | } -------------------------------------------------------------------------------- /PandaMart/Form7.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 PandaMart 12 | { 13 | public partial class Form7 : Form 14 | { 15 | public Form7() 16 | { 17 | InitializeComponent(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /PandaMart/PandaMart.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {C8372F71-5146-4770-B4E6-BAD2A59915FE} 8 | WinExe 9 | PandaMart 10 | PandaMart 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 | Form 52 | 53 | 54 | Form1.cs 55 | 56 | 57 | Form 58 | 59 | 60 | Form2.cs 61 | 62 | 63 | Form 64 | 65 | 66 | Form3.cs 67 | 68 | 69 | Form 70 | 71 | 72 | Form4.cs 73 | 74 | 75 | Form 76 | 77 | 78 | Form5.cs 79 | 80 | 81 | Form 82 | 83 | 84 | Form6.cs 85 | 86 | 87 | Form 88 | 89 | 90 | Form7.cs 91 | 92 | 93 | 94 | 95 | Form1.cs 96 | 97 | 98 | Form2.cs 99 | 100 | 101 | Form3.cs 102 | 103 | 104 | Form4.cs 105 | 106 | 107 | Form5.cs 108 | 109 | 110 | Form6.cs 111 | 112 | 113 | ResXFileCodeGenerator 114 | Resources.Designer.cs 115 | Designer 116 | 117 | 118 | True 119 | Resources.resx 120 | 121 | 122 | SettingsSingleFileGenerator 123 | Settings.Designer.cs 124 | 125 | 126 | True 127 | Settings.settings 128 | True 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /PandaMart/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 PandaMart 8 | { 9 | internal 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 Form2()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /PandaMart/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("PandaMart")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PandaMart")] 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("c8372f71-5146-4770-b4e6-bad2a59915fe")] 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 | -------------------------------------------------------------------------------- /PandaMart/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 PandaMart.Properties 12 | { 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 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PandaMart.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /PandaMart/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 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /PandaMart/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 PandaMart.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /PandaMart/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PandaMartDB.sql: -------------------------------------------------------------------------------- 1 | use Mustafa; 2 | 3 | Create Table items_tb1( 4 | item_id int primary key identity(1,1), 5 | item_name varchar(50), 6 | item_price int, 7 | item_discount int, 8 | ); 9 | select*from items_tb1; 10 | 11 | insert into items_tb1 values ('Lipton Tea Lagr e',350,20), ('Lipton Tea Small',250,10), ('EveryDay Lagre',1350,50), ('EveryDay Small',1000,20); 12 | insert into items_tb1 values ('Lays',50,5); 13 | 14 | 15 | CREATE TABLE login( 16 | id int primary key identity(1,1), 17 | username varchar(50), 18 | password varchar(50) 19 | ); 20 | 21 | insert into login values ('Mustafa','Mus@123'); 22 | select * from login; 23 | 24 | CREATE table signup( 25 | user_id int primary key identity(1,1), 26 | fname varchar(50), 27 | lname varchar(50), 28 | age int, 29 | gender varchar(50), 30 | address varchar(60), 31 | email varchar(50), 32 | Password varchar(50) 33 | ); 34 | 35 | select * from signup 36 | 37 | create table order_master( 38 | invoice_id int primary key identity(1,1), 39 | username varchar(40), 40 | datetime varchar(50), 41 | finalcost int 42 | ); 43 | insert into signup values ('Salman', 'Khan', 32, 'Male', 'India', 'Salman32@gmail.com', 'Salman32@'); 44 | 45 | select * from order_master 46 | 47 | create table order_details( 48 | order_details_id int primary key identity, 49 | innvoice_id int foreign key references order_master(invoice_id), 50 | items_name varchar(50), 51 | unit_rice int, 52 | discount_per_item int, 53 | quantity int, 54 | subtotal int, 55 | tax int, 56 | totalcost int 57 | ); 58 | 59 | select * from order_details 60 | 61 | create procedure sp_getBothTableData 62 | as 63 | begin 64 | select A.invoice_id, A.username, A.[datetime], B.items_name, B.unit_rice, B.discount_per_item, B.quantity, B.subtotal, B.tax, B.totalcost, A.finalCost 65 | from order_master as A 66 | inner join order_details as B 67 | on A.invoice_id = B.innvoice_id; 68 | end 69 | 70 | create procedure sp_getBothTableDataByInvoice 71 | @invoiceID int 72 | as 73 | begin 74 | select A.invoice_id, A.username, A.[datetime], B.items_name, B.unit_rice, B.discount_per_item, B.quantity, B.subtotal, B.tax, B.totalcost, A.finalCost 75 | from order_master as A 76 | inner join order_details as B 77 | on A.invoice_id = B.innvoice_id where A.invoice_id = @invoiceID 78 | end 79 | --------------------------------------------------------------------------------