private void btnBusiAction_Click(object sender, EventArgs e) { if (txtBusiName.Text.Length != 0 && txtBusiDesc.Text.Length != 0) { if (!isBusiSelected) { var business = new Business(); business.name = txtBusiName.Text; business.description = txtBusiDesc.Text; DBbusiness.createBusiness(business); refreshBusinessFields(); fillControls(); mostrarMensajeExito(); } else { var business = new Business(); business.idBusiness = Convert.ToInt32(idBusiSelected); business.name = txtBusiName.Text; business.description = txtBusiDesc.Text; DBbusiness.modify(business); refreshBusinessFields(); fillControls(); mostrarMensajeExito(); isBusiSelected = false; changeBusiControlState(); } } else { mostrarFuncionLlenadoCampos(); } }