protected void btnGuardarDepto_Click(object sender, EventArgs e)
        {
            int orderId = Convert.ToInt32(lbl_IdDepartamentoN.Text);

            DepartamentoDao depDao = new DepartamentoDao();
            if (depDao.updateDepartamento(orderId, vigencia) == "Ok")
            {
                Alerta.Text = "Datos Modificados en forma Correcta";
                Response.Redirect("MantenedorDepartamentosSename");

            }
            else
            {

                Alerta.Text = depDao.updateDepartamento(orderId, vigencia);
            }
        }
        protected void btnGuardarDepartamento_Click(object sender, EventArgs e)
        {
            Alerta.Enabled = true;

            int intManDepartamentoSubitem = int.Parse(ddlSLineaDeAccion.SelectedItem.Value);

            String manDepartamento = txtManDepartamento.Text;

            DepartamentoDao depDao = new DepartamentoDao();
            if (depDao.insertDepartamento(manDepartamento, intManDepartamentoSubitem) == "Ok")
            {
                Alerta.Text = "Se ha guardado correctamente";
                Response.Redirect("MantenedorDepartamentosSename");
            }
            else
            {
                Alerta.Text = depDao.insertDepartamento(manDepartamento, intManDepartamentoSubitem);
            }
        }
        private void LoadEditData(int orderId)
        {
            lblIdDepartamento.Text = Convert.ToString(orderId);
            DepartamentoDao depDao = new DepartamentoDao();

            DataSet ds = new DataSet();

            da = depDao.getDepartamentoId(orderId);

            DataTable dt = new DataTable();
            dt = depDao.getTableDepartamentoId();

            foreach (DataRow row in dt.Rows)
            {

                lbl_IdDepartamentoN.Text = row[0].ToString();
                txt_DescripcionDepartamento.Text = row[1].ToString();
                txt_IdLineaAccion.Text = row[2].ToString();
                txt_VigenciaDepartamento.Text = row[3].ToString();

            }
        }
        void getTableDepartamento()
        {
            DepartamentoDao depDao = new DepartamentoDao();
            DataSet ds = new DataSet();

            da = depDao.getDepartamento();
            da.Fill(ds);
            this.GV_Departamento.DataSource = ds;
            this.GV_Departamento.DataBind();
        }