private void _btnEdit_Click(object sender, EventArgs e) { product = proEdit; //editing = true; ControlUtil.EnableTextBoxes(_txtName, _txtPrice, _txtDescription); _cbOrganic.Enabled = true; ControlUtil.EnableButtons(_btnSave); ControlUtil.DisableButtons(_btnEdit, _btnDelete, _btnNew); }
private void _btnNew_Click(object sender, EventArgs e) { ControlUtil.DisableButtons(_btnNew); ControlUtil.EnableButtons(_btnSave); ControlUtil.EnableTextBoxes(_txtName, _txtPrice, _txtDescription); ControlUtil.ClearTextBoxes(_txtName, _txtPrice, _txtDescription); _cbOrganic.Checked = false; _cbOrganic.Enabled = true; product = proNew; }
private void EnableFields() { ControlUtil.EnableTextBoxes(this._txtName, this._txtAddress); this._txtPhone.ReadOnly = false; ControlUtil.EnableComboBoxes(this._cmbZone, this._cmbType); }