protected void AgregarRegistro(object sender, EventArgs e)
        {
            string ubicacio = txtUbicacion.Text.Trim();

            if (ubicacio != "")
            {
                oUbicacionesDAL = new ubicacionesDAL();
                oUbicacionesDAL.Agregar(datosUbicacion());
                ListarUbicaciones();

                var ubicacion = db.ubicaciones.Where(x => x.ubicaciones1 == ubicacio).FirstOrDefault();

                if (ubicacion != null)
                {
                    //oUbicacionesDAL = new ubicacionesDAL();
                    //oUbicacionesDAL.Agregar(datosUbicacion());
                    //ListarUbicaciones();
                }
                else
                {
                    //ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "alertaPassFail", "window.onload = function(){alert('contraseña es incorrecta1');};", true);
                }
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "alertaPassFail", "window.onload = function(){alert('Debe ingresar una ubicacion.');};", true);
            }
        }
 public void ListarUbicaciones()
 {
     oUbicacionesDAL          = new ubicacionesDAL();
     gvubicaciones.DataSource = oUbicacionesDAL.Listar();
     gvubicaciones.DataBind();
 }
 protected void ModificarRegistro(object sender, EventArgs e)
 {
     oUbicacionesDAL = new ubicacionesDAL();
     oUbicacionesDAL.Modificar(datosUbicacion());
     ListarUbicaciones();
 }