private void validateSearch() { monthToSearch = DropDownListMonths.SelectedItem.ToString(); String year = DropDownListYearsMonth.SelectedItem.ToString(); try { int realyear = int.Parse(year); idNotary = int.Parse(Session["NotaryID"].ToString()); LabelMonth.Text = monthToSearch; //alert(idNotary+ " " + monthToSearch + " " + realyear); GridViewMonthsSearch.DataSource = bll.loadAllWritingsByProtocol(idNotary, monthToSearch, realyear); GridViewMonthsSearch.DataBind(); GridViewMonths.DataSource = null; GridViewMonths.DataBind(); /* GridViewMonthsSearch.Visible = true; * GridViewMonths.Visible = false;*/ clearCoNotary(); } catch (Exception e) { alert("Existe un error en el Año"); } }
protected void ButtonActual_Click(object sender, EventArgs e) { GridViewMonthsSearch.DataSource = null; GridViewMonthsSearch.DataBind(); /*GridViewMonthsSearch.Visible = false; * GridViewMonths.Visible = true;*/ int varr = int.Parse(Session["NotaryID"].ToString()); GridViewMonths.DataSource = bll.loadAllWritingsByProtocol(varr); GridViewMonths.DataBind(); Label2.Text = ""; GridView1.DataSource = null; GridView1.DataBind(); LabelMonth.Text = bll.getMonth(); }