Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int  userId   = 0;
            bool FirmedUp = false;
            if (Request.QueryString["userId"] != null)
            {
                int.TryParse(Request.QueryString["userId"], out userId);
            }
            if (Request.QueryString["FirmUpStatus"] != null)
            {
                if (!Request.QueryString["FirmUpStatus"].Contains("Not"))
                {
                    FirmedUp = true;
                }
            }
            ReportViewerUserControl1.ReportHeight = 580;
            ReportViewerUserControl1.ReportWidth  = 800;

            try
            {
                // Get the common web service instance.
                ServiceAccess           serviceLoader     = ServiceAccess.GetInstance();
                FarmService.FarmService farmService       = serviceLoader.GetFarm();
                FarmService.FirmUpStatusReportInfo[] data = farmService.GetFirmUpStatusSummaryDetails(userId, FirmedUp);
                ReportViewerUserControl1.DataSource     = data;
                ReportViewerUserControl1.DataSourceName = "FirmUpStatusReportInfo";
                ReportViewerUserControl1.ReportPath     = "Members/Reports/FirmUpStatusReport.rdlc";
            }
            catch (Exception exception)
            {
                log.Error("UNKNOWN ERROR WHILE LOADING FARM PLOT REPORT:", exception);
            }
        }
    }