private void Form1_Load(object sender, EventArgs e) { panel1.BackColor = Color.FromArgb(130, 11, 19, 43); panel3.BackColor = Color.FromArgb(200, 11, 19, 43); panel2.BackColor = Color.FromArgb(200, 28, 37, 65); panel6.BackColor = Color.FromArgb(255, 39, 40, 56); back.BackColor = Color.FromArgb(100, 139, 40, 56); // display date & time date.Text = DateTime.Now.ToString("dddd, dd MMMM yyyy"); panel2.Controls.Add(Dashboard.Instance); Dashboard.Instance.Dock = DockStyle.Fill; Dashboard.Instance.BringToFront(); // passing value from login; con = new dbconfig(); con.query("select * from employee_acc where id ='" + identity.Text + "'"); DataRow row; row = con.queryEx().Rows[0]; label4.Text = row[1].ToString().Trim() + " " + row[2].ToString().Trim(); label5.Text = row[15].ToString(); }
private void Send_message_Load(object sender, EventArgs e) { con = new dbconfig(); con.query("select * from employee_acc"); comboBox1.Items.Clear(); foreach (DataRow dr in con.queryEx().Rows) { comboBox1.Items.Add(dr[9].ToString()); } }
private void Create_acc_Load(object sender, EventArgs e) { con = new dbconfig(); con.query("Select count(*) from create_acc"); DataRow row; row = con.queryEx().Rows[0]; textBox4.Enabled = false; int ac = 121122001 + Int32.Parse(row[0].ToString()); string Ac = Convert.ToString(ac); textBox4.Text = Ac; }
private void Login_page_Load(object sender, EventArgs e) { panel1.BackColor = Color.FromArgb(70, 205, 83, 52); panel5.BackColor = Color.FromArgb(230, 0, 0, 0); panel6.BackColor = Color.FromArgb(100, 0, 0, 0); textBox1.SelectionStart = 0; comboBox1.Items.Clear(); comboBox1.SelectedText = "Select type"; con = new dbconfig(); con.query("select * from employee_acc"); foreach (DataRow dr in con.queryEx().Rows) { comboBox1.Items.Add(dr[15].ToString()); } }
private void button3_Click(object sender, EventArgs e) { if (textBox8.Text == "" || textBox7.Text == "" || textBox6.Text == "" || textBox5.Text == "" || textBox12.Text == "" || textBox11.Text == "" || textBox14.Text == "" || textBox3.Text == "" || textBox4.Text == "" || textBox10.Text == "") { label23.Text = "*** All feild filup required"; label23.ForeColor = Color.Red; } else { if (button1.Text == "Upload" || button2.Text == "Upload") { label23.Text = "*** Upload photo & sinature"; label23.ForeColor = Color.Red; } else { if (comboBox1.Text == "" || comboBox2.Text == "") { label23.Text = "*** Select gander or acount type"; label23.ForeColor = Color.Red; } else { if (dateTimePicker1.Value.ToString() == " " || dateTimePicker2.Value.ToString() == " ") { label23.Text = "date of birth & select type"; } else { con = new dbconfig(); con.query("insert into create_acc(first_name, last_name, father_name, mother_name, mobile_number, email, nid_student_id, gander, dob, address, photo, signature, account_no, opening_date, acount_type, password,employee_id) values('" + textBox8.Text + "','" + textBox7.Text + "','" + textBox6.Text + "','" + textBox5.Text + "','" + textBox12.Text + "','" + textBox11.Text + "','" + textBox14.Text + "','" + comboBox1.Text.ToString() + "','" + dateTimePicker1.Value.ToString() + "','" + textBox3.Text + "',@pic,@pic2,'" + textBox4.Text.ToString() + "','" + dateTimePicker1.Value.ToString() + "','" + comboBox1.Text.ToString() + "','" + textBox10.Text + "','" + identity.Text + "')"); con.cmd.Parameters.AddWithValue("@pic", textBox4.Text + ".jpg"); con.cmd.Parameters.AddWithValue("@pic2", "s-" + textBox4.Text + ".jpg"); con.querynonEx(); SaveFileDialog s = new SaveFileDialog(); s.Filter = "JPG(*.JPG)|*.jpg|PNG(*.png)|*.png"; picture.Save(@"C:\\Users\\vesper\\Desktop\\DBMS project\\Mobile_Banking_System\\Mobile_Banking_System\\Resorces\\UserImage\\" + textBox4.Text + ".jpg", ImageFormat.Jpeg); picture2.Save(@"C:\\Users\\vesper\\Desktop\\DBMS project\\Mobile_Banking_System\\Mobile_Banking_System\\Resorces\\signature\\s-" + textBox4.Text + ".jpg", ImageFormat.Png); MessageBox.Show("Account open seccessfully"); } } } } }