void loadBudget() { DateTime?dtFrom = null, dtTo = null; if (txtdtFrom.Text != "") { dtFrom = Convert.ToDateTime(txtdtFrom.Text); } if (txtdtTo.Text != "") { dtTo = Convert.ToDateTime(txtdtTo.Text); } dttemp = csql.getBudgetPaging("SmartConcepcion", gvBudget.PageSize, gvBudget.PageIndex, dtFrom, dtTo, txtProjectname.Text, p_BrgyID); gvBudget.PageIndex = p_PageIndex; if (dttemp.Rows.Count > 0) { norecord.Visible = false; gvBudget.Visible = true; gvBudget.VirtualItemCount = (int)dttemp.Rows[0]["reccount"]; loadGridView(gvBudget, dttemp); } else { norecord.Visible = true; gvBudget.Visible = false; } upProject.Update(); //p_dtLeader = initLeaderDatatable(); }