Beispiel #1
0
        public void cargarDatosColeyTallerA()
        {
            DtoTallerAperturado tallape   = new DtoTallerAperturado();
            CtrTallerAperturado ctrTallap = new CtrTallerAperturado();

            tallape.codTallerAperturado = int.Parse(Session["t"].ToString());

            ctrTallap.consultarTallerAperturado3(tallape);

            txtNombTallerAperturado.Text = ctrTallap.consultarTallerAperturado2(tallape);
            //-------------------
            DtoColegio cole   = new DtoColegio();
            CtrColegio ctrcol = new CtrColegio();

            cole.codColegio = int.Parse(Session["r"].ToString());

            ctrcol.consultarColegio(cole);

            txtCole.Text      = cole.nombre;
            lblLat2.Text      = cole.latitud.ToString();
            lblLng2.Text      = cole.longitud.ToString();
            idTallerAper.Text = tallape.codTallerAperturado.ToString();
            lbldia.Text       = tallape.dia;
            lblalerta.Text    = tallape.codProfesor.ToString();

            caracteristicasGmap(cole.latitud.ToString(), cole.longitud.ToString());
        }
 protected void gv_talleresaperturados_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Inscribirse")
     {
         DtoTallerAperturado daot = new DtoTallerAperturado();
         CtrTallerAperturado obj  = new CtrTallerAperturado();
         int         index        = Convert.ToInt32(e.CommandArgument);
         GridViewRow selectedRow  = gv_talleresaperturados.Rows[index];
         TableCell   t            = selectedRow.Cells[0];
         TableCell   tall         = selectedRow.Cells[1];
         try
         {
             daot.codPersona          = int.Parse(prueba.Text);
             daot.codTallerAperturado = int.Parse(t.Text);
             obj.registrarAlumnoxTA(daot);
             selectedRow.Enabled = false;
             //mensajito :v
             lblmensaje.Text      = "INSCRIPCIÓN EXITOSA";
             lblmensaje.ForeColor = Color.Blue;
         }
         catch
         {
             lblmensaje.Text      = "Ya estas inscrito en el taller [" + tall.Text + "] , sorry :c";
             lblmensaje.ForeColor = Color.Red;
         }
     }
 }
Beispiel #3
0
 protected void gv_profesores_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Asignar")
     {
         CtrTallerAperturado obj = new CtrTallerAperturado();
         obj.updateTallxProf(int.Parse(idTallerAper.Text), int.Parse(idProfe.Text));
         lblmensaje.Text = "Profesor fue asignado !";
     }
 }