Esempio n. 1
0
        //Manage Panel Visibilty for Placements
        protected void ManageVisibility(object sender, CommandEventArgs e)
        {
            string cmdName = e.CommandName.ToString();

            switch (cmdName)
            {
            case "ViewPlacementDrives":
                lblPlacementAction.Text    = "Placements /Drives";
                pnlPlacementDrives.Visible = true;
                string drivCmd = string.Format(@"SELECT * FROM EduSphere.PlacementDrives d 
                                                              JOIN EduSphere.Organizations o ON d.EmployerID=o.OrganizationID JOIN EduSphere.Staff s ON d.CoordinatorID=s.EmployeeID 
                                                              ORDER BY DriveDate DESC");
                BD.DataBindToGridView(gvPlacementDrives, drivCmd, "NA");
                BD.DataBindToDropDownList(ddlEmployerID, string.Format("SELECT OrganizationID,OrganizationName FROM EduSphere.Organizations WHERE OrganizationType='{0}'", "EMPLOYER"));
                BD.DataBindToDropDownList(ddlCoordinatorID, string.Format("SELECT EmployeeID,FullName FROM EduSphere.Staff"));
                break;

            case "ReturnToPlacements":
                Response.Redirect("Placements.aspx");
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                User.ToString();
                //SP.Speak("Welcome to lead management");


                lblEnquiryAction.Text                 = "View Leads";
                pnlViewEnquiry.Visible                = true;
                pnlViewEnquiryProfile.Visible         = false;
                pnlEditEnquiryProfile.Visible         = false;
                pnlEnquiryStatusModifications.Visible = false;
                pnlAddEnquiry.Visible                 = false;

                BD.DataBindToDropDownList(ddlFilterOrganizationName, string.Format("SELECT OrganizationName,OrganizationId FROM EduSphere.Organizations WHERE OrganizationType='{0}'", "FRANCHISEE"));
                string EnquiryViewSelect;
                //if (User.IsInRole("L1"))
                //    EnquiryViewSelect = string.Format("SELECT TOP 100 *, po.OrganizationName as Principle,co.OrganizationName as Customer,vo.OrganizationName as Vendor FROM EduSphere.Enquiries Enquiry JOIN EduSphere.Organizations po ON Enquiry.FranchiseeID=po.OrganizationId JOIN EduSphere.Organizations co ON Enquiry.CustomerId=co.OrganizationId JOIN EduSphere.Organizations vo ON Enquiry.VendorId=vo.OrganizationId WHERE Enquiry.RaisedById='{0}' ORDER BY RaisedOn DESC", User.Identity.Name);
                //else
                EnquiryViewSelect = string.Format(@"SELECT TOP 1000 *, o.FullName as Owner,a.FullName as Assigned, (SELECT TOP 1 ModificationComments FROM EduSphere.EnquiryStatusModifications m WHERE m.EnquiryId=e.EnquiryId ORDER BY ModificationId DESC) AS Comments
                                                    FROM EduSphere.Enquiries e JOIN EduSphere.Organizations org ON e.FranchiseeID=org.OrganizationId 
                                                                                JOIN EduSphere.Staff o ON e.OwnerEmployeeId=o.EmployeeId
                                                                                JOIN EduSphere.Staff a ON e.AssignedEmployeeId=a.EmployeeId
                                                                                JOIN eduSphere.Programs p ON e.ProgramID=p.ProgramID 
                                                    ORDER BY RaisedOn DESC");
                BD.DataBindToGridView(gvEnquiry, EnquiryViewSelect, "NA");
                BD.DataBindToLabel(lblCountEnquiries, string.Format("SELECT COUNT(EnquiryId) FROM EduSphere.Enquiries WHERE EnquiryStatus='{0}'", "NEW"));
            }
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                User.ToString();
                //SP.Speak("Welcome to lead management");


                lblRoleRequestsAction.Text                 = "View Requests";
                pnlViewRoleRequests.Visible                = true;
                pnlViewRoleRequestsProfile.Visible         = false;
                pnlEditRoleRequestsProfile.Visible         = false;
                pnlRoleRequestsStatusModifications.Visible = false;
                pnlAddRoleRequests.Visible                 = false;

                BD.DataBindToDropDownList(ddlFilterOrganizationName, string.Format("SELECT OrganizationName,OrganizationId FROM EduSphere.Organizations WHERE OrganizationType='{0}'", "FRANCHISEE"));
                string queryRoleRequests;
                //Allow Manager to view the role request of her/his Organization only ONLY...shivmani 8th April 2020.
                if (User.IsInRole("Admin"))
                {
                    queryRoleRequests = string.Format(@"SELECT TOP 1000 * FROM EduSphere.RoleRequests r 
                                                                            JOIN EduSphere.States p ON r.RequesterState=p.StateID 
                                                                            JOIN EduSphere.Organizations o on r.OrganizationID=o.OrganizationID  ORDER BY RequestID DESC");
                }

                else
                {
                    queryRoleRequests = string.Format(@"SELECT TOP 1000 * FROM EduSphere.RoleRequests r
                                                                          JOIN EduSphere.States p ON r.RequesterState=p.StateID 
                                                                          JOIN EduSphere.Organizations o on r.OrganizationID=o.OrganizationID
                                                                          WHERE r.OrganizationID=(SELECT OrganizationID FROM EduSphere.Staff WHERE Email='{0}')  
                                                                          ORDER BY RequestID DESC", User.Identity.Name.ToString());
                }

                BD.DataBindToGridView(gvRoleRequests, queryRoleRequests, "NA");

                //Displya Count
                BD.DataBindToLabel(lblCountRequests, string.Format("SELECT COUNT(RequestID) FROM EduSphere.RoleRequests WHERE RequestApprovalStatus='{0}'", "NEW"));
                BD.DataBindToLabel(lblCountRequestsApproved, string.Format("SELECT COUNT(RequestID) FROM EduSphere.RoleRequests WHERE RequestApprovalStatus='{0}'", "APPROVED"));
            }
        }
Esempio n. 4
0
        //Manage Staff Panel Displays
        protected void ManageStaffVisibility(object sender, CommandEventArgs e)
        {
            string cmdName, strCmd = "";
            int    intEmployeeId;

            cmdName = e.CommandName.ToString();

            switch (cmdName)
            {
            case "AddStaff":
                lblStaffAction.Text            = "Add New Staff";
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = true;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = false;
                pnlViewStaffProfile.Visible    = false;
                pnlEditStaffProfile.Visible    = false;
                BD.DataBindToDropDownList(ddlOrgId, string.Format("SELECT OrganizationID,OrganizationName FROM EduSphere.Organizations"));
                BD.DataBindToDropDownList(ddlManagerId, string.Format("SELECT FUllName,EmployeeId FROM EduSphere.Staff"));
                break;

            case "UploadStaffDocument":
                lblStaffAction.Text            = "Upload Staff Document";
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = true;
                pnlViewStaffDocuments.Visible  = false;
                pnlEditStaffProfile.Visible    = false;
                pnlViewStaffProfile.Visible    = false;
                lblEmployeeId.Text             = e.CommandArgument.ToString();
                break;

            case "ViewStaffDocument":
                lblStaffAction.Text            = "View Staff Document";
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = true;
                pnlEditStaffProfile.Visible    = false;
                pnlViewStaffProfile.Visible    = false;
                intEmployeeId = Convert.ToInt32(e.CommandArgument.ToString());
                string docQuery = string.Format("SELECT * FROM EduSphere.StaffDocuments WHERE EmployeeId='{0}'", intEmployeeId);
                BD.DataBindToGridView(gvStaffDocuments, docQuery, "NA");
                break;

            case "SearchStaff":
            case "FilterStaff":
                lblStaffAction.Text            = "Search Staff";
                pnlViewStaff.Visible           = true;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = false;
                pnlViewStaffProfile.Visible    = false;
                pnlEditStaffProfile.Visible    = false;
                pnlAddStaff.Visible            = false;
                if (cmdName == "FilterStaff")
                {
                    string strEmploymentStatus = ddlFilterEmploymentStatus.SelectedValue.ToString();
                    strCmd = string.Format("SELECT OrganizationName,EmployeeId,FullName,st.PhoneOne,st.Email FROM EduSphere.Staff st JOIN EduSphere.Organizations org ON st.OrganizationID=org.OrganizationID WHERE EmploymentStatus='{0}' ORDER BY st.FullName ASC", strEmploymentStatus);
                }
                if (cmdName == "SearchStaff")
                {
                    string strSerachParam = txtBoxSearchStaff.Text;
                    strCmd = string.Format("SELECT OrganizationName,EmployeeId,FullName,PhoneOne,Email FROM EduSphere.Staff st JOIN EduSphere.Organizations org ON st.OrganizationID=org.OrganizationID WHERE FullName LIKE '%{0}%' OR EmployeeId LIKE '%{0}%' ORDER BY st.FullName ASC", strSerachParam);
                }
                BD.DataBindToDataList(dlStaff, strCmd);
                break;

            case "ViewProfile":
                lblStaffAction.Text            = "Staff Details";
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = false;
                pnlViewStaffProfile.Visible    = true;
                pnlEditStaffProfile.Visible    = false;
                pnlAddStaff.Visible            = false;
                if (cmdName == "ViewProfile")
                {
                    intEmployeeId = Convert.ToInt32(e.CommandArgument.ToString());
                    strCmd        = string.Format("SELECT *,(SELECT FullName FROM EduSphere.Staff WHERE EmployeeId=(SELECT ManagerID FROM EduSphere.Staff WHERE EmployeeId='{0}')) AS ManagerName FROM EduSphere.Staff WHERE EmployeeId='{0}'", intEmployeeId, "ManagerName");
                    BD.DataBindToDataList(dlStaffDetails, strCmd);
                }
                break;

            case "EditProfile":
                lblStaffAction.Text            = "Edit Staff Details";
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = false;
                pnlViewStaffProfile.Visible    = false;
                pnlEditStaffProfile.Visible    = true;
                pnlAddStaff.Visible            = false;
                BD.DataBindToDataList(dlEditStaffProfile, string.Format("SELECT * FROM EduSphere.Staff WHERE EmployeeId='{0}'", Convert.ToInt32(e.CommandArgument.ToString())));
                DropDownList ddlOrg     = new DropDownList();
                DropDownList ddlManager = new DropDownList();
                foreach (DataListItem li in dlEditStaffProfile.Items)
                {
                    ddlOrg     = (DropDownList)li.FindControl("ddlEditOrgId");
                    ddlManager = (DropDownList)li.FindControl("ddlEditManagerId");
                }
                BD.DataBindToDropDownList(ddlOrg, string.Format("SELECT OrganizationName, OrganizationID FROM EduSphere.Organizations"));
                BD.DataBindToDropDownList(ddlManager, string.Format("SELECT EmployeeId, FullName FROM EduSphere.Staff"));
                break;

            case "ReturnToViewStaff":
                Response.Redirect("Staff.aspx");
                break;

            default:
                break;
            }
        }
Esempio n. 5
0
        //Populate City,State.Country based on PinCode
        //protected void FillAddress(object sender, EventArgs e)
        //{
        //    txtBoxCity.Text = hdCity.Value;
        //    txtBoxState.Text = hdState.Value;
        //    txtBoxCountry.Text = hdCountry.Value;
        //}
        //Manage Staff Panel Displays
        protected void ManageStaffVisibility(object sender, CommandEventArgs e)
        {
            string cmdName, strCmd = "";
            int    intEmployeeId;

            cmdName = e.CommandName.ToString();

            switch (cmdName)
            {
            case "AddStaff":
                lblStaffAction.Text            = "Add New Staff";
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = true;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = false;
                pnlHelp.Visible              = false;
                pnlViewStaffProfile.Visible  = false;
                pnlEditStaffProfile.Visible  = false;
                pnlNeuroAcademics.Visible    = false;
                pnlNeuroPublications.Visible = false;
                BD.DataBindToDropDownList(ddlOrgId, string.Format("SELECT OrganizationID,OrganizationName FROM EduSphere.Organizations"));
                BD.DataBindToDropDownList(ddlManagerId, string.Format("SELECT FUllName,MemberID FROM EduSphere.Members"));
                break;

            case "UploadStaffDocument":
                lblStaffAction.Text            = "Upload Staff Document";
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = true;
                pnlViewStaffDocuments.Visible  = false;
                pnlHelp.Visible              = false;
                pnlEditStaffProfile.Visible  = false;
                pnlViewStaffProfile.Visible  = false;
                pnlNeuroAcademics.Visible    = false;
                pnlNeuroPublications.Visible = false;
                lblEmployeeId.Text           = e.CommandArgument.ToString();
                break;

            case "ViewStaffDocument":
                lblStaffAction.Text            = "View Document";
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = true;
                pnlHelp.Visible              = false;
                pnlEditStaffProfile.Visible  = false;
                pnlViewStaffProfile.Visible  = false;
                pnlNeuroAcademics.Visible    = false;
                pnlNeuroPublications.Visible = false;
                intEmployeeId = Convert.ToInt32(e.CommandArgument.ToString());
                string docQuery = string.Format("SELECT * FROM EduSphere.MemberDocuments WHERE MemberID='{0}'", intEmployeeId);
                BD.DataBindToGridView(gvStaffDocuments, docQuery, "NA");
                break;

            case "ViewHelp":
                lblStaffAction.Text            = "View Document";
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = false;
                pnlHelp.Visible              = true;
                pnlEditStaffProfile.Visible  = false;
                pnlViewStaffProfile.Visible  = false;
                pnlNeuroAcademics.Visible    = false;
                pnlNeuroPublications.Visible = false;
                //intEmployeeId = Convert.ToInt32(e.CommandArgument.ToString());
                string helpQuery = string.Format("SELECT * FROM EduSphere.HelpDocuments");
                BD.DataBindToGridView(gvHelpDocuments, helpQuery, "NA");
                break;

            case "AcademicDetails":
                string acadQuery = string.Format("SELECT * FROM EduSphere.MemberAcademics where MemberID='{0}'", Convert.ToInt32(e.CommandArgument.ToString()));
                BD.DataBindToDataList(dlAcademicDetails, acadQuery);
                lblEID.Text                    = e.CommandArgument.ToString();
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = false;
                pnlHelp.Visible                = false;
                pnlEditStaffProfile.Visible    = false;
                pnlViewStaffProfile.Visible    = false;
                pnlNeuroAcademics.Visible      = true;

                break;

            case "PublicationDetails":
                string pubQuery = string.Format("SELECT * FROM EduSphere.Publications WHERE MemberID='{0}'", Convert.ToInt32(e.CommandArgument.ToString()));
                BD.DataBindToDataList(dlNeuroPublications, pubQuery);
                lblPubEID.Text                 = e.CommandArgument.ToString();
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = false;
                pnlHelp.Visible                = false;
                pnlEditStaffProfile.Visible    = false;
                pnlViewStaffProfile.Visible    = false;
                pnlNeuroAcademics.Visible      = false;
                pnlNeuroPublications.Visible   = true;
                pnlNeuroAcademics.Visible      = false;
                pnlNeuroPublications.Visible   = true;
                break;

            case "SearchStaff":
            case "FilterStaff":
                lblStaffAction.Text            = "Search Staff";
                pnlViewStaff.Visible           = true;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = false;
                pnlHelp.Visible              = false;
                pnlViewStaffProfile.Visible  = false;
                pnlEditStaffProfile.Visible  = false;
                pnlAddStaff.Visible          = false;
                pnlNeuroAcademics.Visible    = false;
                pnlNeuroPublications.Visible = false;
                if (cmdName == "FilterStaff")
                {
                    string strEmploymentStatus = ddlFilterEmploymentStatus.SelectedValue.ToString();
                    //Membership will be visible if its in ACTIVE Status, set by ADMIN
                    //string strEmploymentStatus = "ACTIVE";
                    //strCmd = string.Format(@"SELECT OrganizationName,MemberID,FullName,st.PhoneOne,st.Email
                    //                          FROM EduSphere.Members st
                    //                          JOIN EduSphere.Organizations org ON st.OrganizationID=org.OrganizationID
                    //                          WHERE MembershipStatus='{0}' AND st.Email='{1}' ORDER BY st.FullName ASC", strEmploymentStatus,User.Identity.Name.ToString());
                    strCmd = string.Format(@"SELECT OrganizationName,MemberID,FullName,st.PhoneOne,st.Email,st.MembershipStatus 
                                                 FROM EduSphere.Members st 
                                                 JOIN EduSphere.Organizations org ON st.OrganizationID=org.OrganizationID 
                                                 WHERE MembershipStatus='{0}' AND st.Email='{1}' ORDER BY st.FullName ASC", strEmploymentStatus, User.Identity.Name.ToString());
                }
                if (cmdName == "SearchStaff")
                {
                    string strSerachParam = txtBoxSearchStaff.Text;
                    //strCmd = string.Format("SELECT OrganizationName,MemberID,FullName,PhoneOne,Email FROM EduSphere.Members st JOIN EduSphere.Organizations org ON st.OrganizationID=org.OrganizationID WHERE FullName LIKE '%{0}%' OR MemberID LIKE '%{0}%' ORDER BY st.FullName ASC", strSerachParam);
                }
                BD.DataBindToDataList(dlStaff, strCmd);
                break;

            case "ViewProfile":
                lblStaffAction.Text            = "Staff Details";
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = false;
                pnlViewStaffDocuments.Visible  = true;      //display document alongwith profile
                pnlHelp.Visible              = false;
                pnlViewStaffProfile.Visible  = true;        //display profile details
                pnlEditStaffProfile.Visible  = false;
                pnlAddStaff.Visible          = false;
                pnlNeuroAcademics.Visible    = false;
                pnlNeuroPublications.Visible = false;
                if (cmdName == "ViewProfile")
                {
                    intEmployeeId = Convert.ToInt32(e.CommandArgument.ToString());
                    strCmd        = string.Format(@"SELECT *,(SELECT FullName FROM EduSphere.Members WHERE MemberID=(SELECT MentorID FROM EduSphere.Members WHERE MemberID='{0}')) AS MentorName 
                                                 FROM EduSphere.Members n
                                                 JOIN EduSphere.Programs p ON n.ProgramID=p.ProgramID
                                                 JOIN EduSphere.Organizations edu ON n.OrganizationID=edu.OrganizationID
                                                 WHERE n.MemberID='{0}' AND n.Email='{1}'", intEmployeeId, User.Identity.Name.ToString());
                    BD.DataBindToDataList(dlStaffDetails, strCmd);
                    BD.DataBindToGridView(gvPostalAddresses, string.Format("Select * FROM EduSphere.PostalAddresses WHERE MemberID={0}", intEmployeeId), "NA");
                    //Display Documents too
                    string docQ = string.Format("SELECT * FROM EduSphere.MemberDocuments WHERE MemberID='{0}'", intEmployeeId);
                    BD.DataBindToGridView(gvStaffDocuments, docQ, "NA");

                    //Display Academics
                    string acadQ = string.Format("SELECT * FROM EduSphere.MemberAcademics where MemberID='{0}'", Convert.ToInt32(e.CommandArgument.ToString()));
                    BD.DataBindToGridView(gvViewAcademics, acadQ, "NA");
                    lblEID.Text = e.CommandArgument.ToString();
                }
                break;

            case "EditProfile":
                lblStaffAction.Text            = "Edit Profile";
                lblNeutherapistID.Text         = e.CommandArgument.ToString();
                pnlViewStaff.Visible           = false;
                pnlAddStaff.Visible            = false;
                pnlUploadStaffDocument.Visible = false;
                pnlHelp.Visible = false;
                pnlViewStaffDocuments.Visible = false;
                pnlViewStaffProfile.Visible   = false;
                pnlEditStaffProfile.Visible   = true;
                pnlAddStaff.Visible           = false;
                pnlNeuroAcademics.Visible     = false;
                pnlNeuroPublications.Visible  = false;
                BD.DataBindToDataList(dlEditStaffProfile, string.Format(@"SELECT * FROM EduSphere.Members n 
                                                                                       JOIN EduSphere.Programs p ON n.ProgramID=p.ProgramID
                                                                                       JOIN EduSphere.Organizations o ON n.OrganizationID=o.OrganizationID 
                                                                                       WHERE n.MemberID='{0}'", Convert.ToInt32(e.CommandArgument.ToString())));
                DropDownList ddlOrg         = new DropDownList();
                DropDownList ddlEditProgram = new DropDownList();
                DropDownList ddlManager     = new DropDownList();
                foreach (DataListItem li in dlEditStaffProfile.Items)
                {
                    ddlOrg         = (DropDownList)li.FindControl("ddlEditOrgId");
                    ddlEditProgram = (DropDownList)li.FindControl("ddlEditProgram");
                    ddlManager     = (DropDownList)li.FindControl("ddlEditManagerId");
                }
                BD.DataBindToDropDownList(ddlOrg, string.Format("SELECT OrganizationName, OrganizationID FROM EduSphere.Organizations"));
                BD.DataBindToDropDownList(ddlEditProgram, string.Format("SELECT ProgramTitle, ProgramID FROM EduSphere.Programs"));
                BD.DataBindToDropDownList(ddlManager, string.Format("SELECT MemberID, FullName FROM EduSphere.Members"));
                break;

            case "ViewEnrolmentCertificate":
                //PG.EnrolmentCertificate(102);
                string strTemplate = "~/Artifacts/Members/MembershipTemplate.pdf";
                int    intMemberID = Convert.ToInt32(e.CommandArgument.ToString());
                PG.GeneratePdfFromPdfTemplate(strTemplate, intMemberID);
                break;

            case "TopnlProfileEditFrompnlUploadStaffDocument":
                pnlUploadStaffDocument.Visible = false;
                pnlEditStaffProfile.Visible    = true;
                break;

            case "TopnlProfileEditFrompnlNeuroAcademics":
                pnlNeuroAcademics.Visible   = false;
                pnlEditStaffProfile.Visible = true;
                break;

            case "ReturnToViewStaff":
                Response.Redirect("Admission.aspx");
                break;

            default:
                break;
            }
        }
Esempio n. 6
0
        public void ManageDashboardPanels(object sender, CommandEventArgs e)
        {
            string strCmd;

            strCmd = e.CommandName.ToString();
            switch (strCmd)
            {
            case "pnlServicesDashboard":
                pnlServicesDashboard.Visible          = true;
                pnlIndicatorsDashboard.Visible        = false;
                pnlAttendanceDashboard.Visible        = false;
                pnlStudentAttendanceDashboard.Visible = false;
                pnlStudentAcademicsDashboard.Visible  = false;
                pnlCustomerDashoard.Visible           = false;
                pnlExpensesDashboard.Visible          = false;
                lblDashboardAction.Text = "Service Revenue";
                SetSalonVisibility(ddlSalon, ddlConsultant);
                break;

            case "pnlIndicatorsDashboard":
                pnlServicesDashboard.Visible          = false;
                pnlIndicatorsDashboard.Visible        = true;
                pnlAttendanceDashboard.Visible        = false;
                pnlStudentAttendanceDashboard.Visible = false;
                pnlStudentAcademicsDashboard.Visible  = false;
                pnlCustomerDashoard.Visible           = false;
                pnlExpensesDashboard.Visible          = false;
                string   cmdArgument       = e.CommandArgument.ToString();
                DateTime dtIndicatorDate   = DateTime.Now.Date;
                int      intOrganizationID = 101;
                if (cmdArgument == "today")
                {
                    dtIndicatorDate          = DateTime.Now.Date;
                    txtBoxIndicatorDate.Text = "dd/MM/yyyy";
                    BD.DataBindToDropDownList(ddlSalonSite, string.Format("SELECT OrganizationID,OrganizationName FROM EduSphere.Organizations"));
                }

                if (cmdArgument == "specificDate")
                {
                    dtIndicatorDate   = DateTime.ParseExact(txtBoxIndicatorDate.Text.ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture);
                    intOrganizationID = Convert.ToInt32(ddlSalonSite.SelectedValue.ToString());
                }
                List <int> list = ShowIndicatorsDashboard(dtIndicatorDate, intOrganizationID);
                lblTodaysServiceBills.Text     = list[0].ToString();
                lblTodaysExpenseBills.Text     = list[1].ToString();
                lblTodaysServiceReceipts.Text  = list[2].ToString();
                lblMonthlyServiceBills.Text    = list[3].ToString();
                lblMonthlyExpenseBills.Text    = list[4].ToString();
                lblMonthlyServiceReceipts.Text = list[5].ToString();

                //SetSalonVisibility(strRole, User.Identity.Name, ddlStoreLocation, ddlSeller);
                //Payment Modes
                string strDayServicePaymentMode = string.Format(@"SELECT SUM(CreditAmount) AS ReceivedAmount, PaymentMode AS ModeOfReceipt 
                                                                FROM EduSphere.MemberAccount  
                                                                WHERE CAST(TxDate AS DATE)=CAST('{1}' AS DATE) AND TxLocation='{2}'   
                                                                GROUP BY PaymentMode 
                                                                ORDER BY PaymentMode DESC", " ", dtIndicatorDate.ToString("MM/dd/yyyy"), intOrganizationID);
                BD.DataBindToGridView(gvServicePaymentMode, strDayServicePaymentMode, "NA");


                //Dispaly staff Level Day Indicators for service & Product
                string strDayServiceIndicatorCmd = string.Format(@"SELECT SUM(DebitAmount) AS BillAmount,a.ConsultantOneID AS EmployeeID,e.FullName  AS Name 
                                                                FROM EduSphere.MemberAccount a  JOIN EduSphere.Staff e ON a.ConsultantOneID=e.EmployeeID 
                                                                WHERE CAST(a.TxDate AS DATE)=CAST('{1}' AS DATE) AND TxLocation='{2}'  
                                                                GROUP BY a.ConsultantOneID,e.FullName 
                                                                ORDER BY SUM(DebitAmount) DESC", " ", dtIndicatorDate.ToString("MM/dd/yyyy"), intOrganizationID);
                BD.DataBindToGridView(gvStaffDayServiceIndicators, strDayServiceIndicatorCmd, "NA");



                //Display staff Level Month Indicators for service & products
                string strMonthServiceIndicatorCmd = string.Format(@"SELECT SUM(DebitAmount) AS BillAmount, a.ConsultantOneID AS EmployeeID,year(a.TxDate),month(a.TxDate), e.FullName AS Name 
                                                                  FROM EduSphere.MemberAccount a JOIN EduSphere.Staff e ON a.ConsultantOneID=e.EmployeeID
                                                                  WHERE month(a.TxDate)=month('{1}') AND TxLocation='{2}'  
                                                                  GROUP BY a.ConsultantOneID,e.FullName,year(a.TxDate),month(a.TxDate) 
                                                                  ORDER BY SUM(DebitAmount) DESC", " ", dtIndicatorDate.ToString("MM/dd/yyyy"), intOrganizationID);
                BD.DataBindToGridView(gvStaffMonthServiceIndicators, strMonthServiceIndicatorCmd, "NA");



                break;

            case "pnlAttendanceDashboard":
                lblDashboardAction.Text               = "Staff Attendance";
                pnlServicesDashboard.Visible          = false;
                pnlIndicatorsDashboard.Visible        = false;
                pnlAttendanceDashboard.Visible        = true;
                pnlStudentAttendanceDashboard.Visible = false;
                pnlStudentAcademicsDashboard.Visible  = false;
                pnlCustomerDashoard.Visible           = false;
                pnlExpensesDashboard.Visible          = false;

                BD.DataBindToDropDownList(ddlStaff, string.Format("SELECT FullName,EmployeeID FROM EduSphere.Staff WHERE EmploymentStatus='{0}'", "ACTIVE"));
                lblDate.Text = DateTime.Today.ToString("yyyy-MMM");
                //hide staff attendace details grid while displying all staff attendance summary
                gvStaffAttendanceDetails.Visible = false;
                string strCmdMonthAttendance = string.Format("SELECT  s.FullName AS Name, SUM(DaysPresentFor) AS Number FROM EduSphere.StaffAttendance a JOIN EduSphere.Staff s ON a.EmployeeID=s.EmployeeID WHERE DATEPART(MM,AttendanceDate)=DATEPART(MM,GETDATE()) AND DATEPART(YYYY,AttendanceDate)=DATEPART(YYYY,GETDATE()) GROUP BY s.FullName ORDER BY s.FullName");
                BD.DataBindToGridView(gvAttendanceDashboard, strCmdMonthAttendance, "NA");
                //Day Count
                //string strMonthAttendance = string.Format("SELECT  s.FullName, DaysPresentFor, AttendanceDate, Remarks FROM EduSphere.StaffAttendance a JOIN EduSphere.Staff s ON a.EmployeeID=s.EmployeeID WHERE DATEPART(MM,AttendanceDate)=DATEPART(MM,GETDATE()) AND DATEPART(YYYY,AttendanceDate)=DATEPART(YYYY,GETDATE())  ORDER BY s.FullName, AttendanceDate ASC");
                //BD.DataBindToGridView(gvMonthAttendance, strMonthAttendance, "NA");
                //PIVOT Table
                GenerateMonthlyAttendaceReportPvt(DateTime.Today.ToString("MM/dd/yyyy"));
                break;

            case "pnlStudentAttendanceDashboard":
                lblDashboardAction.Text               = "Student Attendance";
                pnlServicesDashboard.Visible          = false;
                pnlIndicatorsDashboard.Visible        = false;
                pnlAttendanceDashboard.Visible        = false;
                pnlStudentAttendanceDashboard.Visible = true;
                pnlStudentAcademicsDashboard.Visible  = false;
                pnlCustomerDashoard.Visible           = false;
                pnlExpensesDashboard.Visible          = false;

                BD.DataBindToDropDownList(ddlAttendanceBatchFilter, string.Format("SELECT BatchCode,BatchID FROM EduSphere.ProgramBatch"));

                lblDate.Text = DateTime.Today.ToString("yyyy-MMM");

                //PIVOT Table
                GenerateBatchAttendanceReportPvt(101);    //testing
                break;

            case "pnlStudentAcademicsDashboard":
                lblDashboardAction.Text               = "Student Academics";
                pnlServicesDashboard.Visible          = false;
                pnlIndicatorsDashboard.Visible        = false;
                pnlAttendanceDashboard.Visible        = false;
                pnlStudentAttendanceDashboard.Visible = false;
                pnlStudentAcademicsDashboard.Visible  = true;
                pnlCustomerDashoard.Visible           = false;
                pnlExpensesDashboard.Visible          = false;

                BD.DataBindToDropDownList(ddlAcademicsBatchFilter, string.Format("SELECT BatchCode,BatchID FROM EduSphere.ProgramBatch"));


                //PIVOT Table
                GenerateBatchAcademicsReportPvt(101);    //testing
                break;

            case "pnlCustomerDashboard":
                lblDashboardAction.Text               = "Student Outstandings";
                pnlServicesDashboard.Visible          = false;
                pnlIndicatorsDashboard.Visible        = false;
                pnlAttendanceDashboard.Visible        = false;
                pnlStudentAttendanceDashboard.Visible = false;
                pnlStudentAcademicsDashboard.Visible  = false;
                pnlCustomerDashoard.Visible           = true;
                pnlExpensesDashboard.Visible          = false;

                BD.DataBindToDropDownList(ddlLocation, string.Format("SELECT OrganizationName,OrganizationID FROM EduSphere.Organizations WHERE OrganizationID>={0} AND OrganizationType='{1}'", 100, "EDUCATION-CENTRE"));
                break;

            case "pnlExpensesDashboard":
                lblDashboardAction.Text               = "Expenses";
                pnlServicesDashboard.Visible          = false;
                pnlIndicatorsDashboard.Visible        = false;
                pnlAttendanceDashboard.Visible        = false;
                pnlStudentAttendanceDashboard.Visible = false;
                pnlStudentAcademicsDashboard.Visible  = false;
                pnlCustomerDashoard.Visible           = false;
                pnlExpensesDashboard.Visible          = true;
                //string spender = string.Format("SELECT FullName+'{0}'+Gender as FullName,EmployeeID  FROM EduSphere.Staff", " ");
                //BD.DataBindToDropDownList(ddlSpender, spender);
                //Make all stores visible only to admin. The manager can see only his/her store
                SetSalonVisibility(ddlSite, ddlSpender);
                break;

            case "FromPnlServicesRevenueToNoPanel":
                pnlServicesDashboard.Visible          = false;
                pnlIndicatorsDashboard.Visible        = false;
                pnlAttendanceDashboard.Visible        = false;
                pnlStudentAttendanceDashboard.Visible = false;
                pnlStudentAcademicsDashboard.Visible  = false;
                pnlCustomerDashoard.Visible           = false;
                pnlExpensesDashboard.Visible          = false;
                break;

            default:
                break;
            }
        }