예제 #1
0
        private void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            foreach (var item in gcDxTiempo.ViewCollection)
            {
                if (item.GetType() == typeof(GridView))
                {
                    GridView grdview      = (GridView)item as GridView;
                    int[]    selectedRows = grdview.GetSelectedRows();
                    if (selectedRows.Length > 0)
                    {
                        DialogResult seleccion = MessageBox.Show("¿Realmente deseas eliminar este tiempo?", "Atención!!!", MessageBoxButtons.OKCancel);

                        if (seleccion == DialogResult.OK)
                        {
                            TiempoManager cor = new TiempoManager();

                            TiempoWrapper corredorSeleccionadoVW = (TiempoWrapper)grdview.GetRow(selectedRows[0]);

                            tiempo corredorSeleccionado = cor.GetTiempoById(corredorSeleccionadoVW.TiempoId);

                            cor.Remove(corredorSeleccionado);

                            grdview.FocusedRowHandle = selectedRows[0];

                            MessageBox.Show("Se elimino el tiempo", "Atención");
                            ActualizarDatos();
                        }
                    }
                    break;
                }
            }
        }
예제 #2
0
        public IHttpActionResult Puttiempo(Guid guid, tiempo tiempo)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (guid != tiempo.guid)
            {
                return(BadRequest());
            }

            db.Entry(tiempo).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!tiempoExists(guid))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
예제 #3
0
 void Start()
 {
     puntaje      = 0;
     puntajesC    = GameObject.Find("objetoPuntaje").GetComponent <almacenaPuntajes>();
     codigoTiempo = GameObject.Find("tiempo").GetComponent <tiempo>();
     pasarJug     = GameObject.FindWithTag("PASAR");
     pasarJug.SetActive(false);
     martillo = GameObject.Find("martillo");
     martillo.SetActive(true);
 }
예제 #4
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
예제 #5
0
        public IHttpActionResult Posttiempo(tiempo tiempo)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.tiempo.Add(tiempo);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = tiempo.id_tiempo }, tiempo));
        }
예제 #6
0
        public IHttpActionResult Deletetiempo(Guid guid)
        {
            tiempo tiempo = db.tiempo.Where(u => u.guid == guid).FirstOrDefault <tiempo>();

            //tiempo tiempo = db.tiempo.Find(id);
            if (tiempo == null)
            {
                return(NotFound());
            }

            db.tiempo.Remove(tiempo);
            db.SaveChanges();

            return(Ok(tiempo));
        }
예제 #7
0
 void Update()
 {
     if (codigoTiempo == null)
     {
         codigoTiempo = GameObject.Find("tiempo").GetComponent <tiempo>();
     }
     if (puntajes == null)
     {
         puntajes = GameObject.Find("objetoPuntaje").GetComponent <almacenaPuntajesTRES>();
     }
     if (codigoTiempo.reloj <= 0)
     {
         Debug.Log("ENTRA 1");
         metodoEspera();
     }
 }
예제 #8
0
 // Start is called before the first frame update
 void Start()
 {
     secondsCounter = 0;
     codigoTiempo   = GameObject.Find("tiempo").GetComponent <tiempo>();
     puntajes       = GameObject.Find("objetoPuntaje").GetComponent <almacenaPuntajesTRES>();
 }