protected void Eliminar_hito(object sender, ImageClickEventArgs e) { BL_RRHH_SOL_HITO obj = new BL_RRHH_SOL_HITO(); DataTable dt = new DataTable(); ImageButton btnEliminar = ((ImageButton)sender); dt = obj.uspDEL_RRHH_SOL_HITO_ID(Convert.ToInt32(btnEliminar.CommandArgument)); ListarHito(); ListarStakeholder(); }
protected void btnStakeholder_Click(object sender, EventArgs e) { string cleanMessage = string.Empty; registroProyecto(); if (lblCodigo.Text != string.Empty) { if (txtStakeholder.Text == string.Empty) { cleanMessage = "Ingresar nombre"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (txtRol.Text == string.Empty) { cleanMessage = "Ingresar cargo"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (txtInteracion.Text == string.Empty) { cleanMessage = "Ingresar interacción"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else { BE_RRHH_SOL_HITO obj = new BE_RRHH_SOL_HITO(); obj.IDE_HITOS = 0; obj.IDE_FORMATIVO = Convert.ToInt32(lblCodigo.Text); obj.DESCRIPCION = string.Empty; obj.FECHA_HITO = string.Empty; obj.TIPO = 2; obj.HOLDER = txtStakeholder.Text; obj.ROL = txtRol.Text; obj.INTERACCION = txtInteracion.Text; int rpta = new BL_RRHH_SOL_HITO().INS_RRHH_SOL_HITO(obj); if (rpta > 0) { cleanMessage = "Registro satisfactorio (Relación clave)"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); ListarStakeholder(); txtInteracion.Text = string.Empty; txtRol.Text = string.Empty; txtStakeholder.Text = string.Empty; } } } }
protected void ListarHito() { BL_RRHH_SOL_HITO obj = new BL_RRHH_SOL_HITO(); DataTable dt = new DataTable(); dt = obj.uspSEL_RRHH_SOL_HITO_FORMATIVO_TIPO(Convert.ToInt32(lblCodigo.Text), 1); if (dt.Rows.Count > 0) { gridHito.Visible = true; gridHito.DataSource = dt; gridHito.DataBind(); } else { gridHito.Visible = false; gridHito.DataSource = dt; gridHito.DataBind(); } }
protected void ListarStakeholder() { BL_RRHH_SOL_HITO obj = new BL_RRHH_SOL_HITO(); DataTable dt = new DataTable(); dt = obj.uspSEL_RRHH_SOL_HITO_FORMATIVO_TIPO(Convert.ToInt32(lblCodigo.Text), 2); if (dt.Rows.Count > 0) { GridStakeholder.Visible = true; GridStakeholder.DataSource = dt; GridStakeholder.DataBind(); } else { GridStakeholder.Visible = false; GridStakeholder.DataSource = dt; GridStakeholder.DataBind(); } }
protected void btnHito_Click(object sender, EventArgs e) { string cleanMessage = string.Empty; registroProyecto(); if (lblCodigo.Text != string.Empty) { if (txtHito.Text == string.Empty) { cleanMessage = "Ingresar etapa"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (txtFechaHito.Text == string.Empty) { cleanMessage = "Ingresar fecha de etapa"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else { BE_RRHH_SOL_HITO obj = new BE_RRHH_SOL_HITO(); obj.IDE_HITOS = 0; obj.IDE_FORMATIVO = Convert.ToInt32(lblCodigo.Text); obj.DESCRIPCION = txtHito.Text; obj.FECHA_HITO = txtFechaHito.Text; obj.TIPO = 1; obj.HOLDER = string.Empty; obj.ROL = string.Empty; obj.INTERACCION = string.Empty; int rpta = new BL_RRHH_SOL_HITO().INS_RRHH_SOL_HITO(obj); if (rpta > 0) { ListarHito(); cleanMessage = "Registro satisfactorio (Etapa)"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); txtHito.Text = string.Empty; txtFechaHito.Text = string.Empty; } } } }