Cafe Management System in Csharp (C#, Visual Studio, MsSQL Server) Complete Project (Step by Step)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome to my youtube channel this is a quick overview of cafe management system and i have already started the project here you can see that this is the login here first thing you observe that we have to enter one username and password in order to log so we have two options either we enter username and password or directly we can click on this continue as yet let me show you first what happened when i click on this continue my script let me show you here i have clicked on this and we moved to the dashboard and here we see a interface like this and here we have only one button to place order now i'm going to click on this okay so we have this on our screen here we can see we have this category with this category we can select the items i have added only four items for now you can add multiples inside this so i'm going to select one soft ring okay so we have software one so this is a search box when i type a name poke or when i type something wrong then that will be removed so you can search with the help of this search box so let me show you in the south india i have added two items so if if we have multiple items so then we can search from that i'm going to write dosa you can see this we have find those up and when you delete it all the data will be visible so when you click on this the item name is automatically fill inside this box and the price is also filled inside this box this is the quantity with the help of this button you can set the quantity if i need one the price will be automatically set total is 25 when i move this one to two it will be the price will increase and decrease on the basis of this here you can see this okay so one more important thing is that you cannot make changes inside this one okay here you can see this whatever if i try to write inside this one nothing happens so i'm going to add this card when i click on this here you can see that those are 75 quantities 2 and price and total amount is also updated i'm going to add idli 2 and i'm going to give you one and click on this now you can see this idly is also added now i want some form software poke and click i need three of them or four i guess click on and this is a price range free i want to remove the italy so how to do that when i click on this and click on remove it will be removed and price is also decreased so in the same way it work so i want one on this thailand so select this and click one click on add to cart and here you can see this everything is now added the next thing would have is we have one button to print the bid so when i click on the print here you can see this it's pop-up that look like this which is a software default software okay so now what do we have to do is we have to just click on this print you're gonna see this page one of customer and it's showing where you want to print the bill so i want to save the bill over here so i'm going to fill fill and when i click on save and it's printing and after the printing is done and the pdf is saved here you will see this the derived from this detected view is now clear so that you can add new stuff for the user and the payment the total has also reset with zero so let me show you if that fill is saved in to my local computer or not so i have just opened that so desktop and my full name is bills yeah here it is and the fifth one so i'm going to open this here you can see this customer bill we have added dosa point it is 2 and price is one fifty four fifty twenty four two hundred on this sally at last we have added eight fifty one and eight fifty and the total price total payable amount is twelve hundred here you can see that this is a period five you can print it later or you can save this for further use so here you can see this now pdf is also generating so i'm going to show you each of these stuff in very detailed and precise manner so what you have to do is first you have to subscribe and just stay tuned after this let me move back to our project and here you can see this we have one option to log out so i'm going to log out when i click on this we move to this after this i'm going to enter or login with the username and password my username is days and my password is pass and when i log in here you can see this we have now multiple options that is please order add items update items remove items so when i click on this yeah i have shown you how this works everything after this what i'm going to do is i'm going to add one item so i'm going to add one stop drink so i'm going to add something sprite if spilling is mistaken then sorry for that okay so i'm going to add the amount for this one just write it now of course caustic nowadays so i'm going to add this one 150 and add item data process successfully it means that data is saved click on ok and here you can see this everything is clear now check that if this the category software we have right or not here you can see this we have it it's provide 150 yeah this works that item is now working suppose we have mentioned the wrong price for the sprite okay so we have to search for sprite now okay yeah here we have click on this and the data is filled over here if you want to change anything you have to just do that like this uh i'm going to set this one to 120 and click on update this will update the data and it says this refresh and it can observe that sprite software and price is 120. the same way you can move over here and search for this software and click on the sprite now the price is 120. you cannot make things inside that so this one is working fine the same way you can also change the name of this so i'm going to change the name of this which okay i'm going to change this one to which spatial file so create realize and when you update this yeah pages specialty and name is also being updated in the same if you can update the category as well the next thing what i'm going to do is i'm going to remove item so what i have added now is nothing but sprite here you can see that the sprite is visible so i want to remove this item so when you click on this this will ask for user if you wanted to leave this or not so here we have one more option if you don't know how to delete this item for the first time you open the software so here you see that the question is in your mind is how to delete when you click on this you will see how to click on row to delete the item when you click on this create item it's asking for your confirmation if you click on cancel nothing happens here you can see this still i can find sprite if i click on yes or okay data process successfully and click on okay here you can see this now the sprite is hidden go over here click on this search software and we have only go over here yeah that's it here you can see this every feature i have shown you clearly and how these all stuff work so i hope you like this so just stay tuned in the further videos i'm going to design all of these stuff very detailed starting from the login page and then the dashboard and all of these stuff in very detail so that's it keep supporting and just subscribe and share with your friends thanks for watching [Music] hello everyone welcome to my youtube channel in this video i'm going to show you how to design this login page in previous video i've already shown you the overview of management system and from this video i'm going to start designing with this application let's start with that so let me close this first and what we have to do is we have to first create a new project for that just click on this file and click on new project and name that project whatever you want so i've already created one with the cafe management video and here you can see this this is first thing what we have to do is we have to actually remove this border from this form and secondly we have to fill the background color so let me maximize this little bit and after this just right click and go to properties and then you have to search for few properties which we have to change so first thing what i want to change is that form border search for that so here you can see this form border style just click on this and select none and here you can see this now the form border has been removed after this what we have to do is we have to actually set the form size and the background color so let me copy the form size from the complete project so click on this and let me copy this size 2 7 sorry 373 comma 540 so i'm going to copy this move back over here right click go to properties search for size paste it over here and hit enter now you can see this this is on the perfect shape after this what we have to do is we have to copy the color combination so let me search for the properties that is back color here you can see this let me copy the color code from this search for back color so our color code is 41 comma 44 comma 55 sorry 51 so go back over here and just paste it you can manually write it 41 comma 44 comma 51 and hit enter and here you can see this now the color has been changed first thing here you can observe what we have is this is a picture box and in this i have set up image you can set any image whatever you feel like it's okay so i'm going to use one image which i already have in the system if you need that you can just ask me for that okay so let me add that so search for picture box post because we need one picture box so drag and drop it over here let me maximize this like this one after this what we have to do is we have to set image inside this so let me just click on this small triangle over here just click on this choose images click local resources click on import and after this local directory will be opened so i'm going to use this one in this whole project i have used only these two images so i will provide a link for these two images and click on open click on ok select stretch mode and here you can see this now we have this if you want it little bit large in size so you can set that to like this okay after this what we need is we need two labels and two text boxes first i'm going to drag few labels so drag and drop it i need two so just copy and paste it two times and after that what we need is we need text box search for text box and here you can see this we have something extra in my system that is text box from where this comes actually i have added one dll file into my toolbox and this gives me some extra tools inside this one here you can see this with the name luna i'll find all these in that dll so i'm going to provide the dll file in my description you can go and download it from there and i'm also going to put one video description in which i have shown how to add that dll file into this toolbox so go and watch that post and add dll file into your toolbox and after that you can start coding with me okay so now i'm going to use this luna 2 to text box just drag and drop it okay so it's taking a little bit of time close this okay so i have not purchased that that doesn't make any sense we directory user using open source okay so now we have these two text boxes in place and after that we need one button so let me copy one button so i need to button so just drag and drop it over here and after this we need one link label so whatever we need we have these all right now after this what we have to do is we have we have to just make a little bit modification with this so first thing change the text for this one change this one to user name [Music] change the second label to password and what we have to do is we have to actually change the four color for these two labels so i have selected both by pressing the ctrl key and custom and white and after this what i have to do is we have to actually set the font for these you just click on this search for font click on that small dot and i'm going to search for okay so let me see what font actually i have used so click on this comic sans i have used comic fans of size 12. so cancer move back over here comic sans this one regular and size is 12 and hit ok yeah this is looking better let me move this little bit upside okay after this here you can see this now this one is looking better after this what we have to do is we have to remove the border from these two text box from the three side okay that doesn't make any difference because we are using these in a great type gray color type form so that's right okay so next thing what we have to do is we have to actually change two properties of these better okay so let me copy the color code for this button now copy and after this what i have to do is let me move back over here just click on this fill color change this after this change few more properties with the guna 2 button you will find something more like let me show you border radius here you can see this 26 if i said 26 here you can see this now the corners are circular in shape and that's looking better okay after this what we have to do is we have to change this border style from solid to dash okay that will be not visible much because we have a different type of background color okay so let me change the text for now so login hit enter and after this what we have to do is we have to increase the font click on this bold i'm going to select or select 12. okay that's looking better after this what we have to do is we have to actually set a few more queries of these levels and buttons as well so what i want is when i click on this button the things needs to be changed so how to do that let me just copy this and move back to check the state and here you can find this what i want is whenever we click on this i want the color needs to be filled up is white select white okay sorry and after this what we have to do is we have to actually make one more changes that is for color for color needs to be of this color combination it means that when i click on this the fill color needs to be of white color and the text written inside this it should be with this color combination that is zero comma one one eight comma two two one okay so let me start this and let me show you if this works or not here you can see this okay so this one is not working let me explain you why because we haven't changed one property of the button let me show you let me minimize this first click on this and button search for that button here you can see this change this one from default to toggle button or radio button i guess yeah when you start this and when you click on this here you can see this yeah you can see the difference when you click on this the color change yeah this book if you want that for the first time when you click the color change and when you again click the color change to the previous one then how to do that for that you have to select one stop just click on this and you have to change this from radio button to toggle button and save this and now i'm going to start this and you will find that when i click on this see our color change is going to again click on this this is back okay so this one is working fine and here you can see this yeah we have small stock which we have to change first thing what we have to do is we have to actually increase the font size for these text box and what we have to do next is that we have to change the font color this one is gray and this is not visible clearly and third thing what we have to do is we have to change this one to and the star format that will look much more good okay so first thing i'm going to change the color for this one increase the font size first let me search for font just click on this right click and go to properties and search for font click on this select eleven or two eleven yeah eleven is good okay so the size is increased now so let me copy the size of this one and click on this if this happens you have to do the same [Music] 244 comma 36 yeah and now place this on the proper position after this click on this guru properties search for font click on this and select 11 hit ok the other size is changed too so move back over here right click and go to properties and you have already copied this size of this one so go to size and paste it yeah this moves to normal after this what we have to do is we have to change the font of the text for these two text boxes for badges select both of these by pressing the serial key and go to the for color there you can see this click on this select black whatever you write inside this will be now in the black color so let's start and try that here you can also this is on the left side of the screen i want this on the center center of the screen so i will do that now you can see this now this one is looking better so we still remain with the two properties we have to change that first thing i want to appear this in the center of the screen so for that right click go to properties select the start position click on this center screen and save this and whenever you start this it will be in the center of the screen and here you can see this yeah let's look nice after this what we have to do is we have to change the password cap for this text box right click and go to properties search for password cad inside this one and you have to just enter star and hit enter now start this and you will see whatever you write inside the second one in the star format yeah this one is looking better than before you can also set placeholder text for this one so here you can see this placeholder text just write something whatever you want like enter user name here you can see this one is visible inside this click on this enter password yeah this one is looking better now what we remain with that we remain with this level we have to change the label so first thing i'm going to change the text for this from label link label one to continue continue as guest and after this what we have to do is first thing i want to change the color for this one so link color i want this one to be green yeah this one is visible and after this what we have to do is we have to increase the font size for this so click on this i'm going to increase to 14 yeah so it is looking better and i'm going to increase the button size too this one looks better exactly let me decrease the size it's 14 is quite large let me change this one to 12. yeah this one is better okay and after this what we have to do is when i click on this i want to change the colors so let me do that check the state or search for that so let me first start this and see what happens when i click on this color changes or not yeah yeah this one is changing to red yeah that's what we're trying here that's looking nice okay after this what we have to do is we have to add one rectangular shaper in this here you can observe in this one we have one rectangle shaper over here so i'm going to add that just move back over here and just add rectangular shaper just drag and drop it over here and what we have to do is just click on this and first thing you can observe this one is not visible so i'm going to set the color code first so fill color change this one no actually for color search for for color i just fill color is right okay this one is yeah that doesn't change it what we have to do is we have to change to back color border color let me change this one border color yeah when you change the border color the color changes so what we have to do is zero comma one one eight comma something i actually forgot the color code cancel this and move back over here just click on this and let me copy the color code 118 comma 225 copy this back over here yeah here you can see this now the color is changed first thing what we have to do is we have to increase the width of this so i'm going to select three and after this we have to just do the stuff like this place and increase the size of this one and here you can see this yeah yeah this one is working or looking nice let me start this and let's see how this one actually looks yeah this one is look exactly what i have shown in my compute project yeah and let's see if this works or not this one is working fine and looking nice so that's it for this video guys in the next video i'm going to show you how to design the dashboard and how to connect the login page with the dashboard so thanks for watching hit like and subscribe my youtube channel and please share with your friends thanks for watching hello everyone welcome to my youtube channel in previous video i have already shown you how to design this login page so if you have not watched my previous video then just go to description there i put the link for my previous video or you can simply do one thing just click on the suggestion on the right side of the screen so in this video i'm going to show you how to design the dashboard let me show you that and how to connect the login page with the dashboard okay so my password is and my password is pass so let me login and here you can see this i'm going to show you how to design this and how this login page is working with my dashboard and when i click on log out we go back the login picture i'm going to show you this let me stop this and move back on our project on which we are working we are working on cafe management video so this one so here you can see this now let me start this and here you can see this we have already created this login page and when i click on this nothing happens so what we have to do is we have to add the dashboard first so for that what we have to do is we have to just right click on this and click on add and we have to add windows form just click on that and i'm going to name this one dashboard and click on add and this will add a new form first thing what we have to do is right click on this go to properties and after this what we have to do is we have to actually search for border control let me search for form sorry form borders try to change this one from sizable to none and after this what we have to do is we have to actually copy the size of this from the complete project so go back over here and here we have this form one design so click on this and let me copy the size of this one so copy this back over here right click go to proportions and let me set the size get into yeah this one is nice yeah after this what we have to do is we have to place two panel over this so i'm going to place that so search for toolbox panel just drag and drop it i need two so copy and paste it once again because i need to let me copy the size of the first panel from this one cover complete project so click on the empty space and let me copy the size of this one so 200 comma 540 14 so right click and go to proportions paste it and hit enter and after this what i'm going to do is i'm going to actually change the back color for this so then i so that i can see the difference clearly like this and in the same way you have to set the size for this one too so i'm going to set this one to manually so 781 comma 540 hit enter yeah you can see this this fill this form okay so i'm going to keep close this both of these panels so here you can see this now we have this closer to each other and after this what we have to do is actually i'm going to change the color of this panel to actually form that form i'm going to change the color of that form so change the form of that so search for back color and i'm going to select this one red and right click and go to proportions change this one to grey okay so here you can see this we have a space in between that's why i'm visible the color is visible so that's why i'm using this one little bit on the left side and you can see this now this fits properly and let me see on all the side here you can see this we have to move these stuff a little bit upside so that it fit inside the screen or form yeah this now fits the same way we have to do for this one and here you can observe we have red color visible now so we can move this one little bit upside too yeah we have to check on the same the right side yeah right side also the color divisible after this what we have to do is we have to actually change the color of this one to zero comma one one eight comma two to five or yeah two to five actually after this what i have to do is i have to also change this color of this panel to what i'm going to do that later first i'm going to add buttons so search for button i'm going to use this guna 2 button so i have already explained you that from where these 2 is coming in my toolbox if you don't find this just watch my previous video okay so i'm going to just drag and drop it over here right click and go to proportions and first button is nothing but let me change the text for this one now okay so first button is place order hit enter i am going to actually copy the size of this one from this complete project so click on this and size is 202 comma 41 so back over here right click and go to properties you have to find size and you have to manually write 202 comma 41 like this and here you have to place this button like this and here you can see this after this what you have to do is just right click and go to properties and you have to set the color zero comma a one one e comma two to five and hit enter and after this you have to change one more property of this button so what is that you have to change the border radius what is that border radius okay border radius and change this one to 40 yeah this looks better oh 15 i guess yeah 13 is better after this what we have to do is we have to add actually four buttons so i'm going to copy this and paste it once again and please say it like this paste and please like this piece and please like this and after this what i have to do is we have to actually fit the text for all these buttons so first button is please order and second one is add items third one is update items and fourth one is remove items and what i'm going to do is i'm going to actually increase this font size of these text box sorry texts of these buttons so that can be visible clearly so boards and 11 that's look better bowl and lemon for all of these by pressing the cedar okay i've selected all click pull and 11 and hit okay yeah this one is looking better after this what we have to do is we have to one add one more further to exit this application so i'm going to drag one button so i'm using the normal button yeah let me use that circular circle but i'm going to use this one so we're going to observe this one is quite light so i'm going to make this one small and the left corner and i'm going to change the text just change this one to capital x and hit enter and i'm going to increase the font of this bold and i'm going to change this one to 16. okay i'm going to decrease this size like this yeah okay so let me decrease the size of this one to 14 oh that look better now we have this exit button so i'm going to write change the design name for this so pdf exit and when you double click on this it will generate a click event and what we have to write is application dot exit and this will close the application okay just save it and move back over here and here now what we have to do is we have to change the color of all these two this one so right click and go to properties and what we have to do is just change the back color 0 comma 118 comma 2 to 5 and hit enter okay so before that what we have to do is we have to actually change two properties of these button so just select all of these and after this you have to search for checked state click on this and here you have to change one property that is fill color what color you want when you click on this button so what i want is when i click on this the back color the fill color needs to be of white and the text written inside this needs to be of this color so i'm going to change this one to white so select this and click on white and fall color click on this sorry not click on this 0 comma 1 8 2 5 and hit enter and after this we have to change one more thing that is button click on this and click on this and you have to select this video button now what happen is when you click one the other button will become normal when you select this this one will become normal okay now if we all this stuff is ready now what we have to do is we have to change the color of these so change this one fill color to zero comma one eight comma okay i want this one to be a white color okay so i'm changing this one to white and after this what we have to do is we have to actually add one two ellipse just drag and drop it over here and what we have to do is just click on this change this one to 30 and target control select this one to dashboard when you select this here you can see this now the corner of this dashboard is now cut here you can see this now let me just press the serial set key and here you can see this you have complete hd corner and you want curve then you have to select this dashboard and here you can see this we have it after this what we have to do is we have to add one more puna to ellipse so i'm going to drag and drop it over here once again and just click on this select 30 and after this what we have to do is we have to select the target and i'm going to use the target panel too now you can see this now the corner is aged and this one is looking better and after this what we have to do is we have to actually actually connect this one with the login page okay so i'm going to connect this with the login page so how to do that for that let me move back to the dashboard because we are on the dashboard so form one this one okay so let me change the text for this one so let's search for that so form one okay so click on this and search for text in here you can see this let me change this one to login and okay that doesn't make any sense because we have removed the form border okay on that this name is visible so now what i'm going to do is i'm going to change these code for this login and this label okay so for that right click on this and go to properties and first we have to change the design name for these two text boxes this one is txt user name and this one too ext password change this name of this button to pt and login and this one to continue or dtm guest okay so first thing what i want is when i click on this we move to the dashboard and only one button needs to be visible that is login button so let me show you in the complete project let me start this now you can see this when i click on this we move to the dashboard and we have only one button for now i need this okay so let me start with that okay back to our project on which we are working on we are working on this just double click on this and this will generate a click event just double click on this and after this pdn guest link clicked we have to rotate this after this what we have to do is we have to create our object of the dashboard so we have to mention dashboard ds is equal to new dashboard this dashboard is actually name of this one okay so if you name something else while you're creating a new form so you have to mention that name over here and after this what i'm going to do is i'm going to pass some text inside this nothing but guest this will show error for now i will explain you why it's showing an error so ts dot show and when this form loads the dashboard loads what i want is to hide the login page for that you have to write this dot height here you can see this it's showing an error why it's showing an error because when you move back to the dashboard and when we move to the coding part of this dashboard so let me just double click on this and we move to the dashboard here you can see this we have only one constructor with the name public dashboard and it doesn't except any argument in this so what we have to do is we have to actually make constructor which accept one argument so i'm going to copy this i'm going to paste it and i'm going to accept one argument string user naming this one user when i write this and save this move back over here you can see this now the the error has been resolved and what i want is when this user is passed i'm going to check inside this one if user is equal equal to guest whatever the past you have to just copy this move back to the here you have paste it over here like same because we are passing guest when we are clicking on this then we have case inside this user this will actually keep the argument which we have passed okay so now what i want is when this pass i want to hide these buttons i want to only show this button so first thing i'm going to change the name of design name of this so it changes from the vpn place order this one to btn add items add items this one to pd and update this one to pt and remove okay so now what i want is when this loads with the guest i want to hide all the remaining buttons these three so how to do that here i'm going to check that if user it means that whenever we click on the login what is going to be passed inside this is guest and when this guest matches the ship condition i want to hide the ptn add items dot hide i want this pdm update dot i want this and vdn remove dot i need this stop okay so let me start this and see if this works or not so you can see this i'm going to click on this and here you can see this we have only one button when i click on this the colors also change and this close button is also working but we missed one stuff what is that that is nothing but logo button here we have missed that okay so i'm going to add that low one log button now so move back over here go down over here just drag one label or i'm going to use a link label just click on this yeah just click on this log out and we have to change the color so link color needs to be white and we need to increase the font of this one click on this 12 and boom as well okay so not bold i want regular public yeah this one looks better and what i want to do is when i click on this we move to the login page so let me change the design name of this one to vpn log out and just double click on this and this will generate a click event so we have to go to the login page for that we have to name this one form you have to create object so form one is the name of that login page so form one fm is equal to view form one fm dot show first thing what i want is i want to hide this so this dot height and fm dot show it's this dot height means that the dashboard needs to be hidden and then i want to show the login page so let me start this and let's see if this works or not continue as guest and when i click on this yeah this works okay so that is fine after this what we have to do is we have to actually code for login button when i want to log in with the username and password then everything needs to be visible for that we have to code on the login button click so just double click on this and this is generated click event for the btn login and here what we have to do is we have to actually extract the text from that and check that if i'm going to hard coded the username and password for this you can use the database for that i've already made video earlier so if you have not watched that and if you want to see that you can directly comment or search in my youtube channel and if you are not subscribed to me then please subscribe so first textbook name is txt username dot text is equal equal to i'm going to set this one base and txt password dot text is before equal to pass whenever user enter this user can log in okay so here what i'm going to do is i'm going to load that form so dashboard this is equal to new dashboard and in this i'm not going to pass guess going to pass admin and ph dot show and this dot now the coding part of here is done now where we have to code we have to code on this dashboard constructor here in the else condition or you can use else if this if user is equal equal to admin then i want to show everything so pbn add items dot show vpn update dot show media remove dot i guess you have one question in mind what is that whenever we log in and we don't write these line of code then what will happen everything will be visible or not yes that will be visible okay so let me start this i have commented those line and i'm going to log into the username and password and just log in and here you can see this everything is visible then why i have written those line which i have commented what is the name of these okay so i'm going to explain you that suppose if you log in log out and if you click on this log continue as guest and here you can see this everything is hidden yeah you think yeah everything is working fine what happened bill when you again log out and again try to login you will see a difference login okay so this one is working okay so i have used this kuna to let's that's why it's working otherwise these stuff needs to be hidden because when you login as guest we have hidden things but we have not shown it when we click on this okay so let me uncomment this for now okay so sometimes this works and sometimes it's not so why to take risk so that's why you have to add these line of code okay so this one is working fine and you can observe when i started that every time this dashboard is actually moving in left and right so i'm going to fix this in the center of the screen change start position right click and go to properties change the start position to center the screen and see this and then you start this and log in yeah this is in the center of the screen okay so one thing is still missing what is that when i what i want is when this login i want to see a welcome screen so for that you have to add one user control so right click and go to click on add and first thing i'm going to add one folder so i'm going to new folder i'm going to name this one all user control and say inside this i'm going to add one user control click on add new item user control and i'm going to name this one qc underscore welcome and now new user control is added after this what we have to do is we have to actually let me move back to the complete project and let me copy the size of this welcome so click on this and move back over here let me copy the size of this one and right click and go to properties and search for font sorry font not font right click and go to prepare it and search for size here you can find this your v7 pd 1 comma 514 so hit enter yeah after this what you have to do is we have to change the back color change this one click on this custom and white and after this what we have to do is we have to add one picture box so i'm going to add one picture box just drag and drop it over here i'm going to add one image from my local computer you can download that image from the description of this video i'm going to use this to login click on ok select this one to stretch image and after this what we have to do is we have to set the size of this image so i need this much large yeah this one is looking better after this what we have to do is we have to add few labels to add one level just drag and drop it over here right click go to properties change this one to to welcome to pre-take these cafes so i'm going to increase the font later first thing i'm going to copy and paste it and i'm going to set the text for this one to yeah that's nice after this i'm going to copy the size of this actually font of this one and copy font and size is bold and 36 so i'm going to do that right click go to before is and you have to search for font that is central gothic fold and 36 sizes click on ok yeah this one is looking better just click on this and increase the size of this one too yeah this one is looking better after this what we have to do is when this form load we have to actually code that this periodically needs to be moving from left to right by changing the color so how to do that i'm going to show you that for that first thing what we have to do is we have to add one timer in this timer just drag and drop it over here and after this what we have to do is with the timer you have to first enable this false make this one true and make this interval 1000 and hit enter after this what you have to do is you have to just double click on this to generate a click event for a tick event for this timer let's double click on this let me change this label name this label name is label 2 so label dot label panel i'm going to change this one to the level banner and after this just double click on this and this will generate it timer one tick event after this what we have to do is we have to first take one variable over here so i'm going to take end now i'm going to explain why i have taken this num and here if num is equal to 0 then what i have to do is we have to actually change the color of that so first i'm going to set the location of that label and after that i'm going to change that so level banner dot location i'm going to set that location to new point [Music] and which point you have to actually set this this point is a coordinate so you have to just place if you want this one over here so you have to search copy the coordinate from here so location 44 comma 383 so i'm not going to use this i'm going to use the coordinates from my complete project so i'm going to use that 94 comma 367 367. okay sorry after this label banner dot color dot photo is equal to color dot or range and after this i'm going to increase the num okay second thing else if num is equal equal to one it means that whenever this loop screws primer goes thick and it will go into the first condition that is because this one is zero this will do these two stroke and after this increment the value of num to one and hit this condition will satisfy and then this what you have to do is we have to write level banner dot location equals new point and this we have to mention 166 comma 367 label panel dot color is equal to folder you have to dot green you can set other color if you like num plus plus and last is else if num is equal equal to what i want is little dot location is equal to 268 comma 360. label banner dot for color is equal to color chart royal blue and finally what we have to do is we have to actually change this num to zero not plus plus this time when you make this one zero it will move back over here and this will go into the infinity loop and this would work fine and now we have coded but this will not work because we haven't started the timer yet so when to start this timer when this user control load i want to start that timer just double click on this and this is generated load event and we have to start the timer timer 1 dot start when you write this this will get started and this forms blue now we remain with one stuff that is we have to connect this we have to put this into the dashboard so for that we need two ellipse so for that just drag and drop it over here just click on this change this one to 30 target control change this one to see welcome just copy this and move back to the dashboard go back over here just click on this change this target control to panel 2 save this and what you have to do is you can you can't find that control over here so for that what you have to do is you have to just start this and stop this now when you open the toolbox you will find you see welcome over here okay so just drag and drop it over here and place this on the proper position like this and you can see that this is moving and now when you start this and log in and here you can see this this one works fine and this one b degrees is also moving okay so everything is working let me show you that yeah everything is working so that's it for this video guys in the next video i'm going to show you how to design this add item button and how to backend code for that so i'm missing this place order because when we have some item inside the database then only we can fetch that items and add that okay then we can only place orders that's why i want to first design this one and after that i'm going to design this one so that's it for this video guys i hope you like and enjoy this so please subscribe and share with your friends thanks for watching hello everyone welcome to my youtube channel in previous video i have already shown you how to design this dashboard and how to design this welcome user control and also shown you how to connect the login page with the dashboard so if you have not watched my previous video then just go to description there i put the link to my previous video or you can simply do one thing just click on the solution on the right side of the screen so in this video i have already i'm going to show you how to design for this ad item okay so in previous video i've already explained you why i'm not designing this place order for now i'm going to design this first and after that i'm going to design for this one okay so let's start that let me close this this we are working so first thing what we have to do is we have to actually add one user control for that go to solution explorer right click on the folder that we have already created that is all user control right click on this add select new item select user control and get the name whatever you want i'm going to name this one qc underscore add items and hit enter now new user control is added after this what we have to do is we have to actually set the size for this one so let me copy the size of this one from our complete project i'm going to move back over here right click on this go to before it is let me copy the size of this one 780 one comma 514 so back over here right click go to properties and set the size hit enter let me maximize this little bit and straight this too and what up next we have to do is we have to actually change the back color for this one change this one to white like this click on this custom and white after this what we have to do is we have to add one label just drag and drop it after this i'm going to change the text for this one too new item or let me change this one to add new item after this we need few more labels so let me copy and paste we need three labels two text boxes and one combo box and we need one button so button just i'm going to use this guna 2 button just drag and drop it over here and we need text boxes in combo box so first i need a combo box so i'm going to use this guna 2 combo box just drag and drop it and after this i need a text box i'm going to use this gunner too so copy and paste it to replicate first i'm going to set the text for these all labels so click on the first one and change this one to category second one to item name third one to price after this what we have to do is we have to set these labels formed so select all these by pressing the ctrl key and let me copy the font from the complete project just click on this font just let me select click on this comic sans ms regular and size 40 so move back over here just search for font by selecting all and you have to search for comic sans and size is 14 hit okay and what i'm going to do is i'm going to actually increase the size of this one so that it look different little bit 16 okay after this what we have to do is we have to place these all of the proper position and at the same time we have to adjust the font slightly as well so let me increase the size of these all select all these select for font search for font click on this there are 14 actually okay so size has been decreased i have pressed the ctrl z and that's reverted the stuff so i'm going to move back this one over here and you can see this one is quite large so i'm going to minimize this and select one and after that we have to increase the font of this to 11 or 12 and select this one change the font one by one twelve change select this one and click this one two twelve yeah this one is looking nice now and next thing what we have to do is we have to copy the size of this one and we have to set for this one hit enter yeah this one is looking better after this what we have to do is we have to change the four color for these all select all by pressing the serial key and search for for color so here we have just click on this and select the black and save this it means that whenever we write something inside these the color will be now in the black okay so after this what we have to do is we have to set this button so right click go to properties and after this change the text to add item after this what we have to do is we have to set the color so change this one to zero comma one eight comma two two right hit enter change the border radius so search for that border radius 2 26 or you can set 21 yeah this one is looking better and we have to increase the font of this one search for font click on this volt 12 yeah this one is looking better after this what we have to do is we have to actually okay let me make these all little bit much more larger so that things look nice and after this what we have to do is we have to remove the border from the three sides i want this underline okay in the complete project you can see this we have on the other lines not the three sides okay so how to do that for that you have to just select all these and you have to search for one property that is style change this one to default to material and when you do that you can find the three side that's already removed after this what we have to do is we have to add the items into these combo box this copper box just click on this click on this and move back over here copy the items from here back over here you can add other items i've added cake soft drinks south indian thali you can add chinese then whatever you want okay or indian and hit okay and now the items are added into this combo box after this what we have to do is we have to actually change the design label for all these combo boxes and buttons as well so click on this and change the design name so sorry pxt category hit enter change this one to txt item name just going to txt price and this one txt button sorry ptn add item and we still left with one stuff that is nothing but a rectangular shaper just drag and drop it over here click on this and what we have to do is we have to set the color for this one so first change this one to not this one actually yeah search for border color just click on this click custom and select this one now for this change the border radius to 3 and change this border but no border for it sorry change this part of it to three and change this radius to okay let me explain you what this radius is let me place this one on the proper position like this yeah this one is better maximize like this one so when you set the border radius it will make this edge curve in place of sharp so i'm going to change this one to 26 and you can see this now you can see the difference yeah this one is looking better after this what we have to do is we have to first create a database to store these all data for that i'm going to open the database for database i'm using microsoft sql server management studio 2012 so first thing you have you have to write this create database stress show i have named the database restroom you can name this cafe whatever you want but i'm going to name this press restroom okay so you have to take special care if you change the name because i'm going to put all this project by name restore okay so first you have to execute this spouse the video write this into your database and execute this after execution you have to click on this refresh and the refresh will take few seconds and after this what you have to do is okay so let me just complete the refresh first refresh is completed after this you have to select restroom from here by default this one is let me show you which is selected master by default mastery selected you have to select search for restaurants like that and after that you have to execute this quick create table items items is a table name and i id is the column name for the primary key in this table and this id is of into type identity one comma one it means that whenever you insert a new row this primary key is automatically incremented by one and this is a primary key that's why we have mentioned it over here next column is name it's the vertical type and size is 250 and then not null we have used this constraint you can't leave this blank category where 250 not null price begins okay so you have to just execute this this one and you will find a table like this after executing this execute this and if you find these column name empty columning then that is working fine man so let's start with that let me move back to the coding part okay so here we have so first thing after this what we have to do is we have to actually create one class so for that just go to solution explorer right click on this click on add and click on class and i'm going to name this class function and click on add or enter so now here you can see this now we have added one class with the name function after this what we have to do is we have to actually create a few methods inside this so first i am going to create a method to get a connection with the database so i'm going to name this one i'm going to create this method protected so that this can be used inside this class 1d i'm going to name this word sql connection why i have written the sql connection because this is this method is going to return an sql connection object click on this and this one is showing error because i haven't imported this library that is using system.org now i'm going to click on this and here you can see this this one is automatically added now the error has been resolved after this we have to write the method name so i'm going to name this method get connection okay inside this method what we have to do is we have to create a sql connection object first this one is showing error because we have written that return type is return type is sql connection okay return type is sql connection but we haven't returned anything yet okay so this error will automatically resolve let me follow just follow the code what i'm writing the sql connection command is equal to new sql connection now we have created object of the sql connection type after after this we are going to pass the connection string and then this we have to mention data source is equal to and you have to copy the data source from here just click on this click on this copy this cancel go back over here and paste it and you have to add one more forward slash over here otherwise it will show an error so data source is this and after this you have to mention database name so data base and my database name is nothing but restroom rdstro so i'm going to mention that and after this you have to write integrated security is equal to true and make sure your t is capital you're sorry i've written this extra r over here make sure you write everything you check everything whatever you write database every spelling single spelling mistake counts and error okay and after this now vr connection is ready so i'm going to return this connection so return return what i'm going to return this connection object con now here consider this our error has been resolved now our connection is ready after this what i'm going to do is i'm going to write two method first to actually insert the data into the database actually the first method is going to actually fetch insert update and delete all these type of query will going to be fired on the database and second method i'm going to write to actually fetch the data from the database so first i'm going to write the method to fetch the data so public and this method is going to return a data set object with the fill data inside this one so data set okay okay so we have to write like this data set okay this is not visible because we have not imported the library whatever you want just click on this and you have to mention using system.data just click on this and this will be added over here and here you can see this now we can use this this method is going to return a dataset object filled with the data inside that after filing the query so i'm going to name this method get data and inside this this is going to accept what argument of the string type and to name this word query after this what we have to do is we have to make sql connection so i have to write sql correction and is equal to we don't have to make any sql correction we have to just create an object of that so from where we get the object we are going to when did they call this method this method is going to return sql correction object so i'm going to call that method get connection and this will return an object here this will work fine and after this what we have to do is we have to write sql command cmd is equal to new sql command after this we have to write cmd dot connection and we have to pass the connection that is gone and after this we have to write the command text that is which query you want to execute so either you can write a query like this this is hard coded like select star from some table like this query okay so i'm not going to hard coded this i'm going to make this one non-static so i'm going to pass this query so whatever whenever they call this method one argument query is going to be passed and i'm going to execute this over here after this command text what we have to do is we have to write sql data adapter to store some data that is going to be stored with sql theta adapter and data set so da is equal to mu sq l theta adapter and inside this we have to pass the command object and finally we have to create an object of data data set ps is equal to new data set and after this we have to fill the ta dot fill and which what we have to fill is ds data set now everything is ready now what we have to do is just return this data set object yes now whenever we call this method after passing a query this is going to return a dataset object after filing that query into the database okay and we can show that or use that data anywhere so first method is ready to actually face the data in this video i'm not going to use this to fetch the data the next video for the video i'm going to use this one after this i'm going to write what more method to actually insert the data so this method is not going to return anything because we have to just insert that okay so public void and we have to write set data set data i'm going to need this method string query and after this we have to write some of the similar stuff so forcing any connection so i'm going to get that connection for the kit connection method after this sql command cmd is equal to new sql command cmd.connection equal to connection we have to pass the connection object and after this we have to just open the connection so con dot [Music] open after this we have to pass the text that is query command text is equal to query and after this we have to just execute the query cap dot execute no query and finally con dot close we have to close the connection and after execution of all this stuff i need a message that the task is done so for that we have to write message box so this one is not visible let me show you why because we haven't choose this method sorry library windows form when you click on this yeah this one has now we can use this dot show and after this able to what message i'm going to show to the user is data processed successfully okay i'm going to show this message and this message box name is success and this message opening have some button keep one button message box icon needs to be information now this method is done okay so we need these three method i'm going to use these two we don't need this because we have already created a connection for the one time and we have to just do that i'm going to use those two method now what we have to do is we have to just move to this one and as you can i have already told you that i have changed the design name of all this stuff so next thing what i have to do is i have to connect this with the database or and you have to connect this one with the dashboard too so first i'm going to connect this with the dashboard and after that i'm going to put for this add item button so for that i'm going to use luna 2 ellipse just drag and drop it click on this change this one to 30 hit enter target control change this one to qc add items just save it copy this move back to the dashboard paste it over here just click on this select this one and select panel 2 save it start it to load that user control into the tool box this is start and close it you don't have to do anything i'm going to stop this move back to toolbox and here you can see this you see add item just drag and drop it over here yeah we have placed this and we have to connect this with this button just double click on this and what i want to do is we have to just make this one btn sorry not pdm qc underscore add items dot visible is equal to true and you see as group dot ring two front i want this okay so you must be worried about that i haven't made this uc ad item invisible so why i'm doing this i'm going to do that right now when this form loads i want to hide all the user control except the welcome user controls just double click on this dashboard i'm going to hide that uc add item dot visible is equal to false now start this and let's see if that works or not login click on this here this one is working and we have these key poly software and everything yeah this one is working so next thing what we have to do is we have to actually put for this add item so i'm not now i'm going to do that just click on this just double click on this to generate a click event for this button double click on this and after this what we have to do is we have to write the query first thing we have to create a connection the object of that function class which we have created so function fm is equal to function after this i'm going to create a variable string type and i'm going to name this one query on the button click i'm going to write a query first so query is equal to this so first thing what we have to do is insert into table name so my table name is items let me show you in my database move back over here you can see this is items and let me copy this these are the names first column name that is names second column name that is category and third one is price so i've copied these follow the same sequence don't try to change these go back over here and after items you have to just put a bracket and inside this you have to place like this after this you have to mention values and after this what we have to do is we have to just put another bracket and inside this we have to bench it one column and double and two plus sign then double and then single because this is that's why the string type is concatenated with the string okay so in the txt category first thing is txt name actually so pxt name item name dot text after this what we have is we have txt category so single double plus plus double quotes txt category dot text from these these are actually the text box name which we have changed earlier so let me show you that txt category txt name and this one is txt price okay so prices and bring in big and tight that's why we don't need to actually put double quotes when we are inserting the price this we have to use double quotes you don't use you don't have to use the single post plus plus and double quotes it's like this we have to make the txt price dot text just pause the video and write this line okay after this what we have to do is we have to actually call the method that is function dot set data because set data is used to set the insert the data into the database so query and after this what i want is whenever the insertion is successful i want to clear all these text boxes for that i'm going to write a method clear all the text boxes so public void clear or i'm going to name this method here or txt category dot selected index is equal to minus 1 this works in the case of a copper box and txt item name dot clear txt price dot clear i want this okay now there are the result what we have to do is we have to when this button add items clicked and after the insertion of these i want to remove all the data from these text boxes okay so for that i'm going to call this method and now save it and now let's start this let me login you can see this when i click on this yeah this works so indian is now i have added so item name indian is something rice and curry and prices 90 and add item data processed it's clear when i click on okay here you can see this all items have been removed one thing one more thing what i want is whenever i just write something and when i leave this user control then i also want to clear these text boxes so how to do that for that what we have to do is we have to just move back to this user control and item click on this right click and go to proportions select this event and you have to just click on this link just double click on this this is generating you see our item leave event and you have to call the method clear all over here that's it now start this and let's see if this works or not login yeah here because it's going to click on this pics order we left this user control and all items is clear now okay so this one is working fine so that's it for this video guys in the next video i'm going to show you how to design for the place order and how to backend code for that so thanks for watching and please subscribe and hit the bell icon and please like this video and share thanks for watching hello everyone welcome to my youtube channel in previous video i have already shown you how to design this add new item user control and how to back and code for this and how to create the database and which query you have to file to create a table so if you have not watched my previous video just go to the description there i put the link for my previous video or simply you can do one thing just click on the solution on the right side of the screen okay so in this video i'm going to show you how to design this user control that is place order and how to design each of these stuff in detail okay so let's start with that first i'm going to close this application and move back to our project on which we are working we are working on management video so i'm going to open that and here we go first thing what we have to do is we have to let me just close these stuff for now because we don't need these right now so i'm closing these all okay so let me close this okay so first thing what i need is you have to actually add one user control so for that just right click on this all user control and click on add and select new item after this click on user control and after this you have to set a name for this i'm going to set this one using underscore place order and hit enter user control will be added after this what we have to do is we have to actually copy the size of this user control from our previous user control that is nothing but add items so just click on the empty space and just go to properties copy the size 781 comma 514 right click go to properties set the size hit enter i'm going to make this one maximize and after this what we have to do is we have to actually set the color for this one back that i'm going to change it that one to white so back color click on this and select this custom click on white and here you can see this after this what i have to do is first i'm going to set um con actually connect this one with the dashboard so let me do that right click on this go to properties and they're first thing we have to do is we have to actually change one property that is change the font okay so i have clicked on this okay change this one to 11 and hit okay okay sorry move back i press the ctrl z key to revert it okay first thing what i have to do is i have to add one puna to ellipse so just drag and drop it over here right click and go to properties and then we have to set the border radius to 30 after this change this target control to uc place order save it after this what we have to do is just copy this that is ellipse one and move back to dashboard and paste it over here this one and select the target control to panel two and then save it after this we have to just start this one and we have to just stop this and you will find that we have this uc place order over here so we have to just drag this and place this on the proper position so we have to do that like this okay so now this is based on the proper position what we have to do next is we have to just connect this one with please order so just double click on this and here we move to the pdn please order click event and here what i want is uc underscore please order dot visible is equal to true and you see place order dot bring to front i want this for first okay and first thing what i want is when this form door i want to hide this user control so you must be worried that from where this uc place order one comes from so in the dashboard when you add this item by dragging this from the toolbox you will find that the name is you see place order one so we are coding on that after this when this form loads i want to hide that for that we have to just move back over here you see underscore base order dot visible is equal to false now start this and let's see if that works or not so my username is and just click on this yeah this one is working fine okay so one thing you must be worried about that in our compute project when i clicked on this this one comes in a fancy way i want that how to do that okay so let me show you how to do that okay for that we have to actually add one toolbox one item from the toolbox so i'm going to add that we have to use not to transition here you can see this this one just drag and drop it over here and here what you have to do is you have to just tape this one and move back to the coding part with this place order button just double click on this and you are here first thing what i want is when we click on that face order i want to send the user control that is welcome user control to the back you see welcome dot send to back after this what i want is to how this actually works with this you can set the transition animation type you can set it over here so you can set anything whatever you want original slide vertical slide and let me show you how this works you have to just drag this from the toolbox paste it over here change the animation type whatever you feel like and after that you have to mention one line on which button you have to work with that so that name of that true transition is transition one and here you have to just mention and which user control you want to sync with this transition you have to just name that user control name so my user control name is using place order i want to sync that just save this and let's start and see what happens click on this here you can see this it slides over that welcome page okay this one is looking nice and this will be much more clear when we design stuff over this so i'm going to design the stuff first okay so let me move back over here on this one this is the user control on which we are working so let me start designing with this first what we need is we need one label for that so i'm going to drag one label actually yeah so i'm going to drag one label just drag this and drop it over here i'm going to set the name for this one to face order and after this i need one more label for category to set the category so just change this one too after this i need a combo box so i'm going to use this luna to come about to drag and drop it over here and after this i need one text box for that just search for text box do not do text box and drag and drop it over here just like this and make this one small and after this i need one list view list view here we have this just drag and drop it over here and what we have to do is let me copy the size of this list view from our complete project to move back to our complete project okay so we are working on this one list box so let me copy the size 143 comma 310 copy this okay sorry we have to actually use this list box not this list let me delete this this box and drag and drop it over here okay just drag this correctly go to properties and set the size 143 comma 310 and hit enter yeah just come in the picture and this one is looking better after this what we have to do is we have to actually set the size of these text boxes too so let me do that select these all text boxes and move back over here the complete project and copy the size for these text boxes and combo boxes so the size is 143.36 so let me copy that yeah and this text box is a little bit small okay after this what we have to do is we have to actually add few more stuff let me move this one a little bit lower side okay i have to set this label font for now so let me do that from here so which font i have used in this one and let me show you color code is 0 1 8 comma 2 to 1 and comic sans ms italic and size is 18 okay so let me do that click on this go to preferred is select for font comic sans ms here it is italic and size is 12 and it's okay sorry i missed the size i guess size is 18 right yeah it's 80 just like that or you can select 20 if you want much bigger but this one is looking odd so i'm going to select 18 for now hit okay and after this what we have to do is we have to change the four color the color code is zero comma 1 8 comma 2 5 and hit enter and now here you can see that this one is looking better and we have to set the font for this one too so i'm going to set the same font for the font as formic fans right comic stance ms italic and size will be 11. this one is looking better after this in the complete projection observe we have only underlying sign with the help uh within this on the underlying so let me do that just click on this select both by pressing the serial key and after that what you have to do is you have to search for style and change this from default to material and when you do that you can observe the box from three set is now removed after this what we have to do is we have to add items into this combo box so let me do that for that i'm going to use this one and this we have already added items so click on this click on items in previous video i have already shown you and please subscribe my youtube channel if you are a new user or you haven't subscribed my youtube channel yet this will help us grow and follow us on instagram too so click on this items and just add the item you can add multiple items whatever you want so for now i'm going to add these two after this what we have to do is we have to set the placeholder text for this one so click on this and select this and we have to write so hit enter and you can observe the size of this one is quite small so for that click on this click on this one and select the size 11 and hit ok yeah the size is quite large and here you can see this we have to set the size from this one so let me copy the size of this one click on this change the size too yeah sometimes it happens actually after this click on this and we have to set the site for this one too and change this one to 11 and next thing what we have to do is we have to actually change the color for this one so right click and go to proportions and change the fog color just click on this and select black and the same way you have to do for this one too change the spell color sorry for color to black and after this change the text for these two text boxes in the center text line here you can observe this one is left so change this one to center here you can see this now search is in the center of this text box after this what we have to do is we have to add few more items inside this side first thing what we have to do is we have to add one label just copy and paste it i need actually for paste paste and one more so let me set the text for these labels for now item name the second one this one is price and this one is quantity and this one is total after this we have to add few text boxes so search for text box text box just drag and drop it over here like this and we have to add three and here we have to one is more stuff that is nothing but that is good on you break up down to numeric up down just drag and drop it over here and we have to add this okay yeah here you can see this one is looking better after this what we have to do is we have to remove the border for these text boxes by press the serial key and move back over here and first thing change the fork color to black and after this change the font color sorry font to 11 and hit ok the size is quite large so i'm going to copy the size of this one 200 comma 36 just click on this place it change the size for this one too place this one too and change the size yeah this one is looking better after this what we have to do is we have to add one button for now so button i'm going to use this kuna 2 button just drag and drop it over here and let me change the text for this one first so text will be add to card and after this what we have to do is we have to actually increase the font for this one and change the fill color as well so zero comma one one eight comma two yeah after this what we have to do is we have to change the font of this one so change this one to 12 and fold as well so here you can see this one is looking better but it decreased once yeah this one's looking better and after this what we have to do is we have to set one more stuff that is border radius here you can see this change is going to 15 or if you like you can increase this by 21 yeah this one is looking better after this what we have to do is we have to actually change few more properties of this button so let me do that first check the state change this one to fill color will be nothing but white and the four color that is the text color will be zero comma one one eight comma two two five after this we have to change one more stuff that is button mode click on this change this one to toggle button and save this after this what we have to do is we have to add one more step that is nothing but this one this is a rectangular shaper let me copy the size of this one size 581 comma 213 so i'm going to move back over here drag rectangular shaper over here copy this go to properties of this rectangular shaper size and after this let me copy the location of this one too click on this and location 150 185 comma 43 so go back over here location paste it and hit enter yeah and these all the stuff are out of box actually so let me do that make these all n yeah after this what we have to do is we have to actually make this rectangular shaper look better so how to do that for that let me just increase this border width change this one to three after this change the fill color to zero comma one one eight comma two five sorry not this one okay so we have to change this one border color actually yeah here you can see this after this what we have to do is we have to set the coordinate radius to i'm going to say this than 30 yeah this one is looking better and i'm going to increase the size of these all little bit so that these look nice and let me move all of these stuff a little bit on the left side okay after this what we have to do is we have to actually remove the border from the three sides for that i've already shown you how to do that for that you have to search for style and change this one from default to material and here you will observe we have now removed the border from the three side of these text boxes yeah this one is looking better you can also change the text actually color of this one up and down so let me do that change this one to zero comma one one eight comma two two five okay sorry i have added dot actually that's why it's showing in here zero comma one one eight comma yeah this one is looking better than before after this what we have to do is we have to add one data grid view for that i'm going to search for details with you and i'm going to use this to data quickly just drag and drop it over here just stretch this one like this and after this what we have to do is we have to change one more property of this one data grid view to change the properties that is first thing change the border style change this one to none from fixed 3d and after this what i'm going to do is i'm going to change one property one more per day of this one that is column height actually let me search for that column header height here you can see this i'm going to change this one to 21 and hit enter okay so i can't change this because i haven't added any column edge so i'm going to add one column add column click on this and i'm going to name this one header text i'm not going to change the design name for now and i'm going to name this one item name and click on add and there you can see this we have added successfully column 2 i want this one unit right click on add column 3 i want quantity add and finally we want column 4 that is nothing but right and click on add yeah and close this here you can see this now everything is added and you can also observe that now the column header height is change what is this header height if you want to increase this height then you can do that but here you can observe that when i write 35 and hit enter yeah you can't change that 15 when it is 15 for this one yeah let me decrease that boy this is not working okay so this one is auto size the size is set auto size that's why it's doing problem we have to actually change this one to enable resizing then you can change this property okay so you're gonna observe when i write 35 yeah which is change when you change this one to 21 yeah this looks better you can adjust this according to your need after this what i have to do is i have to add few more labels over here so i need two buttons i'm going to copy this and paste it two times copy and paste one over here and one more over here and let me change the text for these two buttons as well so for this one i'm going to change this one to remove and this one to print okay so these are quite large font that's why i'm going to change the font for this one click on this regular and select 11 and hit ok uh this one is actually i guess the font is not changed so let me do that regular okay so this one is comic sans i guess yeah regular and sizes 11 and hit okay okay this one is not looking that much nice so i'm going to change this one to calibrate okay click on this okay library this one regular size is 12 okay not this one this one is also looking very bad okay so let me copy the size from complete project so click on this click on this and the size is actually regular 11 okay so we have to set that say go you y regular and size is 11 yeah this one is looking better okay so we have to do this the same for this one too regular search for that select the size 11 and hit okay okay so now this one is looking better after this what we have to do is let me decrease the size of these two buttons little bit so that these look nice yeah after this we need one more level so let me do that copy this label over here and paste it over here and i need one more label so i will tell you why i need one more label so click on this for now change the text for this one grand total hit enter and change this one to rs dot zero zero and after this what we have to do is we have to change few properties of this label so that this label actually look like this one okay this is actually a label after this first thing what we have to do is we have to actually change one properties that is auto size change this one to false and after this we have to change the text alignment from top left to center after this we have to change the fill color search for that fill color where it is or back color change this one too custom and like this yeah here you can observe now you can increase it like this so that it will look nice yeah like this yeah let me create this after this what we have to do is we have to increase the font size of this one okay so click on this and i'm going to increase that to 14 or more if you want 16 okay yeah this one is looking better and now let me start this and let's see how this actually look like click on this and here you can see this now you can see the difference how fast the slides you can also change the slide time and also change the animation let me do that click on this and i'm going to backside emission time increase this one to 3000 hit enter change this one from horizontal slide to scalar rotate and click on start actually let me set hard coded password for this one so that i don't have to enter password each time so let me do that back to form one click on this click on this and to set the text so and this one is okay now let me close this yes now start this and when you start this you will find that we already have the password username over here just click on login when i click on this yeah you can observe this one is looking better okay so in the next video i'm going to show you how to pack and code for this and here you can observe that designing part is done still over here and you can change the animation as per your requirement so that's it for this video guys i hope you like and enjoy please subscribe and hit the bell icon and share with your friends and please contact us on instagram thanks for watching hello everyone welcome to my youtube channel in previous video i have already shown you how to design this user control that is fixed order and how to connect this with this button so if you have not watched my previous video then just go to the description there i put the link for my previous video or simply you can do one thing just click on the suggestion on the right side of the screen okay so in this video what we are going to do is we are going to actually back and forth for this how to add items inside this one this one there is a list box and after this how to add to cart and after that how to remove these and how to work with these okay so let me do that okay so let me close this and start with that so first thing we have to move back over here that is uc underscore please order and after this what we have to do is we have to just click on this first we have to change the design name for all these user controls sorry all these text boxes and buttons as well so i'm going to change this one to combo category one to txt search i'm not going to change the design name of this text box sorry list box okay i'm going to change the name of these all stuff txt item name change this one to txt price change this one too pxt quantity up down this one to txt total change this name of this one to vtn add to card and finally change this one to btn remove this one to ptn print and we have to change the name name of this level 2 because we have to set the this label every time whenever we add to cart and whenever we remove the item from the card okay so how to do that for that first you have to change the label name so i'm going to change this one to label total amount hit enter okay now everything is done after this first thing what i want is when i select the category from here i want to show all the item belongs to that category inside this list box so how to do that for that we have to code on this combo box select index change so just click on this and after this what you have to do is you have to just click on this one events here you can see this when i click on this select in this change here this one is visible just double click on this and this will generate a click combo category selected in exchange here what we have to do is first thing what we have to do is we have to actually extract the text from that text box for that i'm going to take a variable of a string type let me zoom this little bit and after this let me name this one category that's equal to combo category chart text we need text from that text box whenever you just select after this what we have to do is we have to write a query before writing a query first thing what we have to do is we have to make a connection with our class which we have created our previous video that is function fn is equal to new function and in this i have written two method to get data and set data i'm going to take one variable that is of string query i'm naming this string query okay string type variable and i'm naming this one query so let me show you that function class if you have not watched my previous video i'm opening this function class and here you can see this first we have created a method to get a connection and i'm using this connection these two method here you can see this and here i have written one method to get data from which you can actually extract the data from the database with the help of this method by simply passing the query inside this one and here you can set it set data it means that you can insert data with the help of this method you can update it and delete data with the help of this method okay so i hope you understand this and if you do not understand it please watch my previous video and if you still remain with some sort of questions in your mind then you can contact me on instagram or you can send an email to me i'm going to reply that for sure okay let me close this and move back over here now i've created this function object fn and here what we have to do is we have to actually write a query first so what query i want to write i have to write as select name from table name that is my table name is items previously i've already shown you where category category is a column name in that table category is equal to single quotes and double quotes two plus sign then double and single quotes this is the way to concatenate a string and we have to concatenate category inside this one this variable whatever we extracted from that combo box let me remove this space now our query is ready now what we have to do is we have to actually file the square into the database so in this method that is get data actually this get data is returning something and this is a type of data set here you can see this for that what we have to do is we have to create a variable of data set type data set ps is equal to and then we have to call the method function dot get data and we have to pass the query now that method that is get data is going to return a data set object with the data filled inside when we file that query okay so now we have the data inside this data set now what we have to do is we have to just add that is all data into that list okay so how to do that for that first thing i have to take a variable so and i let me give this a little bit into i and after this what we have to do is we have to take a for loop so for i is equal to zero i is less than ps dot tables 0 dot rows dot count what it means that either you can write i over here or you can simply do one thing just cut this and place into over here like this okay here you can observe i have written ds.table0.rows.com it means that whenever we select that item from that combobox this query will be fired and we are going to actually suppose we have selected south indian and we have five items of category south indian then we have five row inside this data set and we count that we have five bs that is data set and data set is stolen the data in the form of tables and table index is zero dot trues it means that how many rows and we have to count this so it will have five so i is less than five it means that it will execute from zero to four it means that this is for to this is actually to set how many times this loop will work so this is a dynamic way to set okay after this what we have to do is we have to actually set that into the item box that is for a list box so items list all right first okay so let me check the name of that let me do this move this over here so click on this let me check the name of this one this is actually list box search for yeah go back over here list box one we have only one list box dot items and we have to add the items dot add and each iteration we have to add the items so ts dot tables 0 dot rows and we have to set the rows i i is the row and the second one is the column we always need to extract the zeroth column because we have only selected a name from that combo box so that's why it will be zero always and convert that to string and let's see if this works or not okay let me start this okay so it's showing some sort of error so two string yeah actually we missed a bracket right yeah this is bracket close bracket so i'm going to start this move to login and here you can see this when i click on this yeah this pops up and i'm going to select this south indian here you can see this we have two items that italy and those are now we everything is visible now and what happened if i select stop drink now here you can see this now when i selected soft ring it's showing italy dosa and coke what happens is when i click on this it just keep adding the items into this if i select south hidden again it will add highly dosa again here you can see this so how to resolve this issue for that we have to add one more line of food over here and the top of this in the beginning of this what we have to do is we have to write items sorry the list box name is listbox1 dot items dot clear we have to use this now start this and let's see if that works or not click on this click on this south indian if i select soft drink yeah we have only coke and when i select south indian yeah we have these two now repeated is now removed and you can observe one smaller stuff is that the font is quite a small so i'm going to increase the font first and after that i will code further so close this click on this i'm going to increase the font for now so click on this and select 11 and hit ok oh sorry by mystically i've added this click on this click on font select 11 yeah now i'm going to code with this okay after this what we have to do is we have to actually code for the search button when i start writing inside this i want to search for like coke when you select a category we have items inside this and i want to search something from that item suppose you have hundred of items inside this one so i want to select search specific items for that we have to code for this one too so just click on this event select that text box and properties we have to code on this text change and what we have to do is we have to actually write the same query this one all of this okay inside this one just one small stuff there is a slight change in the query and everything will remain same so what we have to do is we have to actually add one more stuff we have to check for two stuff that is and category category fair category and name and name like single quotes double quotes double quotes and single quotes and this two plus sign and here we have to mention ph search dot text and what we have to mention is one percent over here i hope you understand what i have written what i have written is we have to check two stuff select name from items where category is category whatever we selected the category suppose we have selected a thousand and then southwind will be written over here after this and name that is the name of the item like this name is the name of column in my database so like it means that matching character we have to match on the basis of the text and here from where we have to extract the text from this search text box and we have added this percent suppose you write yes then yes percent it means that after all the names who start with yes will be visible in the list box okay so i hope this works let's start this and let's see login please order select south indian and select when i write d here you can see this we have only dosa and delete this i'm going to write i yeah if you have only italy that this one is working fine but here you can also we want a smaller stroke that we have added the same code two times and this one is not looking better so what we have to do is we have to actually create a method over here so that we can reduce the lines of code over here and it will look clear so what we have to do is let me add one method for now the method will be private because we are going to use this method inside this file only so private void and i'm going to name this one show item list okay so item list and i have to pass actually it's except one string that is query and what we have to do is we have to actually paste few lines of stuff from there so i'm going to cut this first and paste it over here after this what we have to do is we have to actually cut few more stuff that is this much i want this much over here okay so now we set with the method okay let me delete this space yeah we are ready with the method after this what we have to do is now our query is ready over here what we have to do is we have to just call this method show item list and we have to pass the query inside this one and we have to do the same over here let me delete this and remove these all stuff and we have to call that method that is so item list and we have to pass the query that's it here what i have did is i have put that calling that method that is function.getdata when this call when we select something from here over here so then this query will be passed with this by calling this method and here this query is for the past inside this one and the data set will fill with the data and this data grid view sorry list box will be filled with that data and if we select if we write anything inside this text change then this query will be filed on this method okay in the same way i have already explained you okay so let's see if this works or not by doing this we have actually decreased these line of code in this i have mentioned i have written these all line two times but now we can see we have this only one time and let's see if this works or not login place order select south indian yeah this one is working indian yeah this one is working and when i write g yeah this one is working and and yeah everything is working afterwards what i want is when i click on this i want to fill this text box with that data with the detail of these items how to do that for that what we have to do is we have to actually code on this i list box selected in exchange so just close this move back over here click on this click on event select it and exchange here you can see this double click on this and this will generate a list box one selected in the exchange event and here what we have to do is we have to actually set few stuff first thing what we have to do is we have to reset the text of these txt quantity clear all these clear txt total whenever the item is changed okay so let me do that so txt point td up and down dot reset text first thing i want this and second thing txt total dot clear it means that what you want is whenever we select one item then the data is filled inside this and we have increased the quantity and on the basis of that quantity the amount is total over here when you click on add to card the item is added when you select another item then item will be set over here but if we this true text box resist with the old data then this will not look fine so that's why i have cleared these two text boxes whenever we select one item from there after this what i have to do is i have to extract the text which we have selected from that list box for that we have to write string [Music] text and is equal to items sorry list box dot get item get item text yeah and inside this we have to pass the list box one dot selected item yeah when you write this you get the text box sorry you get the text of the selected item okay after this what we have to do is we have to write we have to actually set that text into the text box this text box the name item name we have to set the text whatever we select into this so let me do that so that txt name item name dot text is equal to text now start this and let's see if this works or not click on this place order select charlie click on this and here you can see this name change on the basis of this and when i increase this and when i add some total like this when you click on this yeah these clear up and this will look fine okay now this one is working after this we have to set the price and total on the basis of this quantity so let me do that after this what we have to do is we have to fire a query to extract the price of that item from the database so query is equal to select price from items where name is equal to the string type so double single quotes and item price i want that okay so now we have the price inside after that we file this query so i'm going to file that query data set yes is equal to fn dot get data and inside this i'm going to file the query and after this i will have txt price dot text is equal to ps dot tables zero dot rows and we have zero through zero column dot to string okay so txt price is the text box name for this one price and when you do that yeah this will go and here let me show you one thing let me just log in please order select one thing south india select it here you can see this is the price is set now and when i click on this empty space okay so let me log out and log in again and here you can observe that when i click on this empty space or okay now this works fine okay so we have to actually what i'm going to tell you that we have to put this this one into a try catch block otherwise we'll cause exceptions sometime and this will cause in the failure of your program so i'm going to put this one in try catch block okay you have to just write this i'm not going to show this exception anywhere just like this yeah this will work fine okay so now we can set the name and price with the help of these items okay after this what we have to do is we have to actually set the price on the basis of that quantity now let me start this and show you what i'm trying to say log in please order what i want is when i increase the quantity here you can see this one then the price needs to be 75 over here when i click this two we need 150 over here so how to do that for that we have to code on this value change event of this one so let me do that i have closed the application just click on this click on this and search for value changed here we have just double click on this and this will generate it pxt pointed up down value change event and here what we have to do is we have to extract the quantity first so n64 dot quantity coin is equal to n64 dot parse and convert that txt point t up and down dot value dot to string what i have done over here is i have extracted the value from that text box sorry up down counter and converted that into a string type and finally we have converted that with the help of parse method into an integer and 64 type now we have the quantity how much quantity we want and after this i want the price amount and 64 price is equal to 64 dot pass and in this we have to pass the txt price dot text i'm going to extract that from the text box that is nameless takes the price this one i have extracted the value how many quantity and price now what we have to do is we have to just multiply these two and show this into this text box okay so let me do that for that txt total is the name of that text box dot text is equal to in the bracket what we have to mention is coin and we have to multiply this with price put this into the bracket and convert this into string to string and here we go when you do this let me just change the font color fall color for this one to black okay so let me do that change this one to black and increase the font so that we can see clearly change this one to 12 okay okay let me copy the size of this one from here yeah now start this and let's see how this works login click on this italy and when you select one the price is 44 just click on two the price is 90 yeah this one is working fine after this what we have to do is we have to actually code for this add button what i want is when i click on this add to cart the item needs to be added inside this so how to do that for that let me do let me start coding with that okay so you can see this when i click on this this disappear okay this one is looking very bad let me do fix that first so click on this and change this one to radio button that is button type not this button mode actually change this one to radio button or default button let me just leave that default okay save this after this what we have to do is we have to code for this add to cart just double click on this and this will generate a click event for that and after this what we have to do is we have to take one okay sorry sorry actually we have uh actually i have selected all of this and when i click on these button all for all buttons i have created and even so let me remove that events first okay so click on this and i'm going to remove the event first click event i was surprised that how can i have these much of click events okay so now we have only one and after this what i want is i have to first take two variables i'm going to take that one protected because i'm going to use this within this n and i'm going to take that total to take care of the price total is equal to zero for now after this what i have to do is i have to take n and variable is equal to luna derivate view dot rows dot add what it means that it will give reward early to and that how many rows we have actually on which row we have to insert the data after this what we have to do is puna two data grid view dot rows and which row the n row and after this dot cells which says zero cell dot value is equal to and we have to set the value that the first column is for what let me check that first column is for item name so i'm going to set the item name so item name is txt name in the text box name pxt item name dot text after this we have to set the price so puna 2 dot rows and dot cells cell is one that is the column name dot values cell is the column index actually cells one one is the volume index let me explain you cell 0 means this one item name this is the column 0 this is column 1 this is column 2 this is column 3 or you can say cell 0 cell 1 cell 2 cell 3 okay this way the coding is going so after this we have to set the price txt price dot tag and after this we have to set the quantity txt sorry two dot rows and dot cells to this dot value is equal to p x t point e up down dot value after this 2 dot rows and dot cells [Music] okay now we have all this after this let me check that first if this works or not so start this login click on this select one item indian right one and click on this yeah here you can see this now the item is being added those i want that those are two items here this one is being added okay so this one is working fine after this what i want is here you can observe one smaller stuff is that the price is not being increased so how to do that what i want is when i add items this price and plus this the total needs to be visible over here so how to do that let me close this and let me show you we have to fold over here on the add to cart button and here what we have to do is total whenever we add one row i want to add that stuff into the total either we can write like this total total plus hint dot parts we have to convert the txt total dot text you must be worried that why i have written txt total over here this txt total is not this one this one the price from this text box when i click on this the price from this one is fetched and added to this one actually added to this variable and this variable is finally assigned to that label either you can write like this or you can write like this plus or equal to like that yeah both will work fine if you have written that if you understand this then when you do this otherwise you can write the previously what i have written after this what we have to do is we have to set that label so level 2 amount dot text is equal to we have to mention r s dot space and after this double quotes and plus and we have to add that total this total is nothing but this variable whenever we add that this total is being incremented and this label this total is being actually set to this label so let's start this and let's see if this works or not login place order select item click on this click on add yeah here you can see this is the prices increase like those are two yeah the prices increase now both 45 and 150 is now being added after this you can observe one small issue is that when i select this zero yeah and i try to add to cart yeah this will add it to but this doesn't make any sense that you have added zero dosa and the price is zero and unit price is visible over here this doesn't flow what i want is i want to restrict that you can't add this type of stuff or the second thing what you want is what i want is whenever this nothing happens let me show you that when i select this here you can see this this text box is empty and when i try to add to cart yeah exception generator i don't want that okay so how to do this how to take care of that for that i'm going to check one condition over here if txt total is not equal to pxe total dot text is not equal to what zero so zero is the string type in the textbook so i'm going to write the zero in this format and not empty so txt total dot text either not equal to null here you can see this and put this inside this if condition all the food so you can say this and in the else condition what i want is i want to show a message if user try to do this then i want to show a message message box dot show minimum quantity needs to be need to be one and the message box name needs to be in for mention [Music] and message box button needs to be something okay i need one button and after this message box i can message works icon and i'm going to name this one information yeah that's it now let's start this and let's see if this works or not place order select something click on this and when you try to this minimum quantity needs to be one it means that this one is empty that's what's showing an error when you want yeah this works when you try to add zero and click on this middle quality needs to be one yeah this one is working fine after this what i have to do is we have to actually work for that remove this remove button okay so how to do that first thing for actually actually to work on this remove button first and what i want is when i remove any item i want to decrease the price from here so how to do that whenever i click on this remove button okay so for that we have to actually remove the selected item only we have to remove the selected item only when i click on this and try to remove this then this rule will be deleted so first thing what i want is when i click on this the selected row price i want so that i can decrease that price from this total so first thing i'm going to code on this data grid view self click event okay just move back over here just click on this click on this cell click event search for that just click on this and search for cell click event over here back over here cell click here it is just double click on this and this will generally click event over here and here i'm going to take one variable of end types and amount and here what i have to do is i'm going to put this one into the try catch pull off so that if any type of exception other this kit handles by itself yeah and inside this i have to set that price of that row into this amount the amount is equal to end dot pass it's an inter type so that's what we have to convert that into end type so from which data grid and from which cell we want the cell is three let me explain you what i have done over here e dot row index e dot row index which means that on which row you have clicked and the cell is zero one two and three the price i need this price so sell three over here and so what the what you have to extract the value and convert that into string like this now we have the amount in this variable after this what i have to do is when i click on this remove button i want to remove that row and decrease the price from this level so for that just double click on this and this is generated and remove click event and here what you have to do is you have to actually do one stop and i'm going to put that into the try catch block so that i don't get any type of exception do not choose review dot rows dot remove at selected rows and here what we have to do is we have to mention zero dot index just close the bracket and now after this execution of this what i have to do is i have to actually now this will remove the row but it will not decrease the amount so let me show you that if this works or not we just log in and i'm going to add kali i'm going to add which 130 and non-which one and i'm going to remove this wedge click on this and remove this here you can see this now the row is removed the price is still by adding that non-vegan veg sorry over here the total amount and this one is not looking nice what i want is when i click on this remove remove that row and decrease the price that look nice okay so after this what we have to do is we have to actually write like this so total is there label which we have level not this one is not a label this is the variable which we have created over here total and what i'm going to do is i'm going to decrease the amount from that so decrease the amount total minus is equal to amount this is the amount is also a variable and here you can see this this is a pinch type and i have decreased the amount from the total amount and after this what we have to do is we have to just set the label label total amount dot text is equal to rs dot space plus total and now start this and let's see if this works or not login [Music] select item yeah here you can see this now we have 3200 i'm going to remove this which special thali remove this and here you can see this number of prices 2550 and i'm going to add one coke actually six score yeah here you can see this now 300 yeah yeah this one is working fine now we're left with one stop that is print and we have to do that how to code for this print button so let me do that for that first thing what we have to do is we have to one add one item into our project what is that that is a tgv printer let me open that here we have dgp printer i have already provided a link for this dgb printer in my video description go and download it up from there and what you have to do is you have to just drag this move back to your project i'm working on cafe management this one open this and just put this on this cafe management video or project name and just leave this and here you can see this now we are here you can observe dgb printer is now added we don't have to open this okay so let me close this and just add this and after this you don't have to do anything you have to just move back over here on the print button just double click on this and this will generate a click event and after this what we have to do is we have to write pgp printer like this and this will not shown properly you have to mention like this capital t g v capital p and after this you have to just click like this and huge vgb printer helper and when you click on that you will find you can actually see this the color of this one has changed after this we have to mention printer is equal to new pgb printer after this what you have to do is print the printer dot title you have to set the title so i'm going to set the title customer bill you can set anything whatever you feel like after this what we have to do is we have to actually add date and time okay so i'm going to do that printer dot subtitle and in this i'm going to add string dot format date mentioned like this now you have to mention date time date time dot now dot date did you mention this after this title name you will find the date over there okay after this what we have to do is we have to set the print printer dot sub title format flag title format like this one flags is equal to string string format flag flags dot line limit and after this you have to just put this pipe string format flag dot no clip after this what you have to do is we have to just add the page number into the bell if you your color is of more than one pages then i need the page number and even we have only one present still i need a page number for that you have to write printer dot page numbers page numbers okay search page numbers yeah page numbers is equal to true and after this printer dot page number in header is equal to false i wonder i don't want the page number and header after this we have to write printer dot proportional columns is equal to true and finally we have to write printer dot header fill alignment is equal to the string align meant dot near and after this what we have to do is we have to just mention printer dot footer and is equal to the total amount so total payable amount is and we have to set that from the label so plus label total amount dot text we have to set this and after this i'm going to just add a footer spacing put your spacing this one is equal to 15 printer dot print data grid data capital p r int data grid view and mention the detected view name so google and finally after this what i want is i want to set the label okay let me do that and after completion of all this task what i want is i want to clear this data grid view and set this label to zero okay so how to do that for that move back over here and what we have to do is we have to just mention few more line that is total set the price total is equal to zero that is the variable which we have created over here so let me show you that total here you can see this we are using this one for amount total amount so i have set that zero and after this i want to clear the detected view so to start clear and after this what we have to do is we have to set the label total amount dot text is equal to r s dot plus total that's it that's it for this let me start this and let's see if this works or not we generate a bill successfully or not so login place order click on this cake we don't have any type of cake software coke i'm going to add this one five four therefore after this third i'm going to add this 1 2 registration normally special 3 4 total amount is 4 4900 i'm going to print this when i click on this print it will generate it actually open a pop-up and this will ask for printing first it will print and after the printing is over it will show to save a pdf if you want a build pdf so click on this so i haven't actually attached any printer with my pc so here you can see this is a printing one and here you're gonna observe that this column is still filled with the data and this label is still having the total amount so what we have to do is let me just show you desktop and this one i'm going to store this today bill yeah i'm going to name this one today when i click on save and this printing is going on yeah when this completes and you can see this when that removed all the data is removed now and this one is turned into zero let me open that pdf file where we actually stored that into this bills and today we'll just open this and let's see if this bill is proper or not here you can see this initially we have order added coke as far as 50 24 200 which is special is 6 52 and one price is 1300 and the total amount is total paypal amount is 4900 and price page number is one and here you can observe that padding that is the space okay footer is space and the bill look like this when you print this it will print like this yeah here you can observe we have the date and this one is customer built you can change the text for this one okay let me move back to our project on which we are working yeah i hope you enjoyed this that's it for this video guys in the next video i'm going to show you how to code for this actually design and code for this update item and please subscribe and hit the bell icon and please share with your friends thanks for watching hello everyone welcome to my youtube channel in previous video i have already shown you how to design this user control that is place order and how to backend code for this so if you have not watched my previous video you can just go to the description there i put the link for my previous video or you can simply do one thing just click on the suggestion on the right side of the screen so in this video i'm going to show you how to design this user control that is update item and how to packet code for this so let's start with that let me close this first and move back to project for which we are working we are working on cafe management video so let me open that and here we are let me show you that here you can see this till here our task is done when i select the stuff yeah this stuff is visible and you can add to cart too yeah everything is working fine today i'm going to show you how to design this one so let's start with that first thing what we have to do is we have to actually add one user control for that just go to solution explorer right click on this click on add and select new item when you click on this after this you have to select this user control and then here you have to give a name so i'm going to give a name uc underscore update items and click on add it will add a new user control so here you can see this now we have the user control let me close this stuff for now and let me copy the size of the user control from previous user control so i'm going to do that let me maximize this one and the size is 781 comma 540 so for that right click go to preference search for size and you can manually write it or you can copy and paste it after this what we have to do is we have to change the back color for this one so go to properties change the back color change this one to custom and white and after this first i want to connect this with the dashboard so that whatever we make changes is instantly visible when we start the project for that just go to toolbox search for luna 2 ellipse just drag and drop it over here click on this change the border radius to 30 it's 6 by default change this one to 30 after this select the target control select this one you see update items when you do that here you can see that the age is curved now save ctrl yes and copy this one and move back to dashboard and paste it over here and here what you have to do is you have to just do one thing that is change this target control to panel 2 and save this after this you have to actually start this project in order to load that user control into the toolbox here you can see this in the toolbox you can find you see update items here you can see this we don't have that so when you start this because it's taking a little bit of time so here our project has started and when you stop this and move back to work you can find we have this you see update items after this what you have to do is we have to just drag and drop it over here and place this on the proper position like this and when you place this yeah this box after this we have to just double click on this button to move to this pdn update click event and here what i have to do is i have to just do one stuff that is uc update items dot visible is equal to true uc update items dot bring to front that's it and what we have to do is we have to actually hide this you see update items when this form loads so here we move back over here you see update items dot visible is equal to false okay and now let's start and see if this works or not login click on this here this one is working fine okay now what we have to do is we have to add controls over this so let me do that move back to our user control we are here now what we have to do is we have to just start adding items inside this one let's do that first thing what we have to do is we have to add label i'm going to add that label drag and drop it over here reset this one on the proper position right click and go to properties and change the text update item hit enter after this let me just copy the size of this label so let me do that comic stands and size italic and 18 so back over here right click go to the first search for font regular and selector size bb yeah this one is looking better after this what we have to do is we have to add one more item label and text box over here so let me do that label just copy and paste and one text box so go now to text box drag and drop it over here and let me decrease the size of this one just click on this increase the size to 14 and change the text to item name we can search with the help of item name after this what we have to do is we have to actually make few changes for this text box so first thing what i'm going to do is i'm going to increase the font of this one so i'm going to change the size from 9 to 11 and hit ok ok sorry the size is actually increased due to the changes so let me place this on the proper position and decrease the size okay let me select the size from this one 228 comma 36 right click go to preferences set the size yeah this one is looking better after this what i'm going to do is i'm going to actually change the text color that is the full color change this one to black and after this you have to do one more stuff that is nothing but you have to change the style change this one from default to materials okay so now here you can see that this one is looking better and we have to add placeholder text so i'm going to add this one to start typing yeah this one is looking better okay sorry the size is actually i guess changed when i press the serial z key yeah size is eight now i'm going to do this 11 yeah now this one is fine after this what we have to do is we have to add one data preview inside this so i'm going to add that to data it will just drag and drop it over here just place this and what we have to do is we have to just stretch this right click go to properties and there we have to change one property that is the border style let me select this to fix change this one to fix 3d okay after this what we have to do is we have to add few more items into this user control that is nothing but the text for three text boxes and three labels and one button so let me just copy these paste it one over here one more over here and one over here and i need one button so let me do that button so i'm going to use this button just drag and drop it over here and change this one to update change the text first and after this what we have to do is we have to change the color zero comma after this change the font size from 9 to 11 and bold or regular yeah 11. you make this one both yeah this one is better after this what we have to do is we have to actually change one more property that is we have to set the border radius change this one to 26 or you can decrease it as per your requirements i'm going to say 21 yeah this one is looking better let me move these all the stuff little bit on the right side because we have lot of lot of empty space on the right side okay let me move this all little bit adjust these on the proper position change the text for this label change this one to category take this item name change this one to price and actually the size of these levels is quite large this one is not not looking that much nice so i'm going to decrease the size of these levels for now change this one click on this select 12 and hit ok yeah this one is better after this i'm going to start actually change this one the placeholder text okay this one is category this one is item name this one is price okay after this what we have to do is we have to actually add one rectangular shaper in this so how to do that for that just search for rectangular shaper just drag and drop it over here and what we have to do is just right click and go to proportions of this rectangular shaper and here we are actually and we have to just change the border width to 3 and after this what i'm going to do is i'm going to change the color for this one so fill color or sorry the border color actually border color just click on this and i'm going to select the red yeah this one after this what i'm going to do is i'm going to stretch this to all the corners like this yeah and we have to move this one like actually we have to move these all the stuff literally upside because to make a little bit of space over here now this one is looking better and what you have to do is we have to just move this one little bit on the right side now everything is on place except this one and now we have to set the border radius for this rectangular shaper so i'm going to do that corner radius change this one to 21. yeah there you can see this now the corner is curved now and this one is looking better after this what we have to do is we have to change the design now the designing part is over here let me start this and let me show you that log in here you can see this now the designing part is over so first thing what i want is when this when i click on this update items i want to fill this data grid with the data so how to do that for that first what we have to do is we have to change the design name of these text boxes and all buttons for now and after this i will write the code how to load this data with the data so let me close this and let me just change the name of this so actually what is the name let me change this one so find for name and change this one to txt search item okay search item name search item app after this this one pxt category after this we have this one txt name this one to pxt price and this button name to ptn update after this what we have to do is first thing when this form loads i want to fill this detected view with the data for that just double click on this empty space not this one when you when you add a rectangular shaper and when you double click on the empty space inside this this will generate a rectangular shape or here you can see this when i click on this rectangular shaper is selected when i click on this space then here you can see this user control is selected you see update item and when i click on this rectangle shaper is selected okay so click on this just double click on this and this was generated you see update items do remain after this what we have to do is we have to first make a object of the function class so function f n is equal to new function if you have not watched my previous video then you have to just watch my previous videos so that you can understand from where this function is coming up and how to use this actually i have written two method inside this function class that is get data and set data okay so i'm going to use that to extract the data and to insert and update that data into the database okay so here now i'm going to take a variable of the string type and naming that variable query okay after this now our object is ready and now we have taken a variable after this what we have to do is we have to write the query so i'm going to write the query query is equal to and in this what we want is we want all the data from that database select star from our table name is items our query is ready now next thing what we have to do is we have to call the method so function.getdata and this accept one argument of string type so i'm going to pass the query inside this one and as i've already previously told you that this get data method is going to return a dataset object for that i'm going to create a data set object dataset variable i'm going to store that when this when we call this method this query is going to be fired on the database and that method will return the dataset object and with the filled data inside that and that will be stored inside this one so next thing what we have to do is we have to just show this data into that data grid view so let me show that so our data review name is two data one we have only one data review that's fine so click on this and you can find the name over here in the top and after this we have to mention dot data source is equals ps dot tables and provides zero now start this and let's see if the data is fetched or not when we click on that update item login click on this there you can see this now we have the data okay so i'm going to actually modify this one little bit what i'm going to do is i'm going to add one method over here i'm not going to directly use write these line of code inside this one so i'm going to write one method so public sorry public void load data and name this one method this method load data and what i'm going to do is i'm going to just cut this and paste it inside this and what i'm going to do is i'm just going to call this method over here why i have written this because we are going to load this data multiple times okay whenever we update items we are going to call this method so that instantly we can see the difference what we have updated these type of stuff that's why i've written this okay so let me show this if this works or not login click on this and here you can see this now still we have the data after this what we have to do is we have to make that search textbook functional what it means that let me just show you click on this and what i want is when i start typing c when i type c all the rows all the rows which contains the items within starting with c like this folk cake these two row needs to be only visible inside this data grid view so let me do that for that what we have to do is just move back over here in the design part click on this guru properties and what we have to do is click on this stretch this yeah after this what we have to do is we have to actually oh sorry i would have opened the wrong project here what we have to do is just right click on this and go to properties and search for the event search for text change just double click on this and this will generate a text change even for that box i have written the name of this one txt search item here you can see this and we find it over here ext search item text change event is now generated and again what we have to do is we have to write the query and is equal to this time the query will be different so select star from items where name name we have confused the condition where i'm going to search on the basis of names name like single quotes double quotes two plus sign double quotes then single quote and here what we have to do is we have to write txt name dot text don't think the query is over one thing is still missing is that we have to add one percent over here just pause the video and observe where i have added for send sign and you can see that where i have added this percent sign before this single quote single quotes double quotes here you can see this double quotes close then before closing the single quote i have added this percent if you are worried about that from where this double quote is coming up then this one is from here okay i hope you understand after this what we have to do is we have to just fire the query normally so data set okay so i'm going to make few more modification over here okay so i'm going to actually make one modification over here so query is equal to i'm going to actually cut this one and paste it over here and this one is going to accept one qu r and q u are over here and we are going to pass query yeah that's it i have written this like this because with the help of this method i'm going to use this query 2. so what i have to do is now i have to just simply write load data and we have to pass the query inside this one and this will be functional let me start this after that i will explain what i have done right now just login click on this here you can see this data is visible and when i write c oh this one is not working okay let me check that text change query items everything is fine and this one is going to fetch that okay so let me remove this and write q u r over here directly and let's try once again okay let me check this one quickly okay so for now i'm going to just revert the changes which i have made so i'm going to just remove this one this part actually and what i'm going to do is let me just remove this one too cut this one over here just paste it okay so task is done as before let me remove this okay so what i'm going to do is here we have to write query yeah this one same as previously as i have shown you so now next thing after writing this query what we have to do is we have to just write data set ps is equal to function dot get data and inside this one we have to pass the query and after this we have to set the guna to data equity dot theta source is equal to ps dot tables 0 that's it now start this and let's see if this works or not login click on this and search for c a okay still it's not working let me check that actually we have made one mistake what is that mistake that is nothing but we have actually written that name over here is wrong we have actually setting the text from this one from this text box that's why it's showing an error that's why it's not working so what we have to do is we have to change the name txt search search item this is the text box name for this text box txt search item here you can see this now start this and let's see if this works or not so login click on this search for c yeah here we said it's gonna write c only two row with the cook and cafes over here when i delete this one and here you can see this we have all the data non veg yeah everything is visible and this one is working fine after this what i want is when i click on the any of this row what we want is these column needs to be filled with that row data so how to do that for that we have to code on this data it will sell click events just move back over here click on this and first thing what we have to do is we have to actually make one change that is let me change that edit mode change this one to edit programmatically otherwise this will cause an error whenever you try to click that the column it started getting edited and when you try to write something else and hit enter that will let cause an exception so after this what we have to do is just right click and go to prefer just click on this and search for cell click here we find this just double click on this and this will generate a puna to data group one cell click event here what we have to do is first thing we have to take one variable that is end i'm going to take this one id to store the id of that row after this id is equal to and i'm going to extract the id from that row so that is an type and whatever we extract from the row is a string type so that's why we have to use the parse method so in to convert the string type to integer type so pass method and in this we have to write this stuff how to extract that code so first mention the data review name so guna two data grid view one dot rows we need this clicked row so e dot row index and which cell we have so cells zero zero cell contains actually the id okay so let me comment this and show you start this the cell 0 why i have written 0 over there let me just show you that when i start this here because this is the cell 0 that is the first column and it contains id here because this one two three on the basis of this we can fetch and update the particular data from the store or any of the row okay so let me close this and i'm coming this and after this cell 0 what we have to write is and from that cell 0 i need value and convert that value to string format ok so now we have the add let me just add a breakpoint over here and start this and see what happens when i click on that row what actually this id contains just start this click on this i'm going to click on this one non-which and the id is fixed so click on this and let's hover over this here you can see this id is six here you can see this yeah this one is working fine so let me stop this and start putting further after this what i want is i want to actually extract the values that is category name price from that row itself and after that said that set these all into the text box so that what we have to do is train category is equal to [Music] and this time we need have we have to actually write because the first column that the zeroth cell contains the id one contain name of the items and two contains the category that's why i have written two over there so that i can fetch category and convert that into string value dot to string after this i need after category okay so we have we don't have any error okay so name is equal to 2.2 dot rows and we have to mention e dot row index and we have to mention that fill the cell is one this time and convert that value dot to string and after this we have price so end price and we have to convert that in dot parse and convert that into integer type so dot rows [Music] e dot row index dot cell and i have to mention the cell 3 dot values value to string yeah that's it now we have all the value when we click on that row after this variable is we have to actually show that items so that is stuck in the text boxes so txt category is a text box with the category label so dot text is equal to what category this category is the name from here this one okay so we are going to actually use this id later when we click on that update button so with the help of this id i'm going to update that that's why i have taken this id outside this method okay after this what we have to do is we have to set the name so dot text is equal to name after this we have to set the price price dot text is equal to price and convert that price to string because string is visible if i write like this this will not work you can see that it's showing an error so convert that into two string type that's it now start this and let's see if when we click on that this works or not login click on this and when i click on this one here you can see this this one is category so category south indian and you can make changes yeah this will this is working okay so item name is that the price is 45 yeah everything is fine after this what we have to do is we have to put for this update button okay so let me do that close this move back over here and just double click on this and this will generate a repeat button click event vdn update click if it is generated after this what we have to do is we have to write the query first query is equal to and we have to write update items set name name is the column name in the database so i've already shown you in my previous video if you haven't watched then please watch okay after this we have to write is equal to single quotes double plus plus double quotes and single quote this is the string type that's why txt name dot text we have to fetch that text from the txt name text box txt name is the text box name actually after this we have to set the category so so from here category is the name of the column and the database so single quotes double this is also a string type so double single like this pxt category and after category takes the category dot text after this what we have to do is we have to actually mention the price from our price price is also the column name in the database so price is in the big information we don't have to include single quotes so we have to directly include double quote plus plus and double click that's it and we have to mention the text also txt price dot text and after this what we have to do is we have to identify the row which row we want to update if we just fire this query each row in the database will be updated okay so we have to mention where id id is equal to and this is also in the string not the string types and integer types with double double quotes and two plus sign within this we have to mention the id so from where this id comes up let me show you from here here you can see this when i click on the row i've extracted the id inside this variable and i'm going to use this variable over here it's showing an error because we haven't closed this query by putting in double quotes and one semicolon yeah where it is completed why i have put this double quotes because we have opened this over here here yeah i hope you understand after this what we have to do is we have to justify this query on the database so what we have to do is we have to just show fn dot set data and query that's it after this let me check that if this works or not let's start this login use items update items and here we go i'm going to change the price of hope to 5000 just click on this and just add two more zeros and click on update data process successfully and click on ok here you can see this the 5000 is updated but it's not visible over here this one is not looking that much nice what i want is whenever i click on that this row are automatically updated at the same time so let me close this and let me show you that if that is actually updated or not so i have closed that and started that application again and log in click on this and here you see the 5000 so how to actually do that instantly for that i have written this method over here load data and i have created this method because we are going to use this multiple client so you can see this on the you see update item load event i've already used this so i'm going to use this once again when the separation is completed i want to use this over here so no and start this login click on this click on this i'm going to change this one to 50 delete two zeros click on update data process successfully here in the series still we have five thousand but when you click on okay you can see the price has changed to 50 and one more thing what i want is when the separation is successful i want to clear all these text boxes for that how to do that for that we have to actually use right through line of code that is txt name dot clear txt category dot clear pxt price dot clear and now start this login click on this change this price to 55 update okay and here you can see this yeah everything is clear and this one is looking much better than before so that's it for this video guys if you have not subscribed to youtube channel please subscribe and hit the bell icon and in the next video i'm going to show you how to design the sorry the remove items user control and how to back and code for this so just state you and just share with your friends thanks for watching hello everyone welcome to my youtube channel in previous video i have already shown you how to design this user control that is update item and how to connect this with the dashboard and i have also shown how to back and code for test so if you have not watched my previous video then just go to description there i put the link for my previous video or you can simply do one thing just click on the solution on the right side of the screen so in this video i'm going to show you how to design this delete that is remove items okay and how to back and code for this so for that let's start with that let me stop this and move back to our project on which we are working we are working on cafe management video so i move back over here and after this what we have to do is first thing we have to actually add one user control for that just right click and click on add and select new item click on user control and after this you have to just name this user control so i'm going to name this one uc underscore remove item click on add and this will add one user control after this what we have to do is we have to actually set the size for this user control so click on this and i'm going to copy the size from this one the size is 781 comma 514 so copy right click before it paste it over here and hit enter change the back color first so back over here and search for back color click on this and click on custom and white after this what we have to do is we have to connect this with the dashboard so for that just go to toolbox and search for do not to ellipse just drag and drop it over here right click and go to properties and property change this border radius to 30 and hit enter change this target control to user select this one use remove item save this after this copy this one and move back to dashboard so let me close this stuff for now move back to dashboard and here we go and here what we have to do is we have to just paste that item over here and select the target control panel 2 and just save it and after this what we have to do is just double click on this remove item and here we have to mention you see update not update oh sorry i have not added that right now so actually when you paste this over here that user control is not added in the toolbox here you can see this user remove you cannot find over here so what we have to do is we have to just start this and stop this in order to load that into the toolbox so i've started this project and now i'm going to stop this after this when i move back to toolbox you will find that we have uc remove items so after this what we have to do is we have to just drag and drop it over here and paste this one on the proper position yeah there we go after this just double click on this and you see and here we'll find remove item dot this bill is equal to false sorry we have to make this one true after this you see remove item dot bring to front that's it and after this we have to make one more changes that is when this form load that dashboard load we have to hide that user control so you see remove item dot visible is equal to false just read this and let's start and check if this works or not login click on over here yeah this one is working everything is working actually so i'm going to close this and start adding items over this so let me close this first thing what we have to do is we have to add a label over here so let me add that actually let me copy that from the previous one so i'm going to copy this and paste it over here and i'm going to change the color change this one to black or whatever color you like and change the name so delete item after this what we have to do is we have to add one more label and text box so copy this and paste it and decrease the size of this label so i'm going to decrease the size of this one to 40 hit okay after this what we have to do is we have to add one text box for that text box just drag and drop it click on this change the size this one to 11 okay so let me yeah 11 and change the color to black paste this over here and what we have to do is we have to just decrease the size and change the style so that here you can observe that it contains the border from the all the side i want the underlying only so click on this back over here change the style from default to material and after this we have to add one placeholder text inside this one so i'm going to add that to start typing after this what we have to do is we have to add one data criterium so data search for data grid view do not do retargeting just drag and drop it over here place it like this and we have to stretch this all the way to the bottom like this this we have to change one properties for this one so first thing what we have to do is we have to change the data cell style not this one actually edit mode change this one to edit programmatically after this we have to change the style for this one so select for sorry border style actually select this click on this fix ready and here you can observe now this one is looking better yeah after this what we have to do is we have to add one more level over here so copy this paste it and over here just decrease the size for this level because this one is looking a little bit large and change this one to 10 and hit ok hot 11 i guess 11 will be fine yeah change yeah the label is now everything is ready and we have to add one more stuff that is rectangular shaper so i'm going to add that that technical shaper just drag and drop it over here and we have to change view properties of this rectangular shaper so border width is three changes into three radius is 21. after this what we have to do is change the color of this one so border color changes from zero comma one eight comma two yeah there we go after this what we have to do is we have to this just place this on the proper position and stretch this like this here you can also this one is looking quite nice here we go yeah after this what we have to do is we have to actually change the design name of this text box and the label right click and go to properties and after this what we have to do is we have to actually change the name so change this one to pxt search actually we have to change the label name too so we have to change the name name to item name and this one we are going to add the name whatever text inside this one programmatically so we don't need this so i'm going to change this one to label for now yeah i have changed the name for this one txt search and after this what i'm going to do is i'm going to change the name of this label because we are going to set this programmatically that's why i'm going to actually set this level so just click on this back over here i'm going to name this one i after this what i want is when this user controller form loads this level needs to be set with the name that is how to delete and after this the color for this one it needs to be blue and the second thing what i need is this data grid view needs to be filled with the data when this form loads just double click on this and the switch already you see remove item load event and here first thing what i want is to set the text for that level so dl label is the name for that and text is equal to how to delete as i have already shown you this demo or overview when you write this and start this and let's see if this works or not login go back over here you can see this how to delete yeah this one is working fine and we have to change the color for this one to blue so let me do that to pl label dot for color is equal to color dot blue and this will change the color after this what we have to do is we have to actually write a method to load data so i'm going to write that material in the previous video i've already showed you i haven't already actually written similar method so you i hope you understand if you have watched my previous video so public void load data means this one because we have to fetch the data from the database and we have to show that data into before that before i write the method first thing what we have to do is we have to create a function class object so function append is put a new function and after this we have to take one variable of the string type so i'm going to be string and i'm going to name this variable ready after this what i have to do is i can just write the query over here is equal to select star from item after this what we have to do is we have to just fire this query into the database and extract that data and show that data into the detector for that we have to call the method fn dot get data and this method actually expect one string type argument so i'm going to pass the query and this method that is again data method is going to return a data set object so that's why we have to store that too so for that i'm going to creative variable of type data set ds is equal to and when this method is called the data is going to be returned and that will be going to be stored in the data set and after this what we have to do is i have to just so that now this ds actually contains data okay after this what we have to do is we have to show that data within the data review so click on this and we check that name so detected group one is the name so i'm going to name this one dot data source is equal to this dot tables zero that's it now let's start and after this now what method is complete what i want is i want to call this method over here so that when this form loads that data fetched and also load into that data grid view so load data now start this and let's see if this works or not login click on this here you can see this yeah this one is working fine after this what we have to do is we have to actually make this one working and i can select search for items and after that when i click on that i want to delete that i will it will be possible to delete that row there you can see this the color of this one is also blue now so first i'm going to code for this one so move back over here click on this click on events and text change just double click on this after this what we have to do is we have to write the query and we have to write the query select start from items item is the table name where name is the column name name like single quotes double plus plus double quotes and single quotes after this within this we have to mention txt search dot text and we have to mention percent over here so txt search dot text is the text box name and why i have written the percent it means that whenever someone write a it means that a and percent will be fired in the database a percent means whatever text is starting with a will be extracted from the database and shown okay after this what we have to do is we have to follow the same step fire this into the database and extract the data and show it to the reductive view so theta said yes is equal to function fn dot big data let's check if that text box works or not login click on this we have to write yeah this one is working yeah everything is work yeah now next thing what we have to do is we have to actually code for the cell click event what i want is when i click on this it asks for user to if are you sure you want to delete and when a user click on ok then only this row needs to be deleted so let's start with that so back over here click on this and we have to just go to events and there you have to just search for cell click here you will find this just double click on this and this will generate a good two data review self click event and here what we have to do is we have to actually first what i want is that it asks from user are you sure you want to delete if message box dot show delete item question mark and i'm going to name this one important message this message box needs to have some button so i'm going to keep two buttons that is okay and cancel and after this i want some icon for this one so message box icon dot information or you can change this one to warning because this one is and after this we have to just write double equals and after this we have to check that what actually user click on ok or cancel so dialog result dot okay when this user enter ok click on ok then only we need to process further the else condition we don't need to do anything so let's check that when i click on that this message pops up or not click on okay it's already started login click on this and when i click on this yeah delete item yeah this one is working fine when you click on cancel nothing happens and when i click on ok that rule needs to be deleted so after this what we have to do is we have to write the code over here so first thing what i have to fetch from this data criteria is nothing but the id from the zero cell so let me do that for that i'm going to write end id is equal to id i'm taking a variable of integer type id and after this what we have to do is whatever in the datagridview is in the string format so we have to convert that into a visual type so in dot paths inside this we have to write on the data between name puna 2 data group 1 dot rows and this we have to mention e dot row index and which cell i already told you that cell 0 dot value to strength yeah here we have the id now and what we have to do is we have to just delete that id delete that row with that id so we have to write the query now so query is equal to delete delete from table name that is items where i id is the column name in my database actually my table and we have to mention that id so double quotes and within this double quotes we have to add two plus sign because it's integer type so that's why only two forces needed and pass the value that is id after this we have to just call that set data method and we have to pass the query and after deletion what i want is that form that data needs to be reloaded so that it's instantly so the changes so we have already written a method over here also load data so i'm going to call this method over here after the deletion the data will be automatically loaded so let me do that so start this click on this login click on this okay so first i'm going to add one item so category cake and i'm going to add abc price 2000 the cad item okay move back over here and here what we have to do is abc search for abc here we can see this abc just click on this and here you can see this delete item when it cancels nothing happens when i click on ok data successfully click on ok yeah but you can see this that item is removed next thing we left with one stuff that is nothing but how to delay what i want is when i click on this it needs to be show an instruction okay so let me do that just close this move back over here move back over here and what i want is when i click on that it is to show the instructions so just double click on this to generate a click event for this just double click on this and here we have to set el label dot fall color first needs to be color dot red i want to change the color first and the label dot text is equal to click on row to delete the item start this and let's see if this works or not click on this and here you can see let's see how this one is working and one more thing what we have to do is when this form when we leave this user control uh sorry when we enter this user control the data needs to be loaded instantly i have shown you actually i don't know you figured that out or not here you can see this when i add one item so click on the key add item abc again and price is 5000 click on add item and click on ok now the item is added but when you move over here remove item and here you can see this you can see that item what we have added when you try to search this abc yeah this will be over here when you delete all this now we have this what i want is when i enter into this user control i want to see this data so for that what we have to do is we have to just move back over here click on this outside this not this empty space when you click on this like windows shaper one is selected you can see over here so click on the empty space outside that rectangular shaper and search for enter event so click on this and search for enter event here you can see this double click on this and here what we have to do is we have to just call the method that is load data that's it let's start this and let's see if this works or not i'm going to add one more item click on this add item category stop drink something hope it's already added thumbs up and prices 25 add item click on ok back over here and here you can see this when i click on over here i have to start typing you can find thumbs up over here okay and here you can see this everything is working fine so that's it for this video guys and here our project is completed in this video i hope you enjoyed putting with me and if you have not subscribed to my youtube channel please subscribe and hit the bell icon and share with your friends thanks for watching
Info
Channel: BTech Days
Views: 63,073
Rating: undefined out of 5
Keywords: cafe management system in vb.net, cafe management system, management system, c# café management systems, c# object oriented approach cafe management, hotel management system in c#, coffee shop management system, pharmacy management system, hotel management system, medical store management system, hostel management system, cafe management systems in visual basic.net, pharmacy management system in c#, mobil shop management system in c#, mobile shop management system in c#
Id: PjzediWjKPQ
Channel Id: undefined
Length: 225min 33sec (13533 seconds)
Published: Sun Aug 09 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.