private void button4_Click(object sender, EventArgs e) { if (v5 == null || v5.IsDisposed) { v5 = new Form7(); v5.Show(); } }
private void button2_Click(object sender, EventArgs e) { Form4.i += 4; Form4.s = Form5.s1; Form4 frm4 = new Form4(); frm4.Show(); Form6 frm6 = new WindowsFormsApplication3.Form6(); Form7 frm7 = new Form7(); frm7.Show(); this.Close(); }
private void button2_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=DESKTOP-GKVUTI7;Initial Catalog=HOSPITAL;Integrated Security=True"); con.Open(); SqlCommand sc = new SqlCommand("insert into approve values('" + textBox2.Text + "', '" + textBox3.Text + "',convert(varchar(50),'" + dateTimePicker1.Text + "'));", con); int o = sc.ExecuteNonQuery(); MessageBox.Show(o + " :approve has been recorded"); con.Close(); Form7 objform1 = new Form7(); this.Hide(); objform1.Show(); }
private void button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=DESKTOP-GKVUTI7;Initial Catalog=HOSPITAL;Integrated Security=True"); String str1 = "select emailid,password from DOCTOR where emailid='" + textBox1.Text + "'and password='******'"; SqlCommand cmd = new SqlCommand(str1, con); SqlDataAdapter da = new SqlDataAdapter(str1, con); DataTable dt = new DataTable(); da.Fill(dt); if (dt.Rows.Count == 1) { Form7 objform3 = new Form7(); this.Hide(); objform3.Show(); } else { MessageBox.Show("check your username or password"); } }
private void button1_Click(object sender, EventArgs e) { if (textBox6.Text != textBox7.Text) { errorProvider1.SetError(textBox7, "Password does not match!"); label15.Text = "Password does not match!"; errorProvider2.SetError(textBox7, ""); flag7 = 0; } else { errorProvider1.SetError(textBox7, ""); label15.Text = "Correct"; errorProvider2.SetError(textBox7, "correct"); flag7 = 1; } if (flag1 == 0 || flag2 == 0 || flag3 == 0 || flag4 == 0 || flag5 == 0 || flag6 == 0 || flag7 == 0) { MessageBox.Show("Incomplete form!!"); return; } MongoClient client = new MongoClient("mongodb://localhost"); MongoServer server = client.GetServer(); MongoDatabase db = server.GetDatabase("projecttest"); MongoCollection <BsonDocument> Customer = db.GetCollection <BsonDocument>("Customer"); MongoCollection <BsonDocument> Creditcrds = db.GetCollection <BsonDocument>("Creditcrds"); long userCount1 = 1; while (userCount1 > 0) { userCount1 = db.GetCollection("Customer").Count(Query.EQ("_id", accno2)); if (userCount1 > 0) { accno2++; } } long userCount2 = 1; while (userCount2 > 0) { userCount2 = db.GetCollection("Creditcrds").Count(Query.EQ("Accno", accno2)); if (userCount2 > 0) { accno2++; } } long userCount3 = 1; while (userCount3 > 0) { userCount3 = db.GetCollection("Creditcrds").Count(Query.EQ("_id", cardno2)); if (userCount3 > 0) { cardno2++; } } long userCount4 = 1; while (userCount4 > 0) { userCount4 = db.GetCollection("Creditcrds").Count(Query.EQ("Pin", pin2)); if (userCount4 > 0) { pin2++; } } balance = 0; BsonDocument cust = new BsonDocument { { "_id", accno2 }, { "Name", textBox1.Text.Trim() }, { "Address", textBox2.Text.Trim() }, { "Age", Convert.ToInt16(textBox3.Text.Trim()) }, { "Contact", Convert.ToInt64(textBox4.Text.Trim()) }, { "Income", Convert.ToInt32(textBox5.Text.Trim()) }, { "Password", textBox6.Text.Trim() } }; BsonDocument cred = new BsonDocument { { "_id", cardno2 }, { "Accno", accno2 }, { "CardType", comboBox1.Text.Trim() }, { "Issueddt", "09-2016" }, { "Expdt", "08-2021" }, { "Balance", balance }, { "Pin", pin2 } }; //Creditcrds.Insert(cred); Customer.Insert(cust); Creditcrds.Insert(cred); MessageBox.Show("Thank You.", "User registered!!"); cardtype = comboBox1.Text.Trim(); Form7 form7 = new Form7(accno2, cardno2, cardtype, pin2); form7.Show(); Close(); }
//print button private void button7_Click(object sender, EventArgs e) { Form7 form = new Form7(); form.Show(); }
private void button6_Click(object sender, EventArgs e) { Form7 newForm7 = new Form7(); newForm7.ShowDialog(); }
private void button2_Click(object sender, EventArgs e) { Form7 form7 = new Form7(); form7.Show(); }
private void button2_Click(object sender, EventArgs e) { Form7 x = new Form7(); x.Show(); Hide(); }
private void button7_Click_1(object sender, EventArgs e) { Form7 f6 = new Form7(); f6.Show(); }