Пример #1
0
        public override DataTable GetExportDataSet()
        {
            DataSet dataset = null;
            string  FromDate;
            string  Todate;
            int     RecorderBy        = BaseCommonFunctions.ApplicationInfo.LoggedInUser.LoggedinUserId;
            int     pageNumber        = 0;
            int     pageSize          = 0;
            string  sortExpression    = "";
            int     StaffId           = 0;
            int     ProgramId         = 0;
            int     FormId            = 0;
            int     LOI               = 0;
            int     IncidentCategory  = -1;
            int     SecondaryCategory = 0;
            int     Status            = 0;
            int     ClientId          = -1;
            string  IndividualName    = string.Empty;
            int     ResidentialUnit   = 0;

            pageNumber     = ParentPageListObject.CurrentPage;
            pageSize       = ParentPageListObject.PageSize == 0 ? 1 : ParentPageListObject.PageSize;
            sortExpression = ParentPageListObject.SortExpression;
            char Recorder      = GetSignedByRecorder();
            char Nursing       = GetSignedByNursing();
            char Supervisior   = GetSignedBySupervisior();
            char Administrator = GetSignedByAdministrator();
            char FromDashboard = 'N';

            if (!String.IsNullOrEmpty(GetFilterValue("FromDashboard")))
            {
                FromDashboard = GetFilterValue("FromDashboard") == "Y" ? 'Y' : 'N';
            }

            if (sortExpression.Trim() == "" || sortExpression.Trim() == null || sortExpression == string.Empty)
            {
                sortExpression = "";
            }
            LOI = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "GeneralLocationOfIncident", ParentPageObject.PageFiltersXML);
            IncidentCategory  = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "GeneralIncidentCategory", ParentPageObject.PageFiltersXML);
            SecondaryCategory = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "GeneralSecondaryCategory", ParentPageObject.PageFiltersXML);
            StaffId           = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "Staff", ParentPageObject.PageFiltersXML);
            FromDate          = BaseCommonFunctions.GetSelectedValueFromXML <string>("/PageFilters/", "StartDate", ParentPageObject.PageFiltersXML);
            Todate            = BaseCommonFunctions.GetSelectedValueFromXML <string>("/PageFilters/", "EndDate", ParentPageObject.PageFiltersXML);
            IndividualName    = BaseCommonFunctions.GetSelectedValueFromXML <string>("/PageFilters/", "Individual", ParentPageObject.PageFiltersXML);
            RecorderBy        = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "Staff", ParentPageObject.PageFiltersXML);
            Status            = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "Status", ParentPageObject.PageFiltersXML);
            ProgramId         = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "ProgramId", ParentPageObject.PageFiltersXML);
            FormId            = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "Forms", ParentPageObject.PageFiltersXML);
            ResidentialUnit   = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "ResidentialUnit", ParentPageObject.PageFiltersXML);
            dataset           = GetIncidentRestrictive(pageNumber, pageSize, ClientId, sortExpression, FromDate, Todate, ProgramId, FormId, LOI, IncidentCategory, SecondaryCategory, IndividualName, RecorderBy,
                                                       Status, Recorder, Nursing, Supervisior, Administrator, FromDashboard, ResidentialUnit);


            return(dataset.Tables["IncidentRestrictive"]);
        }
Пример #2
0
    public override DataTable GetExportDataSet()
    {
        using (SHS.UserBusinessServices.ListPages listPagesObj = new SHS.UserBusinessServices.ListPages())
        {
            int    instanceId     = 0;
            int    pageNumber     = ParentPageListObject.CurrentPage;
            int    pageSize       = ParentPageListObject.PageSize == 0 ? 1 : ParentPageListObject.PageSize;
            string sortExpression = ParentPageListObject.SortExpression;

            DataSet dataSet = null;
            // Begin custom code
            int    recordedByStaffId = -1;
            int    assignedToStaffId = 0;
            string memberLastName    = "";
            string memberFirstName   = "";
            int    otherFilter       = 0;
            int    dispositions      = 0;
            int    inquiryStatus     = 0;
            source = "GetExportDataSet";
            DateTime InquiriesFrom;
            DateTime InquiriesTo;


            recordedByStaffId = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "RecordedByStaffId", ParentPageObject.PageFiltersXML);
            assignedToStaffId = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "AssignedToStaffId", ParentPageObject.PageFiltersXML);
            dispositions      = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "Dispositions", ParentPageObject.PageFiltersXML);
            inquiryStatus     = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "InquiryStatus", ParentPageObject.PageFiltersXML);
            InquiriesFrom     = BaseCommonFunctions.GetSelectedValueFromXML <DateTime>("/PageFilters/", "InquiriesFrom", ParentPageObject.PageFiltersXML);
            InquiriesTo       = BaseCommonFunctions.GetSelectedValueFromXML <DateTime>("/PageFilters/", "InquiriesTo", ParentPageObject.PageFiltersXML);
            otherFilter       = BaseCommonFunctions.GetSelectedValueFromXML <int>("/PageFilters/", "CustomFilter", ParentPageObject.PageFiltersXML);
            memberLastName    = BaseCommonFunctions.GetSelectedValueFromXML <string>("/PageFilters/", "MemberLatName", ParentPageObject.PageFiltersXML);
            memberFirstName   = BaseCommonFunctions.GetSelectedValueFromXML <string>("/PageFilters/", "MemberFirstName", ParentPageObject.PageFiltersXML);

            dataSet = GetInquriesList(instanceId, pageNumber, pageSize, sortExpression, recordedByStaffId, assignedToStaffId, InquiriesFrom, InquiriesTo, memberLastName, memberFirstName, dispositions, inquiryStatus, otherFilter);
            dataSet.Tables["CustomInquiries"].Columns.Remove("RowNumber");
            dataSet.Tables["CustomInquiries"].Columns.Remove("InquiryId");

            dataSet.Tables["CustomInquiries"].Columns["MemberName"].ColumnName      = "Client (Potential)";
            dataSet.Tables["CustomInquiries"].Columns["MemberId"].ColumnName        = "Client Id";
            dataSet.Tables["CustomInquiries"].Columns["InquirerName"].ColumnName    = "Inquirer";
            dataSet.Tables["CustomInquiries"].Columns["InQuiryDateTime"].ColumnName = "Date/Time";
            dataSet.Tables["CustomInquiries"].Columns["RecordedByName"].ColumnName  = "Recorded By";
            dataSet.Tables["CustomInquiries"].Columns["AssignedToName"].ColumnName  = "Assigned To";

            return(dataSet.Tables["CustomInquiries"]);
        }
    }