Click here to Skip to main content
15,886,069 members

Comments by Member 13847218 (Top 23 by date)

Member 13847218 1-Aug-18 3:18am View    
how do date month year calculate
i think warranty monthily duration
Member 13847218 31-Jul-18 7:45am View    
my project login page username password image login next page..
but this coding error incorrect username password
Member 13847218 30-Jul-18 8:01am View    
this not login
Member 13847218 30-Jul-18 8:00am View    
try
{

if (!(textBox1.Text == string.Empty))
{
//if (!(pictureBox1.Image == string.Empty))
if (!(pictureBox1.Image == null))

{

// this.pictureBox1.Image = null;
}
//FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
//this.pictureBox1 = System.Drawing.Image.FromStream(fs);

//if (MemoryStream ms = new MemoryStream();
// pictureBox1.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
{
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source=DESKTOP-8BEJFRN\\SQLEXPRESS;Initial Catalog=win;Integrated Security=True";
con.Open();
SqlCommand cmd = new SqlCommand("SELECT username,pic FROM pe WHERE username='" + textBox1.Text + "' and pic='" + pictureBox1.Image + "'", con);
SqlDataReader dr = cmd.ExecuteReader();
int count = 0;
while (dr.Read())
{
count = count + 1;
}
if (count == 1)
{


Form fm = new Form1();
fm.Show();
this.Hide();


}
else if (count > 1)
{
MessageBox.Show("Duplicate username and pic", "login form");
}
else
{
MessageBox.Show("user name and pic is incorrect", "login form");
}
}


}

else
{

MessageBox.Show("pic is empty", "login form");
}
}




//else





// MessageBox.Show("user name empty", "login form");






catch (Exception es)
{

MessageBox.Show(es.Message);
}
}





private void button2_Click(object sender, EventArgs e)
{

OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = "JPG Files(*.jpg)|*.jpg|jpg Files (*.jpg)|*.jpg";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
string picloc = openFileDialog1.FileName.ToString();
textBox2.Text = picloc;
pictureBox1.ImageLocation = picloc;
}


//public MemoryStream ms { get; set; }


}
}
}
Member 13847218 18-Jul-18 2:44am View    
already male save database
update female
not change female