Click here to Skip to main content
15,902,931 members

Comments by Member 11280947 (Top 70 by date)

Member 11280947 1-Feb-16 5:42am View    
Thank You
Member 11280947 1-Feb-16 5:37am View    
Yes I Need Check The Content of the textbox
Member 11280947 20-Oct-15 6:20am View    
string CS = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
using (SqlConnection con2 = new SqlConnection(CS))
{
SqlDataAdapter sda2 = new SqlDataAdapter("SELECT * FROM [TestCodeTBL] WHERE ([CodeNumbber] ='" + TxtPo.Text + "') ", CS);

DataTable dt2 = new DataTable();
sda2.Fill(dt2);
if (dt2.Rows.Count > 0)
{
MessageBox.Show("This Data Already Exists");
}
else
{

// Set Minimum to 1 to represent the first file being copied.
progressBar1.Minimum = 1;
// Set Maximum to the total number of Users created.
progressBar1.Maximum = dt2.Rows.Count;
// Set the initial value of the ProgressBar.
progressBar1.Value = 1;
// Set the Step property to a value of 1 to represent each user is being created.
progressBar1.Step = 1;



SqlCommand cmd2 = new SqlCommand("InsertCountCode", con2);
cmd2.CommandType = System.Data.CommandType.StoredProcedure;
cmd2.Parameters.AddWithValue("@count", txtStart.Text);
cmd2.Parameters.AddWithValue("@po", TxtPo.Text);
cmd2.Parameters.AddWithValue("@maxcounter", TxtMax.Text);
cmd2.Parameters.AddWithValue("@Style", comboStyle.Text);


con2.Open();
cmd2.ExecuteNonQuery();



// Loop through all files to copy.
for (int i = 1; i <= dt2.Rows.Count; i++)
{
bool result = InsertUserdetails(Username);--------------Problem Here
// Copy the file and increment the ProgressBar if successful.
if (result == true)
{
// Perform the increment on the ProgressBar.
progressBar1.PerformStep();
}
}

MessageBox.Show("Saved");
BtnNew.Enabled = true;
btnSave.Enabled = false;
}

}
Member 11280947 20-Oct-15 3:36am View    
Thank You First .
How Can Use This In My Code




// Loop through all files to copy.
for (int i = 1; i <= dt.Rows.Count; i++)
{
bool result=InsertUserdetails(Username);---------------Explain This Please
// Copy the file and increment the ProgressBar if successful.
if(result== true)
{
// Perform the increment on the ProgressBar.
Progressbar1.PerformStep();
}
}
Member 11280947 13-Oct-15 3:28am View    
Thank You