gracias andres
el método que me manda a grabar la información es este:

public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                MostrarTodosPaisesDeptos();
        }

        private void MostrarTodosPaisesDeptos()
        {
            this.GVMostrarpais.DataSource =
GES_PAISESService.GetTodosPaises();
            this.GVMostrarpais.DataBind();

            this.GVMostrardepartamento.DataSource =
GES_DEPARTAMENTOSService.GetTodosDepartamentos();
            this.GVMostrardepartamento.DataBind();
        }

        protected void btnenviarpais_Click(object sender, EventArgs e)
        {
            GES_PAISES pais = new GES_PAISES();
            pais.CODDIVISIONPOLITICA =
Int32.Parse(this.txtidpais.Text);
            pais.NOMBRE = this.txtnombrepais.Text;
            GES_PAISESService.AnadirPaises(pais);
            MostrarTodosPaisesDeptos();
        }

        protected void btnenviardepartamento_Click(object sender,
EventArgs e)
        {
            GES_DEPARTAMENTOS departamento = new GES_DEPARTAMENTOS();
            departamento.CODDEPARTAMENTO =
Int32.Parse(txtiddepartamento.Text);

            departamento.CODDIVISIONPOLITICA =
Int32.Parse(txtCodigoPais.Text);
            departamento.NOMBRE = txtnombredepartamento.Text;

 
GES_DEPARTAMENTOSService.AnadirDepartamentos(departamento);

            MostrarTodosPaisesDeptos();
        }
    }

muchas gracias,,,,,

-- 
Para escribir al Grupo, hágalo a esta dirección: 
[email protected]
Para más, visite: http://groups.google.com/group/NHibernate-Hispano

Responder a