public void EliminarServicio(int id) { ServiceServicioComedor ssc = new ServiceServicioComedor(); SERVICIOCOMEDOR sc = ssc.getEntity(id); if (MessageBox.Show("Esta seguro de que desea eliminar el servicio: " + sc.PLATO + "?", "Eliminar Servicio", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning) == DialogResult.Yes) { ssc.delEntity(sc.IDSERVICIO); MessageBox.Show("Servicio Eliminado", "Eliminar Servicio", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } }
public void LlenarCampos(int idServicio, TextBox plato, TextBox precio, ComboBox tipoServicio, Label id) { ServiceServicioComedor ssc = new ServiceServicioComedor(); ServiceTipoServicio sts = new ServiceTipoServicio(); SERVICIOCOMEDOR sc = ssc.getEntity(idServicio); this.LlenarComboTipo(tipoServicio); plato.Text = sc.PLATO; precio.Text = sc.PRECIO.ToString(); tipoServicio.SelectedIndex = (int)sc.TIPOSERVICIO - 1; id.Text = sc.IDSERVICIO.ToString(); }