protected void btnSearch_Click(object sender, EventArgs e) { wsvFeeDeviation.FeeDeviation fd = new wsvFeeDeviation.FeeDeviation(); string strSearch = txtSearch.Text.Trim(); wsvFeeDeviation.CFeeDeviation[] temp; //DateTime.MinValue is equivalent to vb.net's Date=nothing temp = fd.search(strSearch, DateTime.MinValue,DateTime.MinValue ); grdData.DataSource = temp; grdData.DataBind(); int intFound = 0; if (temp != null) { intFound = temp.Length; } lblDisplay.Text = "<strong>" + intFound.ToString() + "</strong> Records found"; }
private void InitPage() { wsvFeeDeviation.FeeDeviation service = new wsvFeeDeviation.FeeDeviation(); wsvFeeDeviation.CFeeDeviation[] temp; temp = service.getAllFeeDeviations(); grdData.DataSource = temp; grdData.DataBind(); }