private void ChangePass_Load(object sender, EventArgs e) { con = new model.Connection(); con.GetConnection(); OleDbCommand com = new OleDbCommand("Select * from info where ID = '" + identity + "' ", con.con); OleDbDataReader rd = com.ExecuteReader(); while (rd.Read()) { pp = rd["Pass"].ToString(); } }
private void button3_Click(object sender, EventArgs e) { model.Connection con = new model.Connection(); con.GetConnection(); model.Fee fd = new model.Fee(); fd.ID = textBox15.Text; fd.role = textBox14.Text; fd.year = textBox3.Text; fd.Jan = "not paid"; fd.feb = "not paid"; fd.mar = "not paid"; fd.apr = "not paid"; fd.may = "not paid"; fd.jun = "not paid"; fd.jul = "not paid"; fd.aug = "not paid"; fd.sep = "not paid"; fd.oct = "not paid"; fd.nov = "not paid"; fd.dec = "not paid"; con.ExecuteQuery("insert into fees values('" + fd.ID + "','" + fd.year + "','" + fd.role + "','" + fd.Jan + "','" + fd.feb + "','" + fd.mar + "','" + fd.apr + "','" + fd.may + "','" + fd.jun + "','" + fd.jul + "','" + fd.aug + "','" + fd.sep + "','" + fd.oct + "','" + fd.nov + "','" + fd.dec + "')"); MessageBox.Show("successfully initialize the person"); }
private void UpdateResult_Load(object sender, EventArgs e) { con = new model.Connection(); con.GetConnection(); }