private Task ResetCreateWindow() { PSUADD.IsEnabled = true; CPUADD.IsEnabled = true; CaseADD.IsEnabled = true; RAMADD.IsEnabled = true; MBADD.IsEnabled = true; GPUADD.IsEnabled = true; PSUCombo.IsEnabled = true; CPUCombo.IsEnabled = true; CaseCombo.IsEnabled = true; RAMCombo.IsEnabled = true; MBCombo.IsEnabled = true; GPUCombo.IsEnabled = true; PSUCombo.SelectedValue = null; CPUCombo.SelectedValue = null; CaseCombo.SelectedValue = null; RAMCombo.SelectedValue = null; MBCombo.SelectedValue = null; GPUCombo.SelectedValue = null; HDDCombo.SelectedValue = null; CustID.Clear(); StaffID.Clear(); _orderedItems.Clear(); _listBoxItems.Clear(); OrderListBox.ItemsSource = _listBoxItems; return(Task.CompletedTask); }
public void FormControls(string CLR) { if (CLR == "CLR") { StaffID.Clear(); StaffName.Clear(); StaffType.Text = "Select"; StaffAddress.Clear(); StaffCity.Clear(); StaffContact.Clear(); StaffID.Enabled = false; StaffName.Enabled = false; StaffType.Enabled = false; StaffAddress.Enabled = false; StaffCity.Enabled = false; StaffContact.Enabled = false; btnsave.Enabled = false; btnedit.Enabled = false; btndelete.Enabled = false; btnadd.Enabled = true; btnfind.Enabled = true; Left1.Enabled = false; Right1.Enabled = false; } if (CLR == "Save") { btnsave.Enabled = true; btnadd.Enabled = false; btnfind.Enabled = false; btndelete.Enabled = false; btnedit.Enabled = false; StaffName.Enabled = true; StaffType.Enabled = true; StaffAddress.Enabled = true; StaffCity.Enabled = true; StaffContact.Enabled = true; StaffName.Focus(); } }