private void ClearMethod() { IDTB.Clear(); FirstNameTB.Clear(); LastNametextBox.Clear(); designationtextBox.Clear(); DepartmentTextBoc.Clear(); BasicSalarytextBox.Clear(); ConvancetextBox.Clear(); MedicalAlltextBox.Clear(); TotalAmounttextBox.Clear(); HouseRentTextBoc.Clear(); AbsenceTextBox.Text = "0"; LateTextBox.Text = "0"; HalfDayTextBox.Text = "0"; OverTimeHrtextBox.Text = "0"; AddedAllowanceTB.Clear(); DeductedAmountTB.Clear(); IncomeTextextBox.Clear(); NetSalaryTB.Clear(); Off = 0; NetSalary = 0; Allownc = 0; Deducted = 0; incomeTex = 0; OvertimeAmount = 0; OvertimeHours = 0; TotalAmount = 0; AtdDec = 0; halfDayAmount = 0; button3.Enabled = false; }
private void button2_Click_1(object sender, EventArgs e) { try { IDtextBox.Clear(); AdvtextBox.Clear(); TotalAmounttextBox.Clear(); RemainingtextBox.Clear(); connection.Open(); OleDbCommand command = new OleDbCommand(); command.Connection = connection; string query = "select * from BookingData"; command.CommandText = query; OleDbDataAdapter da = new OleDbDataAdapter(command); DataTable dt = new DataTable(); da.Fill(dt); dataGridView1.DataSource = dt; connection.Close(); } catch (Exception ex) { MessageBox.Show("error" + ex); } }
private void resetToolStripMenuItem_Click(object sender, EventArgs e) { IDtextBox.Clear(); NametextBox.Clear(); EmailtextBox.Clear(); PhonenumbertextBox.Clear(); EventSessiontextBox.Clear(); EventTypetextBox.Clear(); AddresstextBox.Clear(); AssignHalltextBox.Clear(); EstimatedGueststextBox.Clear(); AdvancetextBox.Clear(); CitytextBox.Clear(); TotalAmounttextBox.Clear(); }