Exemplo n.º 1
0
        protected void Eliminar_Click(object sender, EventArgs e)
        {
            try
            {
                OCKO_TblFase fasesLocal = fasesClases.BuscarIdFases(Convert.ToInt32(hdId.Value));
                fasesClases.EliminarFases(fasesLocal);
                mensaje = " " + fasesLocal.FasNombre + "";

                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "confirm", "MensajeEliminar('" + mensaje + "');", true);
                ClientScript.RegisterStartupScript(this.GetType(), "", " setTimeout('window.location.href = window.location.href', 3000);", true);
            }
            catch (Exception ex)
            {
                Session["PM_ERROR"] = ex;
                Response.Redirect("PM_ERRORaspx");
            }
        }
Exemplo n.º 2
0
 protected void btnEditar_Click(object sender, EventArgs e)
 {
     try
     {
         OCKO_TblFase faseLocal = fasesClases.BuscarIdFases(Convert.ToInt32(hdId.Value));
         faseLocal.FasNombre      = txtNombreEdit.Text;
         faseLocal.FasDescripcion = txtDescripcionEdit.Text;
         fasesClases.ActualizarFases(faseLocal);
         mensaje = "" + faseLocal.FasNombre;
         ScriptManager.RegisterStartupScript(Page, Page.GetType(), "confirm", "MensajeEditado('" + mensaje + "');", true);
         ClientScript.RegisterStartupScript(this.GetType(), "", " setTimeout('window.location.href = window.location.href', 3000);", true);
     }
     catch (Exception ex)
     {
         Session["ERROR_PM"] = ex;
         Response.Redirect("PM_ERROR.aspx");
     }
 }
Exemplo n.º 3
0
        protected void grvFase_SelectedIndexChanged(object sender, EventArgs e)
        {
            pnlBotones.Visible = true;
            try
            {
                GridViewRow row = grvFase.SelectedRow;
                id         = row.Cells[1].Text;
                hdId.Value = id;

                OCKO_TblFase fasesLocal = fasesClases.BuscarIdFases(Convert.ToInt32(hdId.Value));
                txtNombreEdit.Text      = fasesLocal.FasNombre;
                txtDescripcionEdit.Text = fasesLocal.FasDescripcion;
            }
            catch (Exception ex)
            {
                Session["PM_ERROR"] = ex;
                Response.Redirect("PM_ERRORaspx");
            }
        }
Exemplo n.º 4
0
 public void ActualizarFases(OCKO_TblFase Fases)
 {
     OckoDc.SubmitChanges();
 }
Exemplo n.º 5
0
 public void EliminarFases(OCKO_TblFase Fases)
 {
     OckoDc.OCKO_TblFase.DeleteOnSubmit(Fases);
     OckoDc.SubmitChanges();
 }
Exemplo n.º 6
0
 public void GuardarFases(OCKO_TblFase Fases)
 {
     OckoDc.OCKO_TblFase.InsertOnSubmit(Fases);
     OckoDc.SubmitChanges();
 }