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(); }
private void Bt_Update_Click(object sender, EventArgs e) { db.closeConnection(); SqlCommand cmd = db.UpdateTrip(Tb_Name.Text, Tb_Streetname.Text, Tb_City.Text, Tb_PostCode.Text, Tb_Province.Text, Tb_Phone.Text, Tb_Name2.Text, Tb_StreetAddress2.Text, Tb_City2.Text, Tb_Postcode2.Text, Tb_Province2.Text, Tb_Phone2.Text, Tb_Description.Text, Tb_Statue.Text, TripID.ToString()); cmd.Parameters.AddWithValue("@S_Name", Tb_Name.Text); cmd.Parameters.AddWithValue("@S_StreetAddress", Tb_Streetname.Text); cmd.Parameters.AddWithValue("@S_City", Tb_City.Text); cmd.Parameters.AddWithValue("@S_Postcode", Tb_PostCode.Text); cmd.Parameters.AddWithValue("@S_Province", Tb_Province.Text); cmd.Parameters.AddWithValue("@S_Phone", Tb_Phone.Text); cmd.Parameters.AddWithValue("@R_Name", Tb_Name2.Text); cmd.Parameters.AddWithValue("@R_StreetAddress", Tb_StreetAddress2.Text); cmd.Parameters.AddWithValue("@R_City", Tb_City2.Text); cmd.Parameters.AddWithValue("@R_Postcode", Tb_Postcode2.Text); cmd.Parameters.AddWithValue("@R_Province", Tb_Province2.Text); cmd.Parameters.AddWithValue("@R_Phone", Tb_Phone2.Text); cmd.Parameters.AddWithValue("@R_Description", Tb_Description.Text); cmd.Parameters.AddWithValue("@Status", Tb_Statue.Text); cmd.ExecuteNonQuery(); Tb_Name.ResetText(); Tb_Streetname.ResetText(); Tb_City.ResetText(); Tb_PostCode.ResetText(); Tb_Province.ResetText(); Tb_Phone.ResetText(); Tb_Name2.ResetText(); Tb_StreetAddress2.ResetText(); Tb_City2.ResetText(); Tb_Postcode2.ResetText(); Tb_Province2.ResetText(); Tb_Phone2.ResetText(); Tb_Description.ResetText(); Tb_Statue.ResetText(); }