protected void btnAsociar_Click(object sender, ImageClickEventArgs e) { string cleanMessage = string.Empty; if (ddlRequerimiento.SelectedValue == string.Empty) { cleanMessage = "Ingresar Nro de requerimiento"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (txtFinSalida.Text.Trim() == string.Empty) { cleanMessage = "Ingresar fecha fin de contrato"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else if (GridView1.Rows.Count == 0) { cleanMessage = "No existen documentos registrados"; ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true); } else { Requ_Numero = Request.QueryString["Requ_Numero"].ToString(); Reqd_CodLinea = Request.QueryString["Reqd_CodLinea"].ToString(); Reqs_Correlativo = Request.QueryString["Reqs_Correlativo"].ToString(); BL_TBL_RequerimientoSubDetalle obj = new BL_TBL_RequerimientoSubDetalle(); DataTable dtResultado = new DataTable(); dtResultado = obj.uspREGISTRAR_LEGAJOFILE(Requ_Numero, Reqd_CodLinea, Reqs_Correlativo, 1, ddlRequerimiento.SelectedValue.ToString(), txtFinSalida.Text.Trim()); GrupoFile(); } }
protected void GuardarGrupo() { Requ_Numero = Request.QueryString["Requ_Numero"].ToString(); Reqd_CodLinea = Request.QueryString["Reqd_CodLinea"].ToString(); Reqs_Correlativo = Request.QueryString["Reqs_Correlativo"].ToString(); BL_TBL_RequerimientoSubDetalle obj = new BL_TBL_RequerimientoSubDetalle(); DataTable dtResultado = new DataTable(); foreach (GridViewRow row in GridView2.Rows) { string Reqs_CodigoCompleto = GridView2.DataKeys[row.RowIndex].Values[0].ToString(); // extrae key dtResultado = obj.uspREGISTRAR_LEGAJOFILE(Requ_Numero, Reqd_CodLinea, Reqs_Correlativo, 1, Reqs_CodigoCompleto, txtFinSalida.Text); } }