lcuser = this.txtUserName.Value; lcpassword = this.txtPassword.Value; SqlConnection con = new SqlConnection("Data source = UIS-PC\\SQLEXPRESS; Initial Catalog=Database1; integrated security = SSPI;"); SqlCommand selectid = new SqlCommand("SELECT cuser, cpassword, cbranch, caddress FROM branch", con); con.Open(); SqlDataReader BranchReader = selectid.ExecuteReader(); int branch = BranchReader.GetOrdinal("caddress"); while (BranchReader.Read()) { gcbranch = BranchReader.GetName(2).ToString(); gcaddress = BranchReader[2].ToString(); gcuser = BranchReader.GetValue(3).ToString(); gcpassword = BranchReader.GetValue(2).ToString();
gcbranch = BranchReader[2].ToString(); gcaddress = BranchReader[3].ToString(); gcuser = BranchReader[0].ToString(); gcpassword = BranchReader[1].ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)