private void Bt_Remove_Click(object sender, EventArgs e) { db.closeConnection(); db.DeleteEmp_Rate(Tb_Name.Text, RateID.ToString()); Tb_Role.ResetText(); Tb_Name.ResetText(); Tb_Starttime.ResetText(); Tb_EndTime.ResetText(); Tb_RPH.ResetText(); Tb_Date.ResetText(); }
private void Bt_Update_Click(object sender, EventArgs e) { db.closeConnection(); // SqlCommand cmd = db.UpdateEmp_rate(Tb_Role.Text, Tb_Name.Text, Tb_Starttime.Text, Tb_EndTime.Text, Convert.ToDouble(Tb_RPH.Text), Tb_Date.Text, RateID.ToString()); cmd.Parameters.AddWithValue("@Role", role); cmd.Parameters.AddWithValue("@Name", name); cmd.Parameters.AddWithValue("@StartTime", starttime); cmd.Parameters.AddWithValue("@EndTime", endtime); cmd.Parameters.AddWithValue("@RPH", RPH); cmd.Parameters.AddWithValue("@Date", Date); cmd.ExecuteNonQuery(); Tb_Role.ResetText(); Tb_Name.ResetText(); Tb_Starttime.ResetText(); Tb_EndTime.ResetText(); Tb_RPH.ResetText(); Tb_Date.ResetText(); }