protected void GVBusquedaProyecto_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            string vId = e.CommandArgument.ToString();

            Session["STEIDPROYECTO"] = vId;
            if (e.CommandName == "Modificar")
            {
                DataTable vDatos = new DataTable();
                string    vQuery = "RSP_TiempoExtraordinarioGenerales 48," + vId;
                vDatos      = vConexion.obtenerDataTable(vQuery);
                Titulo.Text = "Modificar proyecto No.: " + vId;
                string estado = vDatos.Rows[0]["estado"].ToString() == "True" ? "1" : "0";
                TxProyectoModal.Text    = vDatos.Rows[0]["nombreTrabajo"].ToString();
                TxDescripcionModal.Text = vDatos.Rows[0]["descripcionTrabajo"].ToString();
                TxHrsModal.Text         = vDatos.Rows[0]["totalHrs"].ToString();
                TxPagoModal.Text        = vDatos.Rows[0]["pagoHr"].ToString();
                DDLEstado.SelectedValue = estado;

                DivAlerta.Visible = false;
                UpdateModal.Update();

                if (Session["USUARIO"].ToString() == "80037" || Session["USUARIO"].ToString() == "305")
                {
                    TxHrsModal.ReadOnly = false;
                }
                else
                {
                    TxHrsModal.ReadOnly = true;
                }
                UpdatePanel1.Update();
                UpdatePanel3.Update();
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModificarModal();", true);
            }
        }
Example #2
0
        protected void BtnEnviarModificacion_Click(object sender, EventArgs e)
        {
            try
            {
                validacionesModificar();

                DataTable vDatos = new DataTable();
                String    vQuery = "RSP_TiempoExtraordinarioGenerales 55,'"
                                   + Session["STEIDTIPOTRABAJO"].ToString()
                                   + "','" + TxTrabajoModal.Text
                                   + "'," + DDLEstado.SelectedValue
                                   + "," + Session["USUARIO"];
                Int32 vRespuesta = vConexion.ejecutarSql(vQuery);

                if (vRespuesta == 1)
                {
                    Mensaje("Tipo de trabajo modificada con exito", WarningType.Success);
                }
                else
                {
                    Mensaje("Ha ocurrido un error. Favor comunicarse con sistemas.", WarningType.Danger);
                }


                CargarTiposTrabajo();
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "closeModificarModal();", true);
            }
            catch (Exception ex)
            {
                LbMensajeModalError.Text = ex.Message;
                DivAlerta.Visible        = true;
                UpdateModal.Visible      = true;
                UpdateModal.Update();
            }
        }
Example #3
0
        protected void GVBusquedaTrabajos_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            string vId = e.CommandArgument.ToString();

            Session["STEIDTIPOTRABAJO"] = vId;
            if (e.CommandName == "Modificar")
            {
                DataTable vDatos = new DataTable();
                string    vQuery = "RSP_TiempoExtraordinarioGenerales 54," + vId;
                vDatos = vConexion.obtenerDataTable(vQuery);

                Titulo.Text = "Modificar tipo trabajo No.: " + vId;
                string estado = vDatos.Rows[0]["estado"].ToString() == "True" ? "1" : "0";
                TxTrabajoModal.Text     = vDatos.Rows[0]["nombreTrabajo"].ToString();
                DDLEstado.SelectedValue = estado;

                DivAlerta.Visible = false;
                UpdateModal.Update();
                UpdatePanel1.Update();
                UpdatePanel3.Update();
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModificarModal();", true);
            }
        }
Example #4
0
        private void buttonUpdateProduct_Click(object sender, EventArgs e)
        {
            UpdateModal updateModal = new UpdateModal(this._classes, this._selectedId);

            updateModal.Show();
        }