private void IDTB_TextChanged(object sender, EventArgs e) { if (AmounttextBox.Text == "0") { AmounttextBox.Clear(); } }
private void ClearMethod() { IDTB.Clear(); FirstNameTB.Clear(); LastNametextBox.Clear(); DateOfHired.Clear(); BasicSalarytextBox.Clear(); DepartmentTextBoc.Clear(); designationtextBox.Clear(); StatusTB.Clear(); MonthYear.Value = DateTime.Now; perradioButton.Checked = false; AmountradioButton.Checked = false; PertextBox.Clear(); AmounttextBox.Clear(); ReasontextBox.Clear(); button1.Enabled = false; button3.Enabled = false; Amountlabel.Text = "Total Salary : 0"; DeductionSalaryTb.Text = "Salary After Deduction : 0"; }
private void perradioButton_CheckedChanged(object sender, EventArgs e) { if (perradioButton.Checked) { PertextBox.Enabled = true; } if (!perradioButton.Checked) { PertextBox.Enabled = false; PertextBox.Clear(); } if (AmountradioButton.Checked) { AmounttextBox.Enabled = true; } if (!AmountradioButton.Checked) { AmounttextBox.Enabled = false; AmounttextBox.Clear(); } }