protected void btnSearch_Click(object sender, EventArgs e)
    {
        if ((this.txtCauseListDate.Text == "____/__/__") || (this.txtCauseListDate.Text.Trim() == ""))
        {
            this.lblStatusMessage.Text = "Please Enter Cause List Date .";
            this.programmaticModalPopup.Show();
            return;
        }

        try
        {
            ////reset sessions
            Cases            = null;
            CasesNotAssigned = null;
            CasesSave        = null;
            //////

            ATTCaseSearchForCBA obj = new ATTCaseSearchForCBA();
            obj.CourtID = orgID;
            obj.ClDate  = txtCauseListDate.Text;

            List <ATTCaseSearchForCBA> lst = BLLCaseSeachForCBA.GetCaseSearch(obj);
            Cases            = lst;
            CasesNotAssigned = lst.FindAll(
                delegate(ATTCaseSearchForCBA ob)
            {
                return(string.IsNullOrEmpty(ob.AssignmentDate));
            }
                );
            grdCase.DataSource = CasesNotAssigned;
            CaseCount          = lst.Count;

            grdCase.DataBind();
            grdCase.SelectedIndex = -1;

            if (lst.Count > 0)
            {
                pnlCase.Height = Unit.Pixel(150);
            }
            else
            {
                pnlCase.Height = Unit.Pixel(5);
            }
        }
        catch (Exception ex)
        {
            lblStatusMessage.Text = ex.Message.ToString();
            this.programmaticModalPopup.Show();
        }
    }
Exemple #2
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        if ((this.txtCauseListDate.Text == "____/__/__") || (this.txtCauseListDate.Text.Trim() == ""))
        {
            this.lblStatusMessage.Text = "Please Enter Cause List Date .";
            this.programmaticModalPopup.Show();
            return;
        }


        try
        {
            ATTCaseSearchForCBA obj = new ATTCaseSearchForCBA();
            obj.CourtID = orgID;
            obj.ClDate  = txtCauseListDate.Text;
            //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 (txtCauseListDate.Text.Trim() != "" && txtCauseListDate.Text.Trim() != "____/__/__") obj.RegDate = txtCauseListDate.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 <ATTCaseSearchForCBA> lst = BLLCaseSeachForCBA.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();
        }
    }