protected void Button1_Click(object sender, EventArgs e)
    {
        int    empId    = Convert.ToInt32(Session["receptionistId"].ToString());
        string fromDate = DateTime.ParseExact(TextBox1.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString();
        string toDate   = DateTime.ParseExact(TextBox2.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString();
        int    callType = Convert.ToInt32(DropDownList1.SelectedIndex);

        switch (callType)
        {
        case 1:
            FilterGeneralInquiryPhoneCallBL objFilterGeneralInquiryPhoneCallBL = new FilterGeneralInquiryPhoneCallBL();
            GridView1.DataSource = objFilterGeneralInquiryPhoneCallBL.FilterGeneralInquiryPhoneCall(empId, fromDate, toDate);
            GridView1.DataBind();
            MultiView1.ActiveViewIndex = 0;
            break;

        case 2:
            FilterEmergencyPhoneCallBL objFilterEmergencyPhoneCallBL = new FilterEmergencyPhoneCallBL();
            GridView2.DataSource = objFilterEmergencyPhoneCallBL.FilterEmergencyPhoneCall(empId, fromDate, toDate);
            GridView2.DataBind();
            MultiView1.ActiveViewIndex = 1;
            break;

        case 3:
            FilterForwardPhoneCallBL objFilterForwardPhoneCallBL = new FilterForwardPhoneCallBL();
            GridView3.DataSource = objFilterForwardPhoneCallBL.FilterForwardPhoneCall(empId, fromDate, toDate);
            GridView3.DataBind();
            MultiView1.ActiveViewIndex = 2;
            break;

        case 4:
            FilterMessagePhoneCallBL objFilterMessagePhoneCallBL = new FilterMessagePhoneCallBL();
            GridView4.DataSource = objFilterMessagePhoneCallBL.FilterMessagePhoneCall(empId, fromDate, toDate);
            GridView4.DataBind();
            MultiView1.ActiveViewIndex = 3;
            break;

        case 5:
            MultiView1.ActiveViewIndex = 4;
            break;
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        int empId = Convert.ToInt32(Session["receptionistId"].ToString());
        string fromDate = DateTime.ParseExact(TextBox1.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString();
        string toDate = DateTime.ParseExact(TextBox2.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString();
        int callType = Convert.ToInt32(DropDownList1.SelectedIndex);

        switch (callType)
        {
            case 1:
                FilterGeneralInquiryPhoneCallBL objFilterGeneralInquiryPhoneCallBL = new FilterGeneralInquiryPhoneCallBL();
                GridView1.DataSource = objFilterGeneralInquiryPhoneCallBL.FilterGeneralInquiryPhoneCall(empId, fromDate, toDate);
                GridView1.DataBind();
                MultiView1.ActiveViewIndex = 0;
                break;

            case 2:
                FilterEmergencyPhoneCallBL objFilterEmergencyPhoneCallBL = new FilterEmergencyPhoneCallBL();
                GridView2.DataSource = objFilterEmergencyPhoneCallBL.FilterEmergencyPhoneCall(empId, fromDate, toDate);
                GridView2.DataBind();
                MultiView1.ActiveViewIndex = 1;
                break;

            case 3:
                FilterForwardPhoneCallBL objFilterForwardPhoneCallBL = new FilterForwardPhoneCallBL();
                GridView3.DataSource = objFilterForwardPhoneCallBL.FilterForwardPhoneCall(empId, fromDate, toDate);
                GridView3.DataBind();
                MultiView1.ActiveViewIndex = 2;
                break;

            case 4:
                FilterMessagePhoneCallBL objFilterMessagePhoneCallBL = new FilterMessagePhoneCallBL();
                GridView4.DataSource = objFilterMessagePhoneCallBL.FilterMessagePhoneCall(empId, fromDate, toDate);
                GridView4.DataBind();
                MultiView1.ActiveViewIndex = 3;
                break;

            case 5:
                MultiView1.ActiveViewIndex = 4;
                break;
        }
    }