Windows Form Application C# Tutorial for Beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome back in this video series we will learn windows form application so windows form application is used to design the application desktop application right gate so we will talk about how we can use Windows from application to design the application so first of all we must know what is when this from application and in how we can create a project in windows form application right so I close this project and go to the file new and project after creating a project then you need to select windows form application okay this is the shop windows form application and you need to write the enter of the project map but I will make basically folder windows form application windows form application files will store in the windows form application folder and I write the project name the project name is inform informed review and click okay that's it you will be able to see the windows form application on your console screen so wait a couple of seconds to create the project then we are able to use the toolbox and properties okay now this is a your windows form application you will be able to design the application on this form but we need to know the toolbox properties solution Explorer and many other options basically this form have personal property I go to right side and select the property then you are able to see those those properties those all properties have our windows form application you can use it to set up your windows form application right I have an increase the windows form application size I can do that okay just drag and drop on the corner side now they had many options available the first is form button and many other options you can use them to set up the form okay so I'm gonna change the background color so I'll select bake color and custom and select the white okay now I'm gonna remove the maximize button so here the all properties have windows form application so I change the basically where is a maximize okay minimize and maximize yeah this is the tree means available i select it and i select false then you are able to see the windows our second maximize button has disabled i said we're on the project then you are able to see that when maximize button has disabled okay now you can see here this is a your application form but this time they farm available in the left side you can't show the windows form on the center do you want to display this form on the center you need to select start position select the start position and select the center self around the project ok now you can see now the next is there are many other properties but i will tell you the important property which is used to design the form and application ok now i want to change the basically do you want to change the icon like this you can select the icon and click to drop down dot sign and select image as you like ok now i will basically set up the form where is a farm property I find the farm property okay no fine border-style i select it and i wanna change the style of the powder i select none you can see it the farm is blank I'm gonna select far fixed single I'm gonna select fixed 3d I'm gonna select fixed Twila you can select any one as you like but but we are using the fixed single okay this is normal now another important thing or do you want to remove the minimize are disabled to minimize button are close button you can do that okay now this is all about this farm properties okay you can use them to perform the different all scarred design the application like this okay I close it and I go to basically solution Explorer this is the solution Explorer and this is the Oval form in this form name I right-click it and go to the open in the file explorer in this project you can see a our farm project okay now I am going to create another farm with this project under this project so what I can do this is our farm right i right click it and go to add new Adam and then select the windows form application and into the form their review - okay and click Add this is the our another form in this form I am able to set up this form I select it go to property this is another form unable to use some process to center the screen and resize the form okay and I change the color background huh and I disable the maximize button where is the maximize maximize but to you I double click it this is another option okay and this is our second form this is our first form okay I open the project then you are able to see this is a farm review - and this is our normal form ok so this is the all about the farm property and form vendors form I hope you are understood as well thank you very much for watching see you next lecture guys hello guys welcome back now in this video I'm going to teach you tool boxes ok I go to tool box the farm has available on my screen I go to toolbox and I are - hide I'm in India tool box bar then you are able to see the lot of tool box available you can use them to design the windows form application right case but in this video I will teach you level textbox and buttons so I search on the tool box search box level and you are able to see the level I simple drag-and-drop the label on the windows form application then you are able to see the level one as disabled on the has appeared on the windows form application this level have personal property so I am able to use the label property to set up the level okay so I select level and go to the property and I change the level name basically there are two name the first name is used to programming language and second name is used to display the data on the console on the form application okay so this is the basically programming name alright I do not write anything else because I just display the text on the console is key on the windows form application I scroll down this is a text okay this is the text I change the text then you are able to see that text will change on the windows form application all right now this is a property of the property okay level property and there are many other properties available you can use them to set up the level okay and change the font size if you see you can do that now I copy it and paste here second time and set up the second level and change the second level man I'll write the designation okay copy it and paste here third time I set up the third level and Chandy name display name right guess this is a display name of salary okay now I'm gonna use text boxes to design the form so I select the text I just write text and you are able to see text box as drag and drop the text box on here then I am able to resize it okay then I select the play button and I select the multi-line then I am able to increase or decrease I copied Esther and you are able to set up design the farm application depend on your mind okay those are three text boxes we will use them on programming language to get data and display on the screen okay so first step you select the each text box and go to property and change the men this is a basically name we will use on the programming language so first step you need to write the exact text name I write txt nap I select the second level and I change the man txt designation and third txt salary we need to use the button we will use the button to display the data on the screen so I select the such d button on the tool box and select the button on here and I am able to use the button properties like standard op op and the flight stand there are many other properties available in the pattern I just keep it and I change the gesture text and also button programming name t Beach here okay and I'm going to change the display text so I go to below and select the text property and change the name itself okay those are basically I mean tool boxes and each tool box property I set up the form and this is our farm in this farm I have placed three levels three text boxes and one button in the next video we will talk about how we can use it to display the data on the screen okay so thank you very much for watching see you next structure guys hello guys welcome back in this video I'm going to teach you how you can generate the event on Chile and get text boxes data on the stream okay so first of all I select the button and go to property in this property you are able to see the event icon as delegate and there a lot of event you can use them to generate the event but I have already used Killick event it means on click event so I select the Killick event and double click on it then I am able to use the on click event this is the event section okay starting and closing curly brackets in this starting and closing curly bracket you are able to use anything else as you like for example I want to check the event working or not so I write the message box not show and write hello then you need to write terminal sunset run the program I click serve now this is a basically event it's what you find now I go to my farm section design farm then I either get the each text box data in the programming language and display on the screen on clay so I go to farm I mean programming site then I make a variable stream into the name of the variable I write the name then I used HL sign then I used programming text box man okay I go to the farm select the text box go to property and select this setting I mean property option setting icon go to abort this is the program name okay I copy it and paste here and write the door text that's it and I'll use message box start show and call your name is concatenation sign and name ready sir add on the program I write Assaf and hit enter your name is awesome okay now I close it so we will get the another text box data so I make a variable string into the variable man and resignation I use same process to get the second text box data so I use T X T this is the second text box named txt designation dot txt okay I make up integer variables so basically the celery is integer type so we will get the integer type data on the integer variable so I make entity a variable then I use a key else and then you need to use same process to convert the data in teacher I write n dot parse parentheses in this parentheses you need to write the third lap textbox man okay that's it so I call those data on the sorry I write message box not show name is concatenation sign first variable I use concatenation sign your designation is second variable name concatenation sign you are salary is concatenation sign and third variable now that's it sir and then run the program i right Assaf programmer you are at the salary your name is acid your designation is programmer yourself is far far far okay now another thing for example I wanna display the all data in the level so I'll copy the level basically and passed here any places you want to display the data I select the the level and setup the level on her then I click level go to property and remove the level text name okay text them which are display on the screen I remove it then I go to a bow and change the basically programming name all right LP I'll display enter any name as you like okay sir I go to farm one and I will use the basically a copy the line like this and comment it then I caught LP I'll display dot txt and I use the curl to cheat ax t k dot text and this is the level 1 text well I mean one text box data will display on the text box level 1 is under the program yeah I use assless okay just a minute guys I will one texture what is text okay so I take ilton am sorry use Asif give what is problem nowadays I just comment it okay sir another program I use Asif okay now right you can see a Asif has appeared in the level section so you can use it to display the name on the message box are level so I hope you are understood as well think very much for watching see you next lecture guys hello guys welcome back in this video I'm going to teach you radio buttons and checkboxes are you can use radio buttons and checkbox to set up the form or design form and also use the radio buttons and checkbox in the programming language okay before understanding the radio buttons and checkboxes we need to know another thing in previous lecture I have displayed the only one variable value on the level but you can use designation survey and many of the variables in this single level how there's very simple use concatenation sign double quotation it is basically a space when I use concatenation sign second variable name concatenation sign double quotation space one catenation sign third variable itself kind of the program all right as this programmer a sub programmer and 2,500 right let's see the radio buttons and I copy and paste the label and the devil man copy product property and change the display name only discipline and gender okay then I go to tool box and select the radio button Drake and drop 20 button one radio button to copy and paste select one radio button and display the text change the display text knob and change the programming name by the programming name RPG and Mel and select second radio button and change the programming name RPT and phenyl and change the text Silla I go to program okay I close it do you want to use I mean go to the programming side on the farm section there are two ways first is double-click on it the I'll jump on the programming side close it now second is go to the solution Explorer and right click on the farm this is second farm sorry farm one this is our from one data a right-click it and go to view code okay this is a farm out key you can use any one as you like a double click on it and I am available on event generate now I make a variable gender just a little micro variability then I use if statement parentheses and I call the RPG and Mel used Roth checked checked' if our between Mel is checked to display the gender value mal and I use al statement to display generally female female okay now I will use the gender variable on the level double production space concatenation sign and chained available sir another program our asses programa celery select mal okay but I need to change the level button 57 in the program all right asus programmer celery animal okay I change the female gender and now the next thing is I'm gonna use checkboxes copy and paste the level and change the level display men I used the and I go to tool box and select the check boxes ok check box drag and drop check box or P and pest check box select first check box and change the programming name see chk good you can write any name as right right and I change the text good and I select second checkbox that could change the programming Nancy H we could okay I double click on the button and then I use same process to make a variable and make a variable string review enter any name okay then I use same process a false statement I call chk good dot checked and called the review variable and assign the value good and call else statement called review dot very much okay then I just a call variable on the latter section okay best and sir another problem right in a massive drama man very good and check it good good female female okay now you can use them to design the application and use the if else is dead man and set up the farm as you like I hope you are understood as well thank you very much for watching see you next lecture guys hello guys welcome back in this video I'm going to teach you how you can display the text box radio button and check boxes data in the grid view so let's get a start to understand go to the tool box and search the data grid with drag and drop the grid view and set up the grid view in the farm I change the location of the pattern and I set up the grid view okay Chane the gridview name programming name I'll write the DT you get a gridview okay then I double click on the button event first step you need to make object of data table data table is a basically data table and used to assign the video in the grid view okay now the first step you make an object of data table this is the data table now the next step you need to initialize the variable on the class under the class we will use it on later so I copy it and paste her to time and I just change the string okay because I will use it in the next I mean another way another part so I copied and pasted where and change the type and we remove the child and cut it faster okay those are our variables under the class section then I am able to access them under the class section okay now the next thing you need to make a method I have already basically make a method public wire display in this method you need to call the data table object and call the columns dot add first step you need to define the columns name opiate fast fast fast fast this is a your column names we write the designation Shalaby gender and then finally ready okay then the next step you need to call data row and make object of data row and assign the DT dot Bureau okay sign maker object D G dot neuro parentheses and in this D are object you need to initialize the variables which we'll use to get the text from text boxes and radio buttons I have already get the text varies from the each variables like name designation salary and I have initialized those variable on the class under the class section then I am able to access them okay so I called ER and write the array range 0 and assign the value in first index number name okay test test test test and change the index number two three four five change the variable designation and then salary gender and then finally reveal then finally step you need to call the basically the final step you need to call DT dot rose dot H and parentheses and called the dr finally you need to call the data gradual teaching okay and use dot sine data source and initialize the dt that's it sir and copy the method and paste under the event I mean on click event cell and on the program and I enter the value as if programmer and into the video email good okay nan those are basically columns name you can see a name designation salary gender and review and here our name programmer in salary and basically gender okay now another thing you need to know I'm gonna click on the button then the text boxes will automatically empathy are emphatic okay so I will make a method public wild display I write the empathy then I call T X T name dot text tells you and putting txt designation txt name dot txt check check and 30 T X T dot salary so it's celery salad cheap XT sell a tweet our text tilted empathy and T txt what is the name of the those are basically ready button so I can't use use them self copy the method name and paste under the event I mean own click cookie run the program and then into the celery Mel good the data has been blanked I mean textbox up or blanked okay now you can use it to perform the different ask you guys so thank you very much for watching see you next lecture days hello guys welcome back in this video I'm gonna teach you combo box how you can use combo box to insert the value and also get the combo box selected value on the console on the screen so let's get start to understand its first table you need to go on file new project and then enter the project name I'll write the project name combo box then I go to toolbox and search on the toolbox level dragan drop table and also combo box that's it okay and also I use button this is our combo box this is our Burton and I chained the basically level man-horse okay and I select the chain the button name save and change the programming button name in Bucheon cell and I'll select the combo box saying the combo box name CMD course and then I change D another thing I do not change another thing okay so first step I will not display the value on the console on the combo box so first step we need to double click on the any white place on the farm then you will be able to see the event has generated namely farm Lord it means farm the Lord then the data will appear on the combo box so first step we need to call the combo box man I write the C and because dart Adam dot add add and in this parenthesis you need to enter the values I write this each our programming copy and paste many times and C++ programming C programming Java PHP then I will run the program then we will be able to see the data will appear on the combo box let's check it okay now I'm gonna display the each selected value on the basically message box so what I can do first step you need to select the combo box and go to properties and we select the events and select the selected index change this is a basically event double click on it okay selected index changed then you need to make a variable I'll make a variable string name this is our variable name and I use HL sign and calls combo box select add selected value dot true string okay then I call message box talk show and I called the variable on the message box that's it serve and run the program then I select the combo box and then select any value okay I think I fries the error okay don't worry I will tell you what his problem selected value although it's selected selected wave selected item so under the program okay now you can see him I select the Java programming now you can see a Java programming I'm gonna select this PHP programming PHP programming okay this is the basically on select tion change event but I have a none display this event I'm in a data which will appear on the combo box I wanna select any one value then the value will appear on the message box so what I can do first step you need to select the form and double click on the button to generate the event this is another way to create a event okay now the next thing copied and pasted the variable you need to make under the class then you are able to use this variable under this class and then I remove the string try then I just copy the message box and paste message box on the on click I'm in button on connect let's check it select C++ okay now you can see here this is a call basically calm box how you can use it and display the value on the combo box and use event to get the selected value on the variable and you will be able to use the variable in the event section or restore the value on the grid view you can do that okay I hope you are understood as well thank you very much for watching see you next lecture guys hello guys welcome back in this video I'm gonna teach you how you can use panel to design the menus in the windows form application so I have made the project with the name of panels and the default form available on my screen so I setup the size of the form boggling this is our farm size and I go to properties and set up the properties of this form the default screen which will appear on the center and I change the background color white okay now the next thing I'm going to disable the maximize maximize sorry this is the minimize it looks nice okay so I go to tool box and then select the panels such the panels and you can see the panel drag and drop the panel on the windows form application then you are able to use our setup the panel anyplace as you like okay but the best way to use the panel's select the panel go to property and then find the talk option here talk select it and here the whole farm size is available on the dock type you can select any one as you like for example I only display this panel on the header section so I select the app for our header section talks section and you are able to see the panel available on my header section do you want to display the left sides just select it and you are able to increase and decrease the penile sighs okay now the best way is to use the panels in the top corner okay now I'm gonna decrease the size of the panel then I am able to use that chain the background color and the patterns on the panel and many other thing you will do there okay but I go to browser and this is a color picker website let you color and I picked up a la like red and go to my project and find a color for color based the color on me okay this is not I just where is a give pop a color here okay I change the pickup okay now you can see it now the next thing I'm gonna include the button and also image but will appear on the panel size I mean in Knut or inside the panel so I go to toolbox and search the pattern and drag round up the pattern on the panel and the set of the pattern and I wouldn't add the image inside the pattern are under the pattern so I select the pattern and I go to the yeah you can see it the image I select the image option and click to dot science and then import actually import I have many images like the localized add atoms product reports and self productions it is he so I select the first image and open it and click OK the image has appeared on the button I haven't to setup the image so I select the align of the image here you can see the image aligned I select the drop down menu and select the left side okay now the next thing I having a set of the pattern text so I just change the text registration now another thing I'm gonna change the button style so this is time button install a strainer ice select flight okay then I am gonna change the button color okay so this is I think this is a basically button background color but I don't like it I just really change it I use same color or pit and pressure okay what is this okay I just button okay I haven't selected button color just a minute guys button color for color font where is the appearance oh no no no no this is an odd fashion color for color and the ground color change this is a the ground color of button I change the button color whereas the pearance felid style for color chain the for color I will check it ok that's great for color then I said the image aligned so I select the image aligned and select the right side image like this is the option image Alliance or change the image aligned where is the text aligned option i find that basically image align and also text alignment as you can see text aligned select text align and right side okay now you can see it then I will change the font size so I select the font and use the font this and increase the size of the font okay I mean I think this is the best but I'm gonna increase get this is a great safe and when the program you guys know you can see here our panel over button okay I click it I am able to use this button to display the form or many other activities the next thing I'm gonna include another buttons so I just copy the button and paste here okay and select the second button and change the second button image this is the image so I select image and port and I select second image key and I change the text which will appear on the second pattern I write in Vice and I copied and pasted her I decreased the size of the second better and select the third button and change that but an image key and change the images text at once okay copy and paste and I change the image just you need to change the image and and I use products okay copy and paste and I change the image reports I gently match reports text yeah finally a copy and paste the final pattern and decrease the final battle size and change image and I use final image and change the shop I think self this is the best way to design an application okay I run the program okay now you are see the match button looking some eyes this is our application look now another thing do you want to add the image on the windows form application you can do that but I will tell you on later so I hope you are understood as well thank you very much for watching see you in the next lecture guys hello guys welcome back in this video I'm going to teach you how you can use are included the image and also how you can use menus so first of all we will include the image on the windows form application in the whiteness area so I'll go to tool box and search on the total box picture box okay put your box drag-and-drop and set up the picture box okay then I go to a pillar pattern this is a belly button I select it and choose image and for the image basically I have already download the image like this so I select this image obtained I am okay now this is our image do you want to set up this image you can select again play button and this is a mood of the image normal sketch and utter resize Center zoom this is the image features you can use it okay now the next thing I'm going to include the menus in the application so I go to a tool box and such on little box menus just drag and drop the menus okay now you can see a menus option appeared on the header section I select it and enter the name of the meaning for example our item at home then I'm gonna include I'm gonna make a drop-down menu so I selected this second like this option otherwise I'm gonna create another menu so I select the strength line another input text box so I used the mm exit okay cell and in the program okay now you can see here but I think I need to set up the image okay cell and on the program now you can see our guys our application looking so nice okay now I will use event on pattern click so I double click on it to generate the event and right on the message box dot show registration form okay sab and on the program okay now I'm gonna include the basically the event on the menu so I double click on exit button I'm an exit menu then I just write the this dot started I just write in wire man dot accept okay zero that's it sir on the program that's it close it done program exit close it run program and I clay registration okay exit cross hey guys so I hope we are understood as well thank you very much for watching see you next lecture guys hello guys welcome back in this video I'm gonna teach you how you can create a student registration form and also design it then we will be able to use on Killick I mean registration on click to display the another form on our ice cream okay so first step you need to select the solution Explorer right click on the panel go to the add new your term and select windows form into the farm there and set up the farm ok and go to property and set up the property of the farm center and then I change the background color the farm white and I go to the basically tool box and search on the tool box below box through Park set of the group parks yes and chain the group Oxman basically registration okay did and I change the background color of the groupbox white now I need to get the level pattern and put text file text boxes radio button and grid view basically we will use them to set up the form right guys so I first set up the label and change the label name man and I change the font size and also design and also font size and I set up the in protect field okay Oh Taoiseach and change the basically second level am i right July 2nd Evelyn F name okay copy bought text boxes and also Leben's copy and paste change the text designation and then change the email okay I change the only okay now the next is I copy the pot text boxes and levels and pasture and I change the ID and I fight the what I can fight the fail to get the data name for the name destination email ID and then then all right the basically but I can write in the final text box okay I just remove it and I just change the right gender and set up the radio butter one and two and I'll write the male and female we will set them programming names on letter but this time we need to set up the basically okay I need to write another feel like address all right the third address okay copy and paste okay and set up the this is our grid view okay now I need to I just set up the farm okay guys this is our farm and I select group box again and just set up the group box and the white side and then like there's a pattern cut the button and set up the group box and I paste the pattern okay now I select the flat color copy the color and paste that button color and select the strained flight and I remove the bottle okay and change the text basically self okay and I set up the font size and also design I use the trend then it's true samal I select twelve and change the font color copy and paste save update and delete set up the phone to change the text alike delete okay now those are our patterns we will use them to perform this operation I'm in self update delete okay I change the group name sessions that's great now the next thing I'm gonna use the date time picker to display the date time on the that's so now is said now I wanna use this farm this farm on registration click so what I can do first step you need to double click on the registration to generate the event then you need to make an object of another fun like registration this is another form namely registration so I need to make a object so I go to file an America object I write registration rjh to new registration this is another farm object so I just copy it the registration name best dodge shop that's itself run the program okay I click okay now as you can see him okay but I need to remove the maximize button in D and on this farm so I find the maximize button now another thing I'm gonna increase this farm size just a minute guys like just controls it controls it controls it I think this is looking so nice but I'm gonna increase Article II the size of the farm I can do that okay guys so thank you very much for watching see you next lecture guys hello guys welcome back in this video I'm going to teach you how we make connection between windows form application and a skill server so I have already opened the secure server and I'm gonna connect with Seiji ozawa that windows form application to store the data in the database so first step we need to right click on the any white place in go to the poof you called first step this is our basically registration form in this form you need to go on the library section and import the library using system dot theta dot sickle client after importing the library then you will be able to use secure server Curie's there are two ways to make a connection the first ways I make a for example stink variable and I use path and assign the value get a source use this is a basic way okay and a kill site engineer assign initial catalog actual scienter minute or so and then empty great head security integrated security I used to you because I will use sequel server to connect with the help of Windows authentication mode open this and I select the connector object if I'm gonna connect the windows I mean username and password so we need to enter the username and password I'm here but I'm going to connect the secure server windows authentication mode so I just write to you ok then click to connect this is our c2 server ok and then finally you need to write Terminator sign ok the first step in the data source you need to go on the sequel server and click to connect basically connect to server copy the so name this is the result and copy it and paste have in the initial catalog you need to enter the database name so I connect the database and select new cutie and I will create a database I will clear database registration database this is a database name right and select the query and press f5 to run the query we have successfully made the database with the name of the registration then I when I use this database why you enter use keyword and the database name the database name is registration select another key element so you need to copy the registration I'm in database name and paste on the on initial catalog equal to your database name well you have successfully made that connection between windows form application to secure server this is the call string string connection ok now as you can see the error has appeared do you want to remove it it just white again forward slash now another thing we want to use I mean another way like use the red sign to remove the error there are two ways to you can use them to remove data okay after completing the whole process like this then you need to call secure connection to make object secure connection parenthesis in this parenthesis you need to pass the part okay but okay okay just a minute what is problem when a minute guys I make a secure connection I called CQ l can connect connect basically just a minute guys I write I go to registration and double click to sell button to generate the event and in this event I call corn to new connection and pass the part okay now we will use corn to perform the different tasks like insert data updated or delete data now I will check another point I cut it and paste okay it's working this is the call connection okay now in the next video we will learn how to insert data into database so I hope you are understood as well thank you very much for watching see you next lecture guys hello guys welcome back in this video I'm gonna teach you how we can create a table to store the application data in the database in previous lectures we have made the database with the name of registration so I use the keyword use and registration then I am able to store the data I mean store the table in the registration database so we will use the registration database to get the data from database and store the data database as well okay so first thing I'm gonna create a table the database working processes column wise and row I will tell you I've make open the MS word and open the MS word select the I mean table and I wanna clear up each column so I select the add column and how many rows I mean just write the column you need to enter the column then you will insert the record in the database I just right there alright EMP ID nan and F nom designation gender and I'll write Janet that same email and address ID okay those our columns each column will store each data type values for exam employee ID will store I mean I'm gonna store the integer type so I just dragged the int type of this column then this column will store the integer type value this column doesn't support the string type okay so those are columns we'll use string type so I use vulture ah and vulture those are basically data types which will store the string type data right so I copy then paste the first test and test and finally paste I don't require to use the integer type because I just write the text format to store the data I do not perform the operation like in addition subtraction division if I will use these additions so I will use the integer type right now another thing after creating a table and columns creating a table and columns then I have an ax stored the data then this column will automatically generate three number ones I don't require to use our entity number one because I will use integer and also primary key identity primary key identity values to generate the unique number okay and I use aasif so I just write double comma I mean single comma and Assaf and use same process copy and paste best best best best I will export the string format in the each column so I just use a single comma in this single comma I use the text I have not stored the date table okay so this is the process of database copied first best best I want to delete any record so I just select D row and believe the recover the same way we will use in the database okay so you must know the basic way to use database okay so I go to my secure server and I make a table I use create a keyword table then table name the table name I arrived the employee then you need to write parenthesis in this parenthesis you need to define the column name and also data times I use employee ID this is a column name and I need to define the type of the column I don't use integer it means it will store integer type value right guys then I will use primary key identity it will store I mean it will generate the unique numbers okay I use 1 by a 1 it means display the one value and also increment 1 belief ok it is best way to use the primary key identity and this is the best protects to use one by one then you need to enter comma and I'm going to create another column so I used the imply name you don't need to write the space because it is not support in the secure so you need to enter the semicolon I mean unless cosign it is possible and it is supported in the secure server now I use Virchow and I will enter the range of the column it will store 550 characters okay then I use comma and apply f named watch out I use 550 and ply ml watch out 50 and ply what is the column name email I use email id imply ID I type watch out 50 and then imply idea I already defined so I just imply EMP ID okay now the next is gender type watcher and then I address final address and about the tt-rs tell for sure those our columns the first column is primary key identity well we don't need to enter the first column value we enter we need to enter the name email I'm in F name employee ID gender address one two three four five six seven okay I think one more column we need to enter designation of K okay the first Nev Nev Nev name of name designation then email okay I will make up Series wise columns because we will store the values series wise it is best way to store the data and get the data from database so I select the whole query and click to execute our table has been generated in the database I have not display the table so I need to reuse select statement and aesthetics and and then from keyword and then table name the table name is imply a copy the table name and pay select the Curie and on the curium now guys you can see here one two three four five six seven eight columns has been appeared in the database I will store the data in the database table so what I can do I have used insert Curie and sir into another kiva then table name the table name is implied and enter the value keyword and use parentheses in this parenthesis you need to use single comma because we don't need to enter the first column ID I mean value we need to enter the string type value imply name so I write the Asif and then comma I will store another column value so I use single comma and I use carrying box and then I used the single comma programmer and then email I just admin Edward online i GTH dot-com imply ID I just write the one zero two seven five seven address I just write the Pakistan select the Curie and press f5 and primary key identity one two three four five six okay one more thing name for the new designation email okay one more thing I need to gender of kay after the email this is an email and ID okay before the Pakistan we need to enter the gender I just write the gender select the Curie and run the curing now one row affected it means one row will store in the database table so select the Curie is like static from imply and execute the kid now as you can see it imply ID has automatically generated now I just entered the first column second third fourth fifth sixth seventh column values I do not enter the number one our first column value okay now I will store another value then the automatically will generate second number on the database table like imply okay so I hope you understood as well thank you very much for watching see you next lecture guys hello guys welcome back in previous lecture we have made the table in the database with the name of employee and we have stored the data in the table like imply manually okay we do not use the application to store the data in the database but in this video I will tell you how you can use the application to store the data in the database okay let's get to start to understand first step open the visual studio and open the farm in previous lecture we have made this one okay now I select the each text box and change the programming name I use txt now and I change the second textbox named t xt f now txt designation txt designation and the xtml you can write any name as light but I just write a readable and txt ID txt gender no I don't need to select the I just select the radio buttons I write there are material mal and are BTN okay last is txt address okay after including the name of the each text box radio button and and the final step you need to double click on the Save button to generate the event so first of all I will store the data in the database so first step we need to call the connection object to get this connection before call the connection you need to write try catch it will help to find the error and handle the exception section E and write the message box not show and call a dot I write e ex the export message in this try body you need to call the corn dot open parentheses then you need to make an object cql come on seeking commodities used to run the seekers our series okay after connection open then you need to call CMD and use new keyword cycle command analysis in this parentheses you need to write double commas in the double commas you need to write self Curie like this insert into the values I used values then you need to write the parentheses in these penalties you need to write each column name without this column name implie name imply those name I mean those variables okay so I just copied the each column name and pestle and I use comma 2nd comma third Calma fault , and v comma and finally Jenna and also I think okay address okay then you need to enter the values after this parenthesis you need to write the values given now insert into implies cut the really key word just right insert into imply and select the whole columns after the parentheses you need to write the values keyword after this parenthesis then you need to write again parentheses in this parenthesis you need to use single comma double comma plus plus sign okay single common double comma plus plus on in this plus plus sign inside you need to enter the each text box now the first text box name is txt name so I select the txt name dot txt use same process this column will match the first column to store the name okay then I use I copy the basically single comma double comma plus + sign and first column name and I use comma and paste the same code and just change the second text box name that's it use same process I use comma and paste the same code single comma double comma plus + sign and d textbox named the third text box name is txt I think email designation of technicians designation of cattle destination g xt designation txt designations dot txt and i use comma after single comma you need to write comma okay then paste a call i'm in court single comma double comma plus plus i and the textbox named i will change the text box name the first text box miami is email so i right txt email or text and i use comma after single Kamiya i use comma and then I paste the code and I Heidi basically i chain d ID EMP ID button name the this column i select this one column txt idea operate 10 per cell and write our text and you need to write these same process single common interval comma plus plus sign and I used gender only I use gender because we will make the variable with the name of gender okay now the final is we need to write these single comma first comma then single comma double comma plus plus sign T X T address dot text after completing this process you need to write them , and caulk on dr. pan just call Connor okay okay now you can sear this basically this double comma is start to run the secure server Curie's after completing the double comma okay then you need to write comma and call connection object we have made connection object on here okay and I used the secure connection to initialize the connection and pass the path okay now the next is I will make a variable to engender and I use if parentheses display bracket else I use gender RB g ml dot checked checked gender exceptional otherwise general actual to female okay now I pass this variable on the string theory connection like this okay now the next thing is first I copy the connection and paste from Hell then I cut the whole code and use if-else statement to check these text boxes are empty or not if our text box our empathy to display the message otherwise store the data in the database so I use a system and split bracket and else statement Alice and I use T X T dot name TX tener dot txt HL 2 double comma and I use our operator T XT as nano text HL true and party or side okay txt nan I've named dot txt hl2 and 30 okay txt designation dot txt it's l2m party okay and then I use all sign txt text or data or text actual true amputee okay I need to write the cosine two x and then guys I use same process txt designation for the name email where is the ml dot txt actual true and party txt our sign first txt ID dot txt aquel true imparting okay now I paste the code in the ELSA Steadman and I use message box not sure on the f-body please fill in the blanks okay now finally we need to write the CMD dot execute non theory to run the Curie and store the data in the database and I wanna display the message box but I use corn dot close then display the message on the con on the screen your data has been saved in the database okay guys so let's check itself and on the program and then wait couple of seconds to load the program then we will be able to store the data on the database I first clicked - sir please fill in the blank of the I've into the 1 value today's fill in the blanks be ok see the he your data your data has been said why I do not use ID and address column to check their condition okay txt ID okay I need to write that another text box names like txt address dot txt text this iCal true empathy okay sir open the secure server and run the statement we see the another data available but I used trunk care terrible physical equipped allocate level is used to refresh the table detox it means after using this Curie we will be able to see the data well delete okay so I run the Curie and use any faster on the statement now as you can see all know that available in the database I use them Kurian sir data into database to restore the one record in the table and I use same select statement okay now let's try again okay I use game eyes see the Yi I do not enter the address box okay now you can see a eye you see I remove that any other text box I can't restore the data in the database without any text box are important so let's enter the correct data comment on programmer admin at the road for online nights etudes dot-com a one zero two seven five eight and select the gender male at the was in Pakistan okay I select to serve your that has been served okay now let's check it okay guys come on come on but I don't know I wanna change the name basically so whereas application I use Asif name Bosch basically I have used many time to check the each connection I mean each way to insert the data in the database so I have to add many times I do not change anything else I just changing five seven ID cell okay now another thing I close the program I wanna insert the record in the database then the whole text box will empathy okay so what I can do the first thing you need to make a method okay this is a basically else the statement body this is our event body after this body you need to make a method public wire of Julia enter any name as you like and parentheses is clip record in this split like head unit right each text box name dot text and use a kill sign to input okay txt now txt Nance dot txt picture to and party txt designation dot txt equal to n 30 txt ml equal to dot txt actual to m40 txt ID hl2 and 40 txt basically address text care through empathy yeah I need to write the drawer text time that's it copy the method and paste the method after the display message on the screen like this and then there's the method and use terminal design then we will store the data on the database then the text boxes will are automatically linked but ok run the program registration I write current batch and I use the writer in a third home one zero two seven five nine G same orchestra okay guys so I click to serve button the data has been saved then we will see the data the text box our input okay guys so let's check it the data will store or not okay guys now you can see it so I hope you are understood as well thank you very much for watching see you next lecture guys hello guys welcome back in this video I'm going to teach you how we can display the data base value in the grid view now this is our grid view I'm gonna use the database I mean I will not display the data base value in the Gridley so what I can do guys first step open the code and make object CTL data adapter I make a object a a DPT and you need to make a also object data table now the next thing is I will basically make a method this is a clear method I just remove it and I may cut another method public wire display you can write any image bike and in this parenthesis I first complete the object of data table then I call corn connection open okay corn means connection we have already made the corn I mean connection like this and this is a connection object I initialize the connection on the constructor then I am able to use connection open end connection close then you must be write the connection clause it is best way to use it okay I have already in this starting and closing I mean opening and closing connection you need to call Eddie PD to kill to knew a skill adapter then theses double commas in this code above for Mozilla try the slide steal it from the database table name the database table name is implied now I select the semi statement now case you can say select star from implies like the Curie and on the query now you can see here the data has been appeared in the table so you can use Sam Curie okay now after using this query you need to write comma and then call corn okay call this is the object of connection then I use a DP t dot sell currencies in this parenthesis you need to pass data table object okay then finally you need to call data grid the delta to grid view default name is that agree to give one and I use dot sine data source and assign the value DD okay that's it sir but the best way is you need to write the try catch catch exception Y X and in this parenthesis I mean try apparently you need to paste the code and I'll use message box taught show the X dot message the sir now I copy the method and paste the method on Lord I mean on the constructor the construct of the starting time France okay so I paste the code and run the program registration or as you can see here the data has been appeared in the guillotine now another thing I will tell you after inserting the data in the database I'm going to display the record on the gridview so I just need copy the method and paste the method after the clear method okay then I run the program basically we will see I am certain are named Gordon and I use the student harden at gmail.com and the ID one zero two seven six to mouth said okay we need to write the address draw bond-san pakistan sir okay now well you can see yeah this is a car display the data indicated to you okay guys so I hope you are understood as well thank you very much for watching see you in next lecture guys hello guys welcome back in previous lecture we have discussed all about display data in the grid view in this video I'm going to teach you how you can perform the update operation but before working out Update button we need to get data from grid view to text boxes in our solar button then you are able then you will be able to use Update button perform the update operation okay so first step select the grid view and generate event go to the property and again I'll find there are many other event I find cell double click event okay this is the cell double click event now another events available cell content click sir click you can generate any one as you lie but I generate cell double click OK double click on it to generate the event after generating the event you need to make a variable ok so I define the variable honorable because we will use it on the perf on the delete operation so we need to use this variable okay so I define the variable on a bow at the name of ID and then I come into the data grid you sell double click event and then I call same variable I use Excel and I use convert and not pass parents in this parenthesis you need to write the data grid view name the derogatory name is data giving you one and I use dot rows in this parenthesis you need to write the e dot row index what is he basically is the object of data grid views cell event arrange okay okay now after the break it you need to write the doubt self parentheses then you need to write the index number of the cell that default index number of the cells 0 it means number one in column like this okay zero one two three four five six seven okay so you need to follow the zero index wise number okay then you need to add odd values that true string parenthesis that's it you have got the ID from grid view and assign the ID with this variable so you need to use some process called the txt name dot txt hl2 and copy the I copy basically the whole line data grid you he index and I just change the index number that's it finally you need to write Terminator sign okay and I use T X T as new dot txt and hl2 I paid the code and just change the index number first.txt am sorry guys just channel txt name F name and then third is designation txt designation dot text and paste afford and just change the index number okay then this mission email txt email dot txt and use the same code past and for txt ID txt ID dot txt Excel to not to string and change the basically the file then we need to use if statement to check the condition our radio buttons ok then we will get the data from ready balance so I use RPG and Mel's tortured hl2 pulse our BTN now female dot checked kill two trio ok then I use if statement parentheses slip tickets and this parenthesis I use the data grid view dot roars same process decades eat out row index dot cell parentheses this old cell number is six here you can see the fire I have already included so I use the six dot value our to string parenthesis after the parenthesis you need to write double chill sign and double commas and write the female if this cell number six dot value dart roosting hl2 female then coming to life Stedman and call the RPG and Mel are checked kill to false I have defined basically on about you and the female false okay after the else I mean false and tell me a little unit right the RPG and female door checked they kill jittery okay then you need to write the final text box txt addressed or text hlto and copy the line and paste for just change the index number seven okay say and on the program okay I double-click on now rise you can see R okay I double-click on on says okay we have got the each data each rose data in the text boxes and also button in the next video we will learn how to use Update button to perform the update operations thank you very much for watching see you next lecture guys hello guys welcome back in previous lecture we have discussed all about how we can get the data grid view from from grid view through text boxes and also radio button in this video I'm gonna teach you how you can generate the event and perform the operation to update the record in the database using this application okay so first of all I generate the van double click on the button okay then I have already basically made the variable and this variable have our ID okay here this is a basically variable name this variable is told the table ID okay this ID okay how we can get it this is the process to get the idea from grid view okay now this is a very important we will use this variable to perform the update operation okay okay so let's get start to understand the first step right try catch catch exception exception e X message box start show the ax dot message first you need to call corn cotton corn dot close and then you need to call CMD equal to new cycle comma and parentheses double commas use the Qt Curie's use update this is accurate eyes this is a keyword and enter the table name the table name is implied and then you need to write the set keyword okay then enter the each column name without first column first column will get the ID we will use it on the last final step okay so use update our table mm said keyword the each column name okay so I go to my database without this column you need to enter the first column name copy it and paste column on here then you need to enter the equal sign single Kamal's double commas plus plus sign in this parenthesis I mean inside the plus sign you need to enter the each text box name which will match the columns key okay so the first column name is txt name so you need to enter the txt name on her t ax t nan dot txt after the single comma you need to write the comma and use single comma double comma plus two the science second column name okay now think just a minute I remove it then you need to write the basically second column second column database okay copy the second column name and paste here then use a Cal sign single common double comma plus + sign and second column text box name okay then use comma and go to the database and enter find copy the third column name and paste there and use a tell sign single Kamal's double commas plus + sign txt designation this is the designation column use comma and copy the apply email column name this is the database columns okay single comma double comma plus plus sign txt email or text and then you need to write the comma and find the column name copy it pastor equal sign single comma double comma plus plus sign txt ID dot txt and then use comma okay this is a gender so we need to just write a gender this is a database column name and I assign the value simple Kamal's double commas plus plus sign and just a call the gender we would use if else statement Genda okay now the after these single comma you need to write the again comma and final database column name copied and pasted here musical sign single comma double comma plus plus sign and keep texting address dot txt after this single comma you need to write the ver keyword and first column name first column name is imply ID copy it and paste well then you need to write the equal sign single comma double commas plus plus sign and you need to pass the variable I have already initialized the variable on a bow here this is a variable name copy it and this variable have a ID so you need to copy the variable and pass the variable on here then you need to write the after the double comma you need to write the corn that's it this is your complete Kure okay the final step you need to write the CMD that executes non query parentheses this is a your update Curie and now another thing i will basically use the false statement to string gender if average here mal das checked and gender al - mal and else gender a kill - filo okay guys sir and I'm gonna display the message box message box dot show and parentheses and overcomers your data has been updated so I've run the program so let's check it registration I found double click on the as if and I change the first time asif ali and click to update your data has been updated okay okay let's check it to database you guys you can see it as if early now I'm gonna use the Update button then the record will automatically update indicated Lee so what I can do now just copy the method where is the method just copy the display method copy it and paste after the update display message pester that's it when the program registration I open the common arm and I change the name down ok and I click to update you know guys you can see here this is the Karl updation to update the record now another thing I will teach you but I checked the time period of the video ok now the final step we will use the delete button but I think I will tell you on later because we will use another important thing like export data from grid view to excel sheet and also such the data from Goethe view so I think I will tell you on later so thank you very much for watching see you next lecture hello guys welcome back in this video I'm going to teach you how you can use a cleat button to delete the record okay this is very simple just double click on the delete button to generate the event okay if we have used basically a variable ID okay it is very important to perform the operation like updation and deletion okay and also get the data from grid view now we have basically get the we have got the data from grid view using one by one column name okay this is our variable and this variable have our ID ID with it is very important to perform the operation like updation and deletion okay so I have got died in the in this variable so using this variable I update the record I have updated the record using this ID like this okay now you can use it to perform the delete operation okay how that's very simple write the keyword try catch exception e X parentheses split break it and I'll write the message box dog show dot X dot message and use the corn dot open basically this is a connection right guys I have already explained you each knowledge okay so guys I call CMD I have already defined the CTL command object on above section so I use CMD new cycle c'mon parentheses double comma you need to write a curie the Curie's delete from this is a keyword and table now and you need to buy the where keyword and first column name the first column name is applied copy it and paste here then you need to write the equal sign single commas double commas plus plus sign and just a past variable I have already defined the variable after double commas you need to write the comma and call the corn that's it display the message but clean it right the CM did not execute not theory and display the message record is delete after ok now I wanna use the after the delete record from good view then the the grid view data will automatically update display the update okay so I copy the mixer of the display so I paste here just this okay I copy them and paste after the connection cables sir run the program registration I select first cardem okay this is a cotton I click delete the record has been deleted okay now as you can see if I select basically Tonya comma now I'll tell you another thing I close the program and I run the program and I use the registration but you can see here the first time save update and delete button are enabled Evan and remove are hide the update and delete button so what I can do guys just write the on the constructor go to the constructor this is a year constructor and call the button name BGN what is the name of the button yeah just not guys but I'm three button I do not change the button ok button 1 ok button to button 3 I use button to button to dot I think having a disabled it enabled guilty false okay pattern two three yeah enabled us itself and on the program okay guys now you can see it but I wanna get the data from our Garrett view then those buttons will automatically display on the same position so I just need to go on the grid view this is a grid view and I just called pattern to that enable hl2 to button 3 dot enable Kenichi okay sir around the program okay and I double-click on it okay you can perform those operations okay now I will include another things the first is I copy paste here the button and I change the button name export and okay now and another thing I will basically enter the search box copy and paste yeah I change the name such strong God by now okay I copied the text box and better and setup the text box and change the text box name txt search okay now the next video we will talk about how we can set the record from grid view okay so thank you very much for watching see you next lecture guys hello guys welcome back in this video I'm gonna teach you how you can use text box like this to search the record from grid view okay the first step you need to select the text box and go to property and generate the event go to the event and generate the event text changed okay tax change double click on it to generate the event okay after completing this process you need to call the corn obtain corn kilos it means connection open connection cloud then you need to call ad PT adapter kill turu SQL adapter I have already defined the SQL adapter on SQL adapter a skillet adapter is used to read the record okay and I use parentheses and double comma in this double commas inside the double commas I write the Chile select static from a table name where my basically having a search the record from give you using by name so I'll select the column name like imply name and I used like keyword then I use single comma then percentage consulate sign inside the person that's fine you need to write the Bahamas plus plus sign and then you need to call the txt search box dot txt after the final double comma you need to write call and terminal okay select static from employee table name where keyword the column name which we'll use to search the record by name use like keyword and single comma then percentage sign and double comma plus sign search box our textbox named plus sign double comma percentage single comma and this is a Curie double commas okay starting and closing connection okay then you need to call DT kill two new data table and call the Eddie PT dot cell and pass the DT then you need to call there a great view data source and kill - did it that's it sir and they're on the program I go to this select research and I when I search the a is Asif now resilience here I searched the Daniel now as you can see here I such a certain law this is the Cal searching this is the by name we want to search the record by ID just need to change the column name column name the first column name I use the ID search run the program and I just write the number okay two three four okay this is the Cal searching ok guys this is very simple video all about how you can use search box to search the records from grid view so I hope you are understood as well thank you very much for watching see you next lecture guys hello guys welcome back in this video I'm gonna teach you how you can export the grid view data into excel sheet so first of all we need to generate the event on Killick so I double click on export in Excel button then the next step we need to import the library okay so I go to the solution Explorer right-click the references ok and click to add solaris preferences okay so here I go add references okay now this option and search just to search excellent okay now select the Microsoft Excel 15.0 object library select check market and click to add after adding the object now as you can see our Microsoft Office in top Excel added in your project then the next step you need to import the library I go to a bow and I enter the using system dot I using Microsoft dot office dot intro dot Excel after importing this library the death table has been displayed the error then you need to write the system dot theta dot has been removed now copy it and paste on the next level like this and find another table I have basically declared a tables okay now paste well now the first step you need to make objects so you need to buy the Microsoft trot office dot intro dot excel and in dot application and enter the object name arise the object land axle and use Excel to new a new same process Microsoft Office dot improv got except that entities terminal design okay and top application dot application synthesis now the next step you need to make object workbooks so right the workbook and enter the object name I'll write the WB and a key else and then I call this object okay or p8 and paste her then you need to write the dot sign workbooks work talks okay then you need to write the dot sign and add and the difference isn't yet then you need to pass the objects so you need to write the excel sheet tile okay dot and Excel worksheet okay terminator sang and then guys the next step you need to make a worksheet object to worksheet WS self tuned you watch it and you need two guys costing the worksheet so I used equal sign parenthesis and call what sheet then I call object of the application like this best well news dot sign active sheet active okay now the final step you need to call the object named axel dot active sheet excel sheet - okay and then we will use far loop what is this excel dot active just a minute guys mmm I think okay I just remove it and I just used broad visible excel dot visible actual to chill okay okay now then we need to make our object I mean guys you know follow okay so I use far loop and use process like a variable int J and assign the value to and I call J less than they kill to get a gridview Lam dot rose dot count and turn minute assign J plus plus okay it's Libra kids and I use nested for loop and call em - I shall - one and I less then actually write any number okay I just write the sixth number you can write any number on here I'll write one that's working fine okay and then I use I plus plus I will tell you one letter in the working process but this time I just write the follow process and I call the WS the secondly what cell K copy it and paste her and I just write the dot cell in this bracket I write the bracket and I write the J variable and I variable okay and then I used a Kel sign data grid view dot rose and I use brackets again and I use J obstruction by two dot cells and I shall - obstruction by one rod Freddy okay now guys first time the J variable value to the default grid view index number is zero right case and the cell index number is zero but I have initialized the one value on the a variable and I call the WC this is a work sheet object and I used our cell and I passed the J variable and I available then I assign the value dedicated view dot rose and I call the same variable and I subtraction by 2 it means that J variable have 0 when I'm in 0 index and I use I minus 1 it means variable I have 0 1 . ready and those very will assign on the I mean this statement and this is the loop process you know rise then we need to make another loop to get the columns okay so I use far and I actual to one and I use RLS then did I give you dot columns columns dot count and +1 the default column will start on zero so I just write the plus add I mean plus 1 then I use I plus plus basically break out and I use the nested follow but I just write the WC object WS object worksheet object yeah then I call the dot cells and pass the I comma just like one comma K and then I use data grid view without columns briquette I minus 1 I mean subtraction by 1.0 text okay finally you need to write fulminate assign this loop will get the columns which column available on the grid view okay and finally you need to write the farlows to get the data from grid view i the check to 0 I less than two dedicated view 1 dot Collins dot count and subtraction by one and I plus plus and I use far and hl-20 and I use gelatin delegate Vienna dot columns dot count finally terminal design checklist for us it's clip record and we need to write the another risk the decade because I removed it is debated in this is clip records you need to pass the WC as admin what sheet this is the worksheet object dot cells decades in this bracket you need to pass the ivory Abel and plus two and I use comma and I passed the second variable J and assign the value plus one okay and call the data grid view dot Rose which Rose available on the data grid view I don't know I just write the I variable dot cells break it J variable dot where you talk to string okay this is the process to get the data into excel sheet we will see the gridview data our application data will appear on the excel sheet the vattic process is you need to make an object of the Microsoft out of his intro this object okay and in this object behalf you need to make a workbook to make a object and in this behalf you need to make our worksheet object okay then you need to count the grid view cells arrows rows sorry this is rows using nested for loop okay and then you need to count the column which available on the grid view and finally you give a look at the all data from grid view this is a process Lu process okay so serve and I run the program and I use registration and I click export okay now as you can see it but the best way here this is a basically you can see error has appeared but you need to write the try-catch to handle the error so I cut the cord and use try and use catch slip take it and use exception okay just write exception I do not write the object name and paste the cord under the try body cell and then the program export okay now as you can see here no air up here this is our first column name second column third column fourth column and fifth column six and seven and this is the ID column okay now as you can I will include the another data for example I write the right no mama and I tell all learned at gmail.com and I ready 1 0 to 9 it is he just like the Gina and right the robot son Krista and I click to sell okay that has appeared in the Kennedy I'm gonna get the whole data into excel sheet so I just click on export okay guys now you can see yeah so I hope you are understood as well thank you very much for watching see you next lecture guys hello guys welcome back in this video I'm going to teach you how you can design the login form okay so first step you need to select the solution Explorer right click on the project and go to the add new hm and then select the windows farm and in to the farm name I'll write that farm name login and hit enter then define the size of the login form okay and I just customized the windows for center Center okay and then I select the background color white okay then the next step I have guys use level level textbooks but okay I set the level to just were set level and into the level man Sandman okay this is the programming name so guys I just watch and the username and then I set up the first input back sparks and I just picked up lever turn to a set of the rocket farm and then I set up rise just a minute I just set up the first and first input text box and level I'll copy them paste her what is this coffee first I can't do that okay what is this okay a copy paste copy past okay and I used the password and I select the each I mean text box one txt you name T XT plus 1 plus 5 and then I need to use the password like cha here this is a possible child you need to write the esthetic sign ordered sign but best fair to use the dots I mean aesthetics and it will appear the text in the stakes and because it is a password okay and set up the login form and I just logged in and change the button name PG and logged in I don't need to use button copy bought text box and okay and I go to the man farm and select the one button and copy the color button select the login form and paste the where is up the ground the color picker I find the pic color okay and I change the type of light okay and I also change the border okay okay now looking so nice then the next step I wanna change the font and increase the size and also I change the color okay there's looking so nice okay now another thing I and I include the picture so I select the picture box okay and I click to play choose a match basically I have already downloaded image so I got text up and this is our image selected okay and I use a game play button and set up the HK noise okay now the next step I will tell you on later to make a database and also connection so thank you very much for watching see you next 30 days hello guys welcome back in this video I'm going to teach you how we can make our connection and also database okay before working on it but we need to set at the input I mean farm to remove the maximize button so I select the farm and find the maximize box here okay false okay I have already opened the secret server now as you can see it we need to make a temple so I make a table create table I write the table name log in users then theses and I use the first column name is you id integer primary key identity 1 bar 1 comma and I use you name washer type of the range I just write the 50 and you pass type watcher I don't need to write the comma after the last column select Erie and on the Curie okay now use select statement to check the log in user okay this is a those our basically columns the one is primary key identity column second Union password so we need to insert the many little card in the table and set into login form I use the values parentheses and I use admin and the password I just write the same admin okay let's select and run the Curie ok admin you name an admin password we need to make a connection between I mean this form and also seek yourself okay so I just write the event on click and then I used the using system dot dot data not CTL client and then we are able to use the connection between secure server and windows form application this is another form right guys and then after creating a connection then we are able to use to check the data database with login form ok so we need to make a connection now another way is very helpful to make a class and you just make a connection and then you are able to make object of the class and you will use the connection any form without importing the library okay but this time you just write and just know the basic way and basic usage so in this tutorial I will tell you another way to make a connection and also match the data from database with login form okay so first step we need to basically make a serial connection call accept renew secure connection in this connection I just commented we need to make a basically object secure command CMD come to new cycle common tenant is in this parentheses we need to pass the write the Curie the spirit select static from table name the table name is check the table name is gene Larkin user cop the table name and faster and then unit fly the very statement and write the column name the first column name is UID I don't need to write the first column ID I just like their second column and third column name because this is the primary key identity column so I'll copy the first column name and there is a basically tester and then you need to write the equal sign and use the add read and write any name as you like okay right at the rate sign and enter the any name I write the name name and I use ant keyword and I copy second column which up we are on the database you pass and copy it paste well and use same process use equal sign and a design into the any name alright pass okay guys then we need to basically make a connection this is the process to use the I mean run the Curie to match the data but we need to make a connection so I go to a boy and call connection connection to new secure connection and I used the connection data source initial catalog and T great head security chief data source I go to my secure server copy the server name and paste someone name here and we need to write the database name our database name is registration copy it and paste registration on the initial catalog we need to remove the earth so use fault isolation again and finally you need to write Terminator sign this is our connection okay guys then you need to call I mean after the double comma you need to write coma and call calm this is our connection declared on Apple and I call this connection on here then we need to make basically I mean parameter type to miss the data text box and also I mean database columns so I write the CMD CMD draught I just write the dot add parameter sorry dot add parentheses this parenthesis you need to write the database column name I write double commas and copy the first column name that parameter like this pastor and I use comma and call the first text box man dot text and copy it and paste here then you need to change the second parameter like this copy it and paste her and st. the second text box now txt pause dot text then the next system you need to call the data adapter so I applied the CTO data dr. Eddie PG children musical adapter in this adapter you need to pass the CMD okay then we need to make a data set object let us said dsl to new data set and this is terminator sign and you need to call a DP t dot cell this is a adapter object dot fill and pass the DES data set object okay now the final step is you need to make a statement and I just write the just a minute copy it first I used try and catch and paste the cord under the body try and I use exception and I used the extra messagebox dot Shore messagebox dot show the X dot message and then we need to make if-else statement so I cut the cord and use a parenthesis clip bracket else the bracket parentheses and this if body I pairs the cord I do not tell the cord because I'm going to display the message on the on the basically screen so I cut the cord I use first T X T you name dot txt hl2 and Patty and T X T pass dot txt you Cal to them party then you display this message message box dot show please enter user enter user name and password finally you need to write the Terminator sign and I use a statement to pass the court then the final step you need to guys write the if no I just make a variable end count actual to data set object tables bracket the default index number zero dot rolls count okay I count the rows and assign the rows zero on this variable and I use this count variable equal to one if count variable it means the value available on the table now well you can see here that one number available on the one index okay so I just checked the condition using one and then just let the message box dot sure you have successfully logged in otherwise I use al Stedman and display the message box not sure please enter that is enter user name please check user name and password okay the final step serve the final step you need to obtain the application the starting time you know will display the login form on the screen I run the program first you will see this application will appear on the screen okay but I want to display the login form on the starting time then this application will appear ok so what I can do guys just a minute go to the solution Explorer and find the program this is the program and click to place I program this is a your main method double click on it in this method you can see a form 1 appeared you need to change the name you will display the starting time login form you so you need to write the log in from name I have designed login form with the name of locky so I just write the login name parenthesis that's it sir close it run the program okay guys now you can see here is 13 time we have seen the logging farm okay so I write the eight men and into the password admin and I hit enter you have successfully logged in okay now I change the password please check the username user username okay I just change the text okay here's our users and I run the program okay guys now you can see here I write the admin and admin okay I want to redirect with main page so what I can do guys I just to make a object I make object what is the first form name okay this is a okay what is the first form name just a minute guys give air in the forum just a minute this is farm okay now I'm gonna redirect on this page after completing the successfully message I mean after login the user name and password the user will redirect with main application or home application on home of the application so you need to write the object farm one neck object or being a shelter new form object alright obj dot show that's it cell and on the program I'll write the username admin and admin ok now as you can see but you can see here the login form has appeared do you want to remove it after completing this process so you need to write thee this dot height that's itself and on the program I'll write the admin and I use admin log it okay okay now as you can see no any that appeared on the right-hand side our application so guys I hope you are understood as well thank you very much for watching see you next lecture guys hello guys welcome back in this video I am going to teach you how you can use keyboard tab button in the input text box it means you will be able to use keyboard tab button to perform the operations like one tab to jump another tab okay so this is our registration form I go to the view and select the tab order and I select the starting input text box this and then I this just to click on the tab I mean textboxes gay and this is this this now serve and in the program and then you need to wait a couple of seconds to load the program and then you are able to use the keyboard tab button to perform the operations like one tab to another tab I use admin and password is that mean I need to use the okay registration I am able to in the name tab I press keyboard tab button to jump another tab my keyboard say step button to jump in third input text box you step button here you can see it this is the radio button okay now as you can see just a minute to complete this process then we will be able to perform the buttons usage okay now as you can see okay now another thing I wanna click on the exit button then I am able to I'm I will read that with a login page so I close it and stop the program then go to the forum and I will click the event I mean exit menu in previous lecture we have discussed how we can use the exit button to close the program but this time we need to redirect with login page so we need to make an object login page so I enter the login page I'm in login farm name and make our object and then I just write the obj dot so and I just why did this dot hide parentheses Terminator sign run the program okay all right Edwin I know right admin login successfully okay now I click exit okay guys now you can see it okay this is a very simple video all about the basic knowledge to use with redirect with another page and use keyboard tab button to perform the operations thank you very much for watching see you next lecture guys
Info
Channel: OnlineITtuts Tutorials
Views: 195,440
Rating: undefined out of 5
Keywords: Windows Form Application C# Tutorial for Beginners, windows forms application c# tutorial, windows form application c# database tutorial, creating windows form application c# tutorial, winform application in c#, OnlineITtuts Tutorial
Id: zfz49gjnjcY
Channel Id: undefined
Length: 168min 13sec (10093 seconds)
Published: Tue Jul 21 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.