Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

insert button in c#

//For Login button
//                                             Database name                   username textbox
SqlDataAdapter sa = new SqlDataAdapter("select *from Login where UserName='" + UserName.Text + "' and Password='" + Password.Text + "'", con);
            DataTable dt = new DataTable();
            sa.Fill(dt);
            if (dt.Rows.Count == 1)
            {
                MessageBox.Show("Welcome");

                this.Hide();
                Main_Form fm = new Main_Form();
                fm.Show();
            }

            else if (dt.Rows.Count != 1)

            {
                MessageBox.Show("Wrong Data! Try Again");
            }
Comment

PREVIOUS NEXT
Code Example
Csharp :: what is napalm made of 
Csharp :: Handling Collisions unity 
Csharp :: gcm_sender_id convert text 
Csharp :: Max upload size for ASP.MVC CORE website 
Csharp :: transform.lookat 2d 
Csharp :: unity set dictionary value 
Csharp :: unity repeat coroutine 
Csharp :: if exist request c# 
Csharp :: unity editorwindowtitle obsolete 
Csharp :: how to input message ox in c# 
Csharp :: mongodb truncation exception c# 
Csharp :: [Package Manager Window] Error while fetching labels: User is not logged in or user status invalid. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) 
Csharp :: show double in textbox c# 
Csharp :: c# max in 2d array row 
Csharp :: handle multiple threads c# 
Csharp :: back color for DateTimePicker control 
Csharp :: c# remove duplicate cards 
Csharp :: tostring vb.net format decimal value with comma 
Csharp :: Collision2d and Collider2d 
Csharp :: dateTime to dataRow in c# 
Csharp :: dispose await task c# 
Csharp :: Display all members of class using a for loop vb.net 
Csharp :: mental retardation 
Csharp :: C# Rev.ai transcription 
Csharp :: exception meaning in .net core 
Csharp :: telerik mvc grid scroll 
Csharp :: activeNetworkInfo depricated 
Csharp :: C# dictionnaries 
Csharp :: ExecuteResultAsync ActionContext statuscode 
Csharp :: mvc validate 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =