public List <ReportDataModel> FetchAttendanceData(int churchId, DateTime startDate, DateTime endDate, List <int> mnList, List <int> gtList)
        {
            CustomerCommand command = _dataManager.CreateCustomerCommand("Dashboard.FetchAttendanceData");

            command.SetParameterValue("@ChurchId", churchId);
            command.SetParameterValue("@StartDate", startDate);
            command.SetParameterValue("@EndDate", endDate);

            string whereStr_mn = "AND widgetItem.[UserWidgetItemID] IN (-999)";
            string whereStr_gt = "AND widgetItem.[UserWidgetItemID] IN (-999)";

            if (mnList != null && mnList.Count > 0)
            {
                whereStr_mn = string.Format("AND widgetItem.[UserWidgetItemID] IN ({0})", string.Join <int>(",", mnList));
            }
            if (mnList != null && mnList.Count > 0)
            {
                whereStr_gt = string.Format("AND widgetItem.[UserWidgetItemID] IN ({0})", string.Join <int>(",", gtList));
            }

            command.CommandText = command.CommandText.Replace("#WhereStr_mn#", whereStr_mn);
            command.CommandText = command.CommandText.Replace("#WhereStr_gt#", whereStr_gt);

            return(command.ExecuteCommandToEntitys <ReportDataModel>());
        }
        public List <ReportDataModel> FetchAttributeData(int churchId, DateTime startDate, DateTime endDate, List <int> widgetItemIds)
        {
            CustomerCommand command = _dataManager.CreateCustomerCommand("Dashboard.FetchAttributeData");

            command.SetParameterValue("@ChurchId", churchId);
            command.SetParameterValue("@StartDate", startDate);
            command.SetParameterValue("@EndDate", endDate);

            string whereStr = "AND widgetItem.[UserWidgetItemID] IN (-999)";

            if (widgetItemIds != null && widgetItemIds.Count > 0)
            {
                whereStr = string.Format("AND widgetItem.[UserWidgetItemID] IN ({0})", string.Join <int>(",", widgetItemIds));
            }
            command.CommandText = command.CommandText.Replace("#WhereStr#", whereStr);

            return(command.ExecuteCommandToEntitys <ReportDataModel>());
        }
Exemple #3
0
        public ChurchModel FetchChurchInfomation(int churchId)
        {
            CustomerCommand command = _dataManager.CreateCustomerCommand("Church.FetchChurchInfomation");

            command.SetParameterValue("@ChurchId", churchId);

            ChurchModel church = command.ExecuteCommandToEntity <ChurchModel>();

            return(church);
        }