Beispiel #1
0
    private void Serach()
    {
        if (ddlSuperWiseSerach.SelectedIndex == 0 && ddlAssignedSearch.SelectedIndex != 0 && ddlMatterType.SelectedIndex == 0 && ddlStatus.SelectedIndex == 0)
        {
            dt = MV.AssignedLawyerSearch(ddlAssignedSearch.SelectedValue);
        }
        if (ddlSuperWiseSerach.SelectedIndex != 0 && ddlAssignedSearch.SelectedIndex == 0 && ddlMatterType.SelectedIndex == 0 && ddlStatus.SelectedIndex == 0)
        {
            dt = MV.SupervisiorLawyerSearch(ddlSuperWiseSerach.SelectedValue);
        }

        else if (ddlSuperWiseSerach.SelectedIndex != 0 && ddlAssignedSearch.SelectedIndex == 0 && ddlMatterType.SelectedIndex != 0 && ddlStatus.SelectedIndex == 0)
        {
            dt = MV.Assigned_Matter(ddlAssignedSearch.SelectedValue, ddlMatterType.SelectedValue);
        }

        else if (ddlSuperWiseSerach.SelectedIndex == 0 && ddlAssignedSearch.SelectedIndex == 0 && ddlMatterType.SelectedIndex != 0 && ddlStatus.SelectedIndex == 0)
        {
            dt = MV.MatterTypeSearch(ddlMatterType.SelectedValue);
        }
        else if (ddlSuperWiseSerach.SelectedIndex == 0 && ddlAssignedSearch.SelectedIndex == 0 && ddlMatterType.SelectedIndex == 0 && ddlStatus.SelectedIndex != 0)
        {
            dt = MV.StatusSearch(ddlStatus.SelectedValue);
        }

        else if (ddlMatterType.SelectedIndex != 0 && ddlStatus.SelectedIndex != 0 && ddlAssignedSearch.SelectedIndex == 0 && ddlSuperWiseSerach.SelectedIndex == 0)
        {
            dt = MV.Matter_status(ddlStatus.SelectedValue, ddlStatus.SelectedValue);
        }

        #region ************Superwisedropdown**************
        else if (ddlSuperWiseSerach.SelectedIndex != 0 && ddlAssignedSearch.SelectedIndex != 0 && ddlMatterType.SelectedIndex != 0 && ddlStatus.SelectedIndex != 0)
        {
            dt = MV.Assigned_superwiser_Matter_status(ddlAssignedSearch.SelectedValue, ddlSuperWiseSerach.SelectedValue, ddlMatterType.SelectedValue, ddlStatus.SelectedValue);
        }
        else if (ddlSuperWiseSerach.SelectedIndex != 0 && ddlAssignedSearch.SelectedIndex != 0 && ddlMatterType.SelectedIndex != 0 && ddlStatus.SelectedIndex == 0)
        {
            dt = MV.Assigned_superwiser_Matter(ddlAssignedSearch.SelectedValue, ddlSuperWiseSerach.SelectedValue, ddlMatterType.SelectedValue);
        }
        else if (ddlSuperWiseSerach.SelectedIndex != 0 && ddlAssignedSearch.SelectedIndex != 0 && ddlStatus.SelectedIndex == 0 && ddlMatterType.SelectedIndex == 0)
        {
            dt = MV.Assigned_superwiser(ddlAssignedSearch.SelectedValue, ddlSuperWiseSerach.SelectedValue);
        }

        else if (ddlSuperWiseSerach.SelectedIndex != 0 && ddlMatterType.SelectedIndex != 0 && ddlStatus.SelectedIndex != 0 && ddlAssignedSearch.SelectedIndex == 0)
        {
            dt = MV.superwiser_Matter_status(ddlSuperWiseSerach.SelectedValue, ddlMatterType.SelectedValue, ddlStatus.SelectedValue);
        }
        else if (ddlMatterType.SelectedIndex != 0 && ddlStatus.SelectedIndex != 0 && ddlAssignedSearch.SelectedIndex == 0 && ddlSuperWiseSerach.SelectedIndex == 0)
        {
            dt = MV.Matter_status(ddlMatterType.SelectedValue, ddlStatus.SelectedValue);
        }
        else if (ddlSuperWiseSerach.SelectedIndex != 0 && ddlMatterType.SelectedIndex != 0 && ddlAssignedSearch.SelectedIndex == 0 && ddlStatus.SelectedIndex == 0)
        {
            dt = MV.superwiser_Matter(ddlSuperWiseSerach.SelectedValue, ddlMatterType.SelectedValue);
        }

        else if (ddlSuperWiseSerach.SelectedIndex != 0 && ddlStatus.SelectedIndex != 0 && ddlAssignedSearch.SelectedIndex == 0 && ddlMatterType.SelectedIndex == 0)
        {
            dt = MV.superwiser_status(ddlSuperWiseSerach.SelectedValue, ddlStatus.SelectedValue);
        }

        else if (ddlSuperWiseSerach.SelectedIndex == 0 && ddlAssignedSearch.SelectedIndex != 0 && ddlMatterType.SelectedIndex != 0 && ddlStatus.SelectedIndex != 0)
        {
            dt = MV.Assigned_Matter_status(ddlAssignedSearch.SelectedValue, ddlMatterType.SelectedValue, ddlStatus.SelectedValue);
        }

        else if (ddlSuperWiseSerach.SelectedIndex == 0 && ddlAssignedSearch.SelectedIndex != 0 && ddlMatterType.SelectedIndex != 0 && ddlStatus.SelectedIndex == 0)
        {
            dt = MV.Assigned_Matter(ddlAssignedSearch.SelectedValue, ddlMatterType.SelectedValue);
        }
        else if (ddlSuperWiseSerach.SelectedIndex == 0 && ddlAssignedSearch.SelectedIndex != 0 && ddlMatterType.SelectedIndex == 0 && ddlStatus.SelectedIndex != 0)
        {
            dt = MV.Assigned_status(ddlAssignedSearch.SelectedValue, ddlStatus.SelectedValue);
        }

        #endregion
        MatterGrid.DataSource = dt;
        MatterGrid.DataBind();
    }