コード例 #1
0
        private List <AdditionDeletionGridViewHolder> GetGridData()
        {
            var repParams = new ReportsParameters();


            DynamicParameters.SelectedParameters.AddOrUpdateInDictionary(ParameterNames.FromDate, DynamicParameters.SimpleDateSelected);
            repParams.SetParametersFromDictionary(AddDelInformation.SelectedParameters);

            EnumAdditionDeletion additionOrDeletion;
            var succeeded = Enum.TryParse(ddlAddDelSelection.SelectedValue, out additionOrDeletion);

            if (succeeded == false || string.IsNullOrEmpty(repParams.Country))
            {
                rptAddDel.DataSource = null;
                rptAddDel.DataBind();
                return(null);
            }
            if (repParams.GroupId == null && string.IsNullOrEmpty(repParams.Branch))
            {
                return(null);
            }


            var gridData = _addDelBl.GetAdditionDeletionGridViewHolders(repParams, additionOrDeletion);

            return(gridData);
        }
コード例 #2
0
        private List <BufferGridViewHolder> GetBufferGridData()
        {
            var repParams = new ReportsParameters();

            DynamicParameters.SelectedParameters.AddOrUpdateInDictionary(ParameterNames.FromDate, DynamicParameters.SimpleDateSelected);
            repParams.SetParametersFromDictionary(BufferInformation.SelectedParameters);

            if (string.IsNullOrEmpty(repParams.Country))
            {
                rptBuffers.DataSource = null;
                rptBuffers.DataBind();
                return(null);
            }

            var gridData = _bufferBl.GetBufferGridViewHolders(repParams);

            return(gridData);
        }