protected void btnRempl_Click(object sender, EventArgs e) { remplazado = getSelectedItemfromButton(sender); GridViewRemplazos.DataSource = ctrl.GetVigilantesReserva(remplazado); GridViewRemplazos.DataBind(); txtVigilanteRemplazar.Text = " >> " + remplazado.NOMBRE + " >> ID " + remplazado.ID; ScriptManager.RegisterStartupScript(this, GetType(), "Pop", "$('#popupTurno').modal('show');", true); }
protected void btnDelete_Click(object sender, EventArgs e) { VIGILANTE v = getSelectedItemfromButtom(sender); ctrl.EliminarVigilante(v); //ClientScript.RegisterStartupScript(GetType(), "myalert", "alert('Elemento eliminado: Vigilante #" + v.ID + "');", true); Response.Redirect("Vigilantes.aspx"); }
protected void btnEdit_Click(object sender, EventArgs e) { VIGILANTE v = getSelectedItemfromButtom(sender); txtIdVigilante.ReadOnly = true; txtIdVigilante.Text = v.ID; txtNombreVigilante.Text = v.NOMBRE; txtTelefonoVigilante.Text = v.TELEFONO; txtCivil.Text = v.CIVIL; txtEstado.Text = v.ESTADO; txtGrupo.Text = v.GRUPO; txtResidencial.Text = v.RESIDENCIAL; txtPrecioHora.Text = v.PRECIOHORA.ToString(); txtExtraHora.Text = v.EXTRAHORA.ToString(); ScriptManager.RegisterStartupScript(this, GetType(), "Pop", "$('#popupVigilante').modal('show');", true); }
protected void btnVigilante_Click(object sender, EventArgs e) { VIGILANTE obj = new VIGILANTE() { ID = txtIdVigilante.Text, NOMBRE = txtNombreVigilante.Text, TELEFONO = txtTelefonoVigilante.Text, CIVIL = txtCivil.Text, ESTADO = txtEstado.Text, GRUPO = txtGrupo.Text, RESIDENCIAL = txtResidencial.Text, PRECIOHORA = double.Parse(txtPrecioHora.Text), EXTRAHORA = double.Parse(txtExtraHora.Text), EXTRASTRABAJADAS = 0, HORASTRABAJADAS = 0 }; ctrl.RegistrarVigilante(obj); Response.Redirect("Vigilantes.aspx"); }
partial void DeleteVIGILANTE(VIGILANTE instance);
partial void UpdateVIGILANTE(VIGILANTE instance);
partial void InsertVIGILANTE(VIGILANTE instance);
private void detach_VIGILANTE(VIGILANTE entity) { this.SendPropertyChanging(); entity.RESIDENCIAL1 = null; }