private void GuardarArea() { cAreas area = new cAreas(); if (!string.IsNullOrEmpty(Clave)) { //Actualizar area.Actualizar(new AREA { ID_AREA = SelectedItem.ID_AREA, DESCR = Descripcion, ID_CENTRO = SelectedTipo.ID_CENTRO }); } else { //Agregar area.Insertar(new AREA { ID_AREA = 0, DESCR = Descripcion, ID_CENTRO = SelectedTipo.ID_CENTRO }); } //Limpiamos las variables Clave = string.Empty; Descripcion = string.Empty; Tipo = 0; //Mostrar Listado this.GetAreas(); }