protected void btnSearch_Click(object sender, EventArgs e) { if ((this.ddlCaseType.SelectedIndex < 1) && (this.txtRegDate.Text == "____/__/__") && (this.txtAppelantName.Text.Trim() == "") && (this.txtRespondantName.Text.Trim() == "")) { this.lblStatusMessage.Text = "Please Enter (Or) Select Atleast One Field."; this.programmaticModalPopup.Show(); return; } try { ATTCaseSearch obj = new ATTCaseSearch(); //obj.CourtID = orgID; if (ddlCaseType.SelectedIndex > 0) { obj.CaseTypeID = int.Parse(ddlCaseType.SelectedValue); } if (txtRegDate.Text.Trim() != "" && txtRegDate.Text.Trim() != "____/__/__") { obj.RegDate = txtRegDate.Text; } if (txtAppelantName.Text.Trim() != "") { obj.Appelant = txtAppelantName.Text; } if (txtRespondantName.Text.Trim() != "") { obj.Respondant = txtRespondantName.Text; } obj.Verified = "U"; obj.DecisionYesNo = null; List <ATTCaseSearch> lst = BLLCaseSearch.GetCaseSearch(obj); Session["CaseRegistration"] = lst; grdCase.DataSource = lst; // CaseCount = lst.Count; grdCase.DataBind(); grdCase.SelectedIndex = -1; this.lblSearch.Text = "Total Records:- " + lst.Count; } catch (Exception ex) { lblStatusMessage.Text = ex.Message.ToString(); this.programmaticModalPopup.Show(); } }
protected void btnSearch_Click(object sender, EventArgs e) { if ((this.ddlCaseType.SelectedIndex < 1) && (this.txtCaseNo.Text == "___-__-____") && (this.txtRegNo.Text == "__-___-_____") && (this.txtRegDate.Text == "____/__/__") && (this.txtAppelantName.Text.Trim() == "") && (this.txtRespondantName.Text.Trim() == "")) { this.lblStatusMessage.Text = "Please Enter (Or) Select Atleast One Field."; this.programmaticModalPopup.Show(); return; } try { ATTCaseSearch obj = new ATTCaseSearch(); obj.CourtID = orgID; if (ddlCaseType.SelectedIndex > 0) { obj.CaseTypeID = int.Parse(ddlCaseType.SelectedValue); } if (txtRegNo.Text.Trim() != "" && txtRegNo.Text.Trim() != "__-___-_____") { obj.RegNo = txtRegNo.Text; } if (txtCaseNo.Text.Trim() != "" && txtCaseNo.Text.Trim() != "___-__-____") { obj.CaseNo = txtCaseNo.Text; } if (txtRegDate.Text.Trim() != "" && txtRegDate.Text.Trim() != "____/__/__") { obj.RegDate = txtRegDate.Text; } if (txtAppelantName.Text.Trim() != "") { obj.Appelant = txtAppelantName.Text; } if (txtRespondantName.Text.Trim() != "") { obj.Respondant = txtRespondantName.Text; } if (VerifiedYesNo.ToString() == "Y") { obj.Verified = "Y"; } else if (VerifiedYesNo.ToString() == "N") { obj.Verified = "N"; } else if (VerifiedYesNo.ToString() == "U") { obj.Verified = "U"; } else { obj.Verified = null; } if (DecisionYesNo.ToString() == "Y") { obj.DecisionYesNo = "Y"; } else if (DecisionYesNo.ToString() == "N") { obj.DecisionYesNo = "N"; } else if (DecisionYesNo.ToString() == "U") { obj.DecisionYesNo = "U"; } else { obj.DecisionYesNo = null; } List <ATTCaseSearch> lst = BLLCaseSearch.GetCaseSearch(obj); grdCase.DataSource = lst; CaseCount = lst.Count; grdCase.DataBind(); grdCase.SelectedIndex = -1; if (lst.Count > 0) { pnlCase.Height = Unit.Pixel(150); } else { pnlCase.Height = Unit.Pixel(30); } if (i1 == 0)//to prevent the event below from executing more than 1 time { i1++; OnBubbleClickBtn(e); } } catch (Exception ex) { lblStatusMessage.Text = ex.Message.ToString(); this.programmaticModalPopup.Show(); } }