Create Telephone Diary - Mini Project - step by step in c#

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi friends this is retrieval this tutorial I will teach how to make a telephone diary is there like a mini project we will develop a mini project first of all by basic step-by-step I am telling this tutorial to develop the telephone and first of all I need to create here new project new the commune new project inside the project here I am choosing the language visual C sharp and windows applications Here I am choosing windows application form I need to choose the directory which they are actually or try to or save your save project so I am creating the project named della phone just giving the telephone name telephone and select here I am changing the project name just click now we will see the form one default by default the form one will be showing your so I need to change this form to telephone so first I need to add on more form new windows form Here I am choosing form name phone and click Add now I know need this form one just delete the farm on and go to programs err I'm choosing by default default form is for means this form will deeper by default is water so now I click run the project it will run an ok now click this farm and expanding this farm how much I need now I try to add some details here like text boxes first time try to add two bottles and five text boxes one two three four five okay and one grid-view I need one datagridview here okay this is our tools right now I need to change this align this so select those all the text boxes go to here click this remove vertical spacing and align left and increasing the vertical spacing so it will align perfectly now I am changing the size of the text boxes and go to properties choose the font size bigger then the text box size will be increasing so just I am using here 14 so this is our text box size okay now I will add some labels so 1 2 3 4 & 5 same ways I'm doing remove vertical space and horizontal alignment and increasing the vertical space increasing the vertical spaces do vertical spaces here now I am changing the font size 14 and click here I am choosing the font vou I use this point I am liking so I am changing this one so here I'm changing the name aim by we might and other things like category that early is nothing is enough for kiddies and up now I am asking or last name UPS lasting right if by request this is last name get agree so this is no need this text box here I need to use combo box here combo box and go to properties err click bond plays 14 okay now arranging the labels here now I arrange the labels in Category I will add some peeps so click here and click Edit items here hat Oh obvious they seen us friends family so I am adding the some categories here I run the project so you will see the categories here okay here first name and last name phone number email and category so once I hit the project and the project the cursor will focus in this bottom one but I need to focus the cursor in first name okay so I am changing those details right now so they have to set that tap index first so go to properties click the tab index is zero and property such as first fixing their properties here tap-in deaths one to three for and by six seven eight a 9 in 11 and then finally is well now I'm sitting the Capitol's and ran the project the cursor will focus here textbox1 so now you press the tab key it automatically choosing those big likewise C is selecting perfectly so that's why we are using the tap index here okay you can also using that by program you can change the nature of focusing that that's a color also so that means you have to do some I will teach that or else that also double-click the form so farmload even you have to write this act Q control which control you need to activate textbox to your ex first to xbox you here now textbox to dot focus Xbox 2 dot focus now I am trying to run the project here now you have to see the focusing the cursor real textbox to here so now press the tab it will work perfectly is not a problem but by default you can change in runtime also using this code you can change the nature of focusing that Xbox also but here I know need this I will you know need this now him run the project it will come the cursor here ok now I need to change the button nature right now just go to the design you if the button here here I need to just press the hole the hall to key sorry control key and track this so it will copy the button automatically so now I am changing the button little bit bigger this is button nature and click the Remove vertical spacing so it will comes likewise okay now I'm just it is a bit small I'm changing the font size go to the properties and ponds but okay now here I am changing the porn name sorry text name you insert and they're late and Update so have the four buttons here this is our grid view so I am expanding this grid view little bit I liquor okay now now I click the new button so I need to clear those details here so double click here Xbox one dot text equal to double quote it is is one type of clearing the text box another one another one text box to not clear so you can use both anything you want so by time being I'll just copy those sections to be and for and combobox 1 dot selected in dogs equal to minus 1y use using -1 I will show by time being now I am run the project I am click here anything now click new button so it will clear that is not clearing so you cannot clear the combo box so we are using was 0 means it this is 0 this is 1 this is 0 this is 1 and this is 2 like that is that but we are using selecting empty row they have to use minus 1 so click minus 1 it will showing the empty records empty record so that means you the people will see is clear ok that's why we are using here so type anything here clear but thing is you type the combo box combo box is editable combo box but we need to choose this anything anything in this list one way so we no need to edit this combo box then you can modify the combo box nature so click them combo box and go to drop-down list Rarity's drop down Stein and drop down shake you have to click the drop down list here so if you see they're changing the nature of the combo box here here to click run the project so you can choose any one of them only but you won't type in in here ok this is the nature of that combo box now I need clear so it will clearing but cursor is not focusing because still is focusing in this button one way but once I hit the clear so I need to focus the cursor in this textbox one that is my another core ok so how to do that so just click the new button here Xbox one dot focus so you have to set that focus in text box 1 and click Save ad hit the Run button here now you have to type anything here now click the new button it will clear the all the details so now cursor is focusing on our text box 1 now I need to add these fields into this grid view here like first name last name mobile number email and categories so I need to add that details here so just click this red view and click this icon and click Edit columns so here I am add column so column 1 is f way SC first and this is column text just add a second last I mean now by after the email get good cause now you will see those records see here some spaces is there so I need to increase the spaces then just go to edit column you can increase the size of the email click the mobile I am using the size which should be not should be you can ask as per your wish you can increase the size likewise I'm editing all the columns here email on 50 and first name and last name I am using like Otto Sizemore to fill and click okay now it will increase the size of the text box here and click Save now click on the button so he will see all the details now I click that inside button so insert all the details into tables so how to do that first click the insert button double click here so here I need to write the insert query before that you have to create that database for that so how to create the database for that first you need to create that database so here I have SQL Server 2008 r2 we are installed SQL Server 2008 r2 SQL Server database we are using thus why I am filling so once you are in salt a successfully then you can call that SQL Server inside the results to do so how to do that first go to view and click server explore it will come here here you have to click connect to dead connect to Devi so just click the connect here whatever computer name is the server name so once you have to put the dot it will get to your computer name or else you have to put the log curl it will get your computer name or else you have to put your computer name bad to find the computer name just right-click your computer and go to properties you will find the computer name here this is your come from computer knee so here could be were company computer name here or else they have to put this dot okay one more thing I will teach one more thing I will tell so you are using the X purely Express edition so you have to okay this is your computer name like that we will get well I will tell one one more thing also some in case you cannot install this SQL Server 2008 r2 then you don't do don't worry about that before that we have to put just this single port dot and single slash and SQL let's process you have to type SQL Express that means by default you have to installing SQL sorry Visual Studio 2010 by default SQL Express Edition will install in your computer so I have to put dot and slash SQL expression it will create that database for you read Greek theater this is server name is local server known for you but here I'm install SQL Server is main server okay so that's why I no need to put here I'm just put my computer name just you have to put the dot it will get that computer name so here select or interior database name select means you already created the database then you have to select the database here so clicking click here will showing that all the database here so he can choose any one of the database here or else you need to create new database then you have to type the database here get up his name here so phone just I'm selecting creating the database name is phone and click ok so it will create it will attempt to create give muted so here to put just here it will create the database for you so your Creator successfully created the database so click this icon so here table is that so click that this table so inside is no record because here is empty empty table so just right click here add new table here so it will asking the column names for you so which were columns you need so here I am type if I st first yeah we're that last so this is not case-sensitive so you can use any any name small caps is not a problem work and Oh bye that my that and category so back so I'm using worker here mobile I'm setting the primary key so click the set primary key so you have to right-click and set the primary key so remove the primary key and right-click and set the primary key so it will this is mobile number is a primary key and ctrl s to save the table name here for that all right yes I am click that database name is mobile Justin using the mobile and blue table name is Mobile's my database name is Paul my table name is mobile so I need to add any kills here okay now I am trying to insert W figure Here I am declaring the calling this SQL server here so how to do that now I will teach before that you have to declare the namespace so using system dot data so using system dot data dot SQL client so we we have to import this to namespace here so now here declare the connection string for you so here I am declaring the connection string here connection string here so SQL connection Co n equal to new SQL connection so here you have to declaw the connection string so just right click this data base name so database name click the properties they are consenting under the consenting you have to control a and control C this copy the consumption so once you are to right click and click properties and go to condition C and copy all the functions links here just place it inside these connections function just have control V paste and save so by weaving purpose I need to increase the size of the coding size zooming the size 125 possibly so little bit bigger okay now we need to call this connection here so SQL theta adapter SDA equal so here we are we won't use the SQL database adapter here we will use is kill SQL command come on what is me SQL command SQL SQL command and SQL data adapter adapter and SQL data reader so i will teach both difference SQL data adapter reader SQL command is only center like is only sent like insert update daily so SQL command for palm only these kind of operations SQL reader for firm select this operations so this is one lee this operation only sent the details to the database these operations gear retrieve the data base from the until the data from the database so both SQL command and the SQL reader SQL reader only reading purpose SQL command only the sending purpose sending the information the insert update delete etc but main differences is fuel adapter it will perform both details you can you want retrieve the data bit you can use the Select query you want insert the database you can insert the girl curry you can update the database then you can use that yet you can delete the database you can use the daily not a database like a cables and records like that okay so you can do anything here in SQL data adapter so it you can perform those both details come back to this this is speed this is also speed and this is little bit slow because you can perform both details so we will check is there command type or a skill that our reader type so it will check those details or other after that one it will perform here so okay now we are using only SQL command so well with all the details so see MD any name you can provide any name here equal to new SQL command so here and it will return the curry in circle so I will teach you very very basic and easy methods for you just right-click the database sorry table and click the new query window so click add and close you have to right click change your type and insert value so and click all the fields here just click the all the fields so it will write the insert gory for you inset we restructure just copy this structure and paste it into inside double quote just I'm festive but it will comes here three lines first line second line 3 line then we'll be showing the errors so you want to use three lines then you have to put here before the double code here to put at sign it won't show the error are is you can make it single line so your wish or else you can make it single line so now I will teach before that I'm putting the @ sign here so it will won't show the error and now I am declare the connection strength here all the conditions in here just after the single quote just you have to put sylveon so I'm calling the condition Singh here here you have to put the text box names here you have to put that text was names here okay single quote double quote and plus Xbox one dot txt and plus single tour that we call it min get the records from text box one same ways and just copy those things and paste it one by one this is only combobox combo box 1 this is textbox for the to and one okay one more thing I will teach now I will tell forget to tell using SQL command or yes kill reader then you should compulsory open connection open the connection before the executing the SQL command you have to open the connection and end of the executing you have to close the connection but you are using SQL data adapter then you no need to declare oscuro open as a connection open and connection close because SQL data adapter it automatically opened the connection and automatically close the connection but the SQL command and SQL reader it won't do that so he have to declare connection dot open and connection got close here now this connection comes from here only because we are we are already declared here SQL connections okay now I will execute this query so c md dot execute non query you have to choose that execute not worry it will executing the who is here okay this is the insert query so now i'm hit the run button here now I am type the name the and gap the I travail and mobile number my mobile number this is nine five plus nine one nine five double zero eight - seven - eight - here my email id I am category so home hurrah B's art France anything I am category this and click insert it's showing that year because because we are declare one leave a car only okay but I'm by table name by mistake I am deplored where binary we will see email is where binary so I am changing this to back there and this to work by mistake I am saved this record and click Save here and and once again f10 so it successfully sailed so I will go to so it's access policing I will do one more one more time so once I hit the say successfully said I need your message so message box dot show success Lee say save and hit the run button here one more time John the mobile number I will type any random number random email god I just saw vision insert successfully say okay now go to table and click show they will get up so C it will successfully save here okay guys now I will teach once I hit the Save button once I hit the insert button it successfully insert inserted after that I'm going to the database angle to show and whop another blah blah but once I hit the Save button I need to show the details immediately in this grid view so how to do that so so I need to create one function because I need immediate replay once I insert the button I need India to play once I delete the button I need immediately same ways I am update I need immediate reflect for that okay so how to do that so first of all I need to create one function go to right click and before create function just void this play create here one function for display here I'm using SQL data adapter not a reader get the adapter I'm using s be equal to new SQL data adapter here SDA dot will before that I need to declare that our table DT DT equal to new data table only this get a table here de Here I am returning Laurie W inside double quote select star from miles and comma C 1 and calling the condition C here I didn't open the connection and clicking close the connection SQL data adapter is automatically opened the conditioner article automatically close the connection now I am trying to pause the record to my grid view here grid being so before that I need to declare one loop sections for for each loop here I'm using for is go to insert city and and this will see shot and click forage so it will create the for each part your variable section I'll declare delta o item here I'm getting the values by row by hope in DT rows so I am getting the value from DT rows and stored into 1 by row by row in item so here I am declaring that grid v1 dot Rose dot clear so before that any values inside the the data reviewed automatically create the clear the road here in young equal to theta review one dot Rose dot and so every time loop if loop will be increasing is executing the one row new rows will be added here now data grid v1 dot rows n so n means I will added row index I'm getting the added Road index dot cell cells zero dot value equal to item got you to strain zero means it will this is zero cell zeroth row and 0 cell zeroth row and 0 1 cell first cell column column 1 column 2 this is the index of that column index so likewise this 0 means this is 0 this is 1 this is 2 this is 3 this is 4 same as 0 1 2 3 4 but this row is 1 column is 0 likewise we are executing the row by row so it will go index it automatically comes here so you need to dissipate the row index only how to persuade the column index 0 this is here but in case you not sure about the column just then you have to put the column name directly so yep I escape first this is also as per your wish you have to put the column in tanks you not sure about the column index then here to view the column name is not a problem just join Pepito's all the records to 5 times and paste it into 4 types 3 2 three and four so here I am mentioning the column index one two three and for and save here also I am changing the column index 3 & 4 and save and hit the run button so sorry so I do Dodie yes I'm calling this display function and paste it in to save query here just one control V and save now run the project now I am try to add new items here like first name JS g mobile number email and category and choosing any name and click insert so click and successful okay button so I will get all the records so see you will see the empty row is inside the this grid B so you have to remove this empty row then go to world view and click here and click this small icon is that you will see this small I can't just click the here enable adding hair to remove the uncheck this enable adding it won't show the records and click but in run time it won't show the records here once I hit the Save button then one really show the Wreckers so he want I mean run time in by starting you want to fetch the records and double click this column and just I play type disk play we already create this function display so you want to go to this display function just simple right click the display go to definition it will come the display functions here now I run the project so it will automatically comes here so now I need to delete any any of the records so I need next next target is deleting the records so once I hit the any values here any rows here I need to delete the second okay but here I click any values it means any cells it will selecting only the particular cells but I need to click any place it will selecting entire row I need to select entire row or entire row likewise so how to do that first I will catch it click this grid view go to properties your selection mode you can find the selection mode here here to click the full row select here to put the full row select now you have to run the project now here to see it's automatically filled row selection so click anywhere anyplace anywhere it will selecting only full row now once I hit the row I need to call all the records into this grid view so how to do that so this is go to properties of this grip you clip the event icons he went icon you have to click the mouse click mouse click so mouse click just enter it so it will create that even for mouse click here here just I am calling the valleys just copy this record and paste it here Here I am changing little bit selected rows zero I'm changing this value to likewise - we control we control the uncontrollably now no need this now here before that the Xbox one dot txt equal to so the selector data gravy selected rows dot cell zeros dot value is stored into text box one value two strings so here to pass the string cause the values to to swing I am calling this third like that through changing the motto Swigert to one three and four here combo box combo now and save the project now Aranda project here so he have to click any values it will change those values automatically likewise see now I hit the delete button I need to delete those particular records so now I am right the code for that so view designer double flip delete so we already using the insert query here yes i'm copy all the records inside the insert query and paste it here okay here delete successfully they successfully and changing the message text after that I am changing this their quarries to Reddit curry so before that I am going to lay our table and click the new quarry window here so select the table name right click delete based on mobile so column name here to choose mobile and filter just put the one so he will copy the hurry and no need this close you have to delete inside what you are return here to just burst it okay here replace the one to double code plus textbox1 dot txt plus w : okay just save the butt up okay delete from Mobile's where mobile equal to X Box 1 dot X okay now I'm saved but mobile number is not at Xbox one mobile number is at X Box 3 right ok now here to give the Xbox three mobile number for where conditional because we are declared mobile number is a primary key so based on the primary key is unique unique field that's why I'm using to delete that using the unique field now I am run the project hero and click and delete once and deleted it automatically reflected because we are already you declare display in in the lost of the rows so now is delete in perfectly ok now I will teach how to update this record of to update this record so yes I am copy this same curry and they stood now here I need to go to new curry a table and change to update so click all the fields here and now while number section here to just put anyone here type 1 and click so it will create the chorus for you just coffee this GUI and go to taste it here replace the text plus Xbox today you don't fixed text here you have to pause the first name field plus text box 1 dot text here text box to dot txt and text was great dot txt and mobile number sorry email number Xbox four dot text and category number box 1 dot so we changed those details we made any mistakes so in changing those single line so we changed likewise okay guys now you will see the Cory's Catholic update mobile set first name last name everything is correct I think now I'm here change to update successful update successful and click Save run and click on click here any name so I need to John change the name to John widows and click update so you will see it update successful I need to changed on day John's or J this J and click update so it will update successfully likewise we can change any face like that okay now for the tutorial I will teach how to search and all such the contacts and all so I need to write the such field no this tutorial I will teach it is not a problem for me you have ok I need to add this copy this text box here and paste it here so this is yeah such field so if you have type anything it will be searching so I will write the query for that so I am just double click this text box go to properties this is Xbox file and click double click this so it automatically create the text search event now you have to just call but your showing because you already is get a section is that so that's why I is showing the warning message should yes save now insect go to display go to definition display here already returned some curries so I am just copied those curries here I am going to double click here and paste it here I am type that mobile MoBay like I like single quote double quote pass textbox Phi dot text Plus double quote percentage now I'm saved project and click run here now to so based on the record zero just put two so it will based on the record because starting later is to like them the likewise is showing so I'm I will do one more thing before also using percentage so stop the project first and percentage between such anywhere right five okay guys it will perfectly searching but I am try to search by name also so like ah I'm use our so mobile number Oh so oh my how much feel you want just you have a hat so I need two such fi rst question rst question like single quote percentage W code plus textbox PI dot text plus double quote for Sunday's single coat okay I think it's right now on the project so now type first name J it will filter and mobile number five zero so you can anything type anything I say mice I'm using last name also just copy this let's see and twist it here put last and save here and type we say J 9 - so based on the record it will searching for factory ok guys we will meet on next best tutorial bye see you later
Info
Channel: Vetrivel D
Views: 322,688
Rating: undefined out of 5
Keywords: C# (Programming Language), create own c# project, make own mini project, mini application, telephone diary, make telephone diary, Programming Language (Software Genre), learn c#, learn c sharp, step by step c sharp tutorial, Microsoft Visual C# (Programming Language), inset, update, delete, insert update delete in c#, tutorial, c# projects with source code, c# projects, c# login form with sql database, c# projects step by step, c# project with database, c# project with sql server
Id: QORB9qbsC8M
Channel Id: undefined
Length: 62min 4sec (3724 seconds)
Published: Sat May 02 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.