예제 #1
0
 internal MailChimp(
     IAutomations automations, 
     ICampaigns campaigns, 
     IConversations conversations, 
     IEcomm ecomm, 
     IFolders folders, 
     IGallery gallery, 
     IGoal goal, 
     IHelper helper, 
     ILists lists, 
     IReports reports, 
     ITemplates templates, 
     IUsers users, 
     IVip vip)
 {
     Automations = automations;
     Campaigns = campaigns;
     Conversations = conversations;
     Ecomm = ecomm;
     Folders = folders;
     Gallery = gallery;
     Goal = goal;
     Helper = helper;
     Lists = lists;
     Reports = reports;
     Templates = templates;
     Users = users;
     Vip = vip;
 }
        public CollectionBatchReports(int BatchId, Window window)
        {
            InitializeComponent();
            this._BatchID = BatchId;
            _Parent = window;
            IsCommonCDO = false;
            objReports = ReportsBusinessObject.CreateInstance();
            

        }
예제 #3
0
        protected void Init_Form()
        {
            BindFunctions BindManager = new BindFunctions();
            DataTable     Month       = BindManager.GetMonths();

            BindManager.BindCombo(ddMonth, Month, "Name", "Id");
            IReports ReportDetails = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports,BusinessProcess.Reports");
            DataSet  repquarter    = (DataSet)ReportDetails.GetReportQuarter();

            BindManager.BindCombo(ddQuarter, repquarter.Tables[0], "QTR_Desc", "Qtr_pk");
        }
예제 #4
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (txtDateOrderedFrom.Value == "")
            {
                MsgBuilder theMsg = new MsgBuilder();
                theMsg.DataElements["Control"] = "Date Ordered From";
                IQCareMsgBox.Show("BlankTextBox", theMsg, this);
                return;
            }
            if (txtDateOrderedTo.Value == "")
            {
                MsgBuilder theMsg = new MsgBuilder();
                theMsg.DataElements["Control"] = "Date Ordered To";
                IQCareMsgBox.Show("BlankTextBox", theMsg, this);
                return;
            }



            DateTime theDateOrderedFrom = Convert.ToDateTime("01-" + txtDateOrderedFrom.Value);
            DateTime theDateOrderedTo   = Convert.ToDateTime("01-" + txtDateOrderedTo.Value);

            if (theDateOrderedFrom > theDateOrderedTo)
            {
                IQCareMsgBox.Show("StartEndDate", this);
                txtDateOrderedTo.Focus();
                return;
            }
            if (theDateOrderedFrom > Convert.ToDateTime(Application["AppCurrentDate"]))
            {
                IQCareMsgBox.Show("OrderedFromDate", this);
                txtDateOrderedTo.Focus();
                return;
            }

            if (theDateOrderedTo > Convert.ToDateTime(Application["AppCurrentDate"]))
            {
                IQCareMsgBox.Show("OrderedToDate", this);
                txtDateOrderedTo.Focus();
                return;
            }
            IReports  ReportDetails           = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports,BusinessProcess.Reports");
            DataTable dtMonthlyNACAReportData = ReportDetails.GetMonthlyNACAReportData(theDateOrderedFrom, theDateOrderedTo, Convert.ToInt32(Session["AppLocationId"]));

            dtMonthlyNACAReportData.WriteXmlSchema(Server.MapPath("..\\XMLFiles\\Nigeria-Monthly NACA Report (IQCare data).xml"));
            ReportDetails = null;
            Session["dtMonthlyNACAReportData"] = dtMonthlyNACAReportData;
            string theReportName = "Nigeria-Monthly NACA Report (IQCare data)";
            string theUrl        = string.Format("{0}ReportName={1}&StartDate={2}&EndDate={3}", "frmReportViewerARV.aspx?", theReportName, theDateOrderedFrom, theDateOrderedTo);

            Response.Redirect(theUrl);
            //IQWebUtils theUtl = new IQWebUtils();
            //theUtl.ExporttoExcel(dtMonthlyNACAReportData, Response);
        }
 public CollectionBatchReports(int BatchId, Window window, string ExchangeConnectionString, string TicketingConnectionString,string SiteName )
 {
     InitializeComponent();
     this._BatchID = BatchId;
     _Parent = window;
     _ExchangeConnectionString = ExchangeConnectionString;
     _TicketingConnectionString=TicketingConnectionString;
     _SiteName = SiteName;
     IsCommonCDO = true;
     objReports = ReportsBusinessObject.CreateInstance(ExchangeConnectionString, TicketingConnectionString);
 }
    protected void hlLosttoFollowUp_Click(object sender, EventArgs e)
    {
        IReports   ReportDetails = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");
        DataTable  dtLosttoFollowupPatientReport = (DataTable)ReportDetails.GetLosttoFollowupPatientReport(Convert.ToInt32(Session["AppLocationId"])).Tables[0];
        string     FName           = "LstFollowup";
        IQWebUtils theUtils        = new IQWebUtils();
        string     thePath         = Server.MapPath(".\\ExcelFiles\\" + FName + ".xls");
        string     theTemplatePath = Server.MapPath(".\\ExcelFiles\\IQCareTemplate.xls");

        theUtils.ExporttoExcel(dtLosttoFollowupPatientReport, Response);
        Response.Redirect(".\\ExcelFiles\\" + FName + ".xls");
    }
예제 #7
0
        private void GetDueForCareEnded()
        {
            IReports ReportDetails = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");

            System.Data.DataSet dsARTUnknown = ReportDetails.GetPtnotvisitedrecentlyUnknown(Convert.ToDateTime(Application["AppCurrentDate"]), Convert.ToDateTime(Application["AppCurrentDate"]), Convert.ToInt32(rcbFacility.SelectedValue));
            DataTable           dtDueFCE     = dsARTUnknown.Tables[0];

            dtDueFCE.DefaultView.Sort = dtDueFCE.Columns[1].ColumnName + " DESC";
            dtDueFCE = dtDueFCE.DefaultView.ToTable();
            rgdDueForCare.DataSource = dtDueFCE;
            rgdDueForCare.DataBind();
        }
예제 #8
0
 public HttpResponseMessage Get(DateTime pFrom, DateTime pTo)
 {
     try
     {
         lIReports = new Reports();
         var _stream = lIReports.RptExportExcel(pFrom, pTo);
         return(ResponseMsg(_stream));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message));
     }
 }
        private void GetReadLiquidationReportRecords()
        {
            try
            {
                IReports objReports = ReportsBusinessObject.CreateInstance();
                lstReadReport.DataContext = objReports.GetReadLiquidationReportRecords(Convert.ToBoolean(chkLast20.IsChecked));
            }

            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
    protected void hlDueforTermination_Click(object sender, EventArgs e)
    {
        IReports ReportDetails = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");

        System.Data.DataSet dsARTUnknown = ReportDetails.GetPtnotvisitedrecentlyUnknown(Convert.ToDateTime(Application["AppCurrentDate"]), Convert.ToDateTime(Application["AppCurrentDate"]), Convert.ToInt32(Session["AppLocationId"]));
        string     FName           = "ARTunknown";
        IQWebUtils theUtils        = new IQWebUtils();
        string     thePath         = Server.MapPath(".\\ExcelFiles\\" + FName + ".xls");
        string     theTemplatePath = Server.MapPath(".\\ExcelFiles\\IQCareTemplate.xls");

        theUtils.ExporttoExcel(dsARTUnknown.Tables[0], Response);
        Response.Redirect(".\\ExcelFiles\\" + FName + ".xls");
    }
예제 #11
0
    private void BindList()
    {
        IReports      ReportManager = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");
        BindFunctions BindManager   = new BindFunctions();

        if (ViewState["AllFieldGroup"] == null)
        {
            DataTable dtAllData1 = MakeSelectedTable();
            dtAllData1 = ReportManager.GetAllFieldGroups(Convert.ToInt32(Session["SystemId"].ToString())).Tables[0];


            DataTable dtAllData = MakeSelectedTable();
            foreach (DataRow theDR1 in dtAllData1.Rows)
            {
                if (theDR1["GroupId"].ToString() != "1")
                {
                    DataRow theDR = dtAllData.NewRow();
                    theDR[0] = theDR1[0];
                    theDR[1] = theDR1[1];
                    dtAllData.Rows.Add(theDR);
                }
            }


            ViewState["AllFieldGroup"] = dtAllData;
        }

        if (ViewState["AvailableData"] == null)
        {
            DataTable dtAvailable = MakeSelectedTable();
            ViewState["AvailableData"] = ViewState["AllFieldGroup"];
            BindManager.BindList(lstAvailable, (DataTable)ViewState["AvailableData"], "GroupName", "GroupId");
        }
        else
        {
            BindManager.BindList(lstAvailable, (DataTable)ViewState["AvailableData"], "GroupName", "GroupId");
        }

        if (ViewState["SelectedData"] == null)
        {
            DataTable dtSelected = MakeSelectedTable();
            ViewState["SelectedData"] = dtSelected;
            BindManager.BindList(lstAvailable, (DataTable)ViewState["AvailableData"], "GroupName", "GroupId");
        }
        else
        {
            SortDataTable((DataTable)ViewState["SelectedData"], "GroupId asc");
            BindManager.BindList(lstSelected, (DataTable)ViewState["SelectedData"], "GroupName", "GroupId");
        }
    }
예제 #12
0
        /// <summary>
        /// Handles the SelectedIndexChanged event of the ddlReport control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        protected void ddlReport_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlReport.SelectedValue == "0")
            {
                return;
            }

            string    queryToExecute     = ddlReport.SelectedValue;
            IReports  theQBuilderReports = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");
            DataTable theDT = theQBuilderReports.ReturnQueryResult(queryToExecute).Tables[0];

            gridResult.DataSource = theDT;
            gridResult.DataBind();
        }
        private void CreateCollectionReport()
        {
            try
            {
                //IReports objReports = isCommonCDOforDeclaration ? ReportsBusinessObject.CreateInstance(ExchangeConst, TicketConst) : ReportsBusinessObject.CreateInstance();
                IReports objReports          = ReportsBusinessObject.CreateInstance();
                DataSet  BatchWinLossDetails = null;
                if (_BatchID > 0)
                {
                    BatchWinLossDetails = objReports.GetBatchWinLoss(_BatchID, 0);
                }
                else if (_WeekNumber > 0)
                {
                    BatchWinLossDetails = objReports.GetBatchWinLoss(_WeekNumber, 1);
                }

                //DataSet BatchWinLossDetails = objReports.GetBatchWinLoss(_BatchID, _WeekNumber);

                if (BatchWinLossDetails.Tables[0].Rows.Count == 0 || BatchWinLossDetails.Tables[0].Rows.Count == 0)
                {
                    LogManager.WriteLog("No Records found for the selected criteria - Return", LogManager.enumLogLevel.Info);

                    MessageBox.ShowBox("MessageID261", BMC_Icon.Information);
                    return;
                }
                using (CReportViewer cReportViewer = isCommonCDOforDeclaration ? new CReportViewer(ExchangeConst, TicketConst) : new CReportViewer())
                {
                    LogManager.WriteLog("Report data fetched successfully from database", LogManager.enumLogLevel.Info);

                    if (_BatchID > 0)
                    {
                        cReportViewer.ShowCollectionReport(_BatchID, 0);
                    }
                    else if (_WeekNumber > 0)
                    {
                        cReportViewer.ShowCollectionReport(_WeekNumber, 1);
                    }

                    cReportViewer.SetOwner(Window.GetWindow(this));
                    cReportViewer.ShowDialog();
                }
                LogManager.WriteLog("CreateCollectionReport Successfull", LogManager.enumLogLevel.Info);
            }

            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
예제 #14
0
 public HttpResponseMessage Get(DateTime pTransDate, string pName, string pPosition, string pPrepared, string pFFormat, string pObj)
 {
     try
     {
         lIReports      = new Reports();
         lIMAssetsItems = new MAssetsItems();
         var _asset  = lIMAssetsItems.ToBinding(JsonConvert.DeserializeObject <List <MAssetsItems> >(pObj));
         var _stream = lIReports.RptMR(pTransDate, pName, pPosition, pPrepared, pFFormat, _asset);
         return(ResponseMsg(_stream));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message));
     }
 }
예제 #15
0
        /// <summary>
        /// Handles the Click event of the btnGenerate control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        protected void btnGenerate_Click(object sender, EventArgs e)
        {
            if (ddlReport.SelectedValue == "XX")
            {
                return;
            }

            //string queryToExecute = ddlReport.SelectedValue;
            string queryToExecute;

            try
            {
                IReports  theQBuilderReports = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");
                DataTable dtQuery            = theQBuilderReports.GetQueryBuilderReportQuery(ddlReport.SelectedValue);
                if (dtQuery.Rows.Count == 0)
                {
                    base.Session.Remove("QBReport");
                    return;
                }
                ;
                DataRow dataRow   = dtQuery.Rows[0];
                string  tableName = dataRow["ReportName"].ToString().Trim().Replace(" ", string.Empty);
                queryToExecute              = dataRow["ReportQuery"].ToString().Trim();
                Session["ReportName"]       = dataRow["ReportName"].ToString().Trim();
                Session["ReportParameters"] = "";
                bool hasParameters = int.Parse(dataRow["HasParameters"].ToString()) > 0;

                if (hasParameters)
                {
                    DataTable dtParams = theQBuilderReports.GetQueryBuilderReportParameters(ddlReport.SelectedValue);
                    gridParameter.DataSource = dtParams;
                    gridParameter.DataBind();
                    queryString.Value  = queryToExecute;
                    thetableName.Value = tableName;
                    parameterPopupCustomR.Show();
                    theQBuilderReports = null;
                    return;
                }

                GenerateReport(queryToExecute, tableName);
                theQBuilderReports = null;
                return;
            }
            catch (Exception ex)
            {
                showErrorMessage(ref ex);
            }
        }
예제 #16
0
        /// <summary>
        /// Handles the Click event of the btnActionOK control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        /// <exception cref="System.NotImplementedException"></exception>
        void btnActionOK_Click(object sender, EventArgs e)
        {
            int l = gridParameter.Rows.Count;

            // SqlParameter[] p = new SqlParameter[l];

            //System.Collections.Hashtable paramTable = new System.Collections.Hashtable();
            //int i =0;
            System.Text.StringBuilder sbParams = new System.Text.StringBuilder("<parameters>");

            foreach (GridViewRow row in gridParameter.Rows)
            {
                sbParams.Append("<parameter>");
                TextBox t          = row.FindControl("paramValue") as TextBox;
                string  paramValue = t.Text.Trim();
                sbParams.Append("<value>" + paramValue + "</value>");
                string paramName = row.Cells[0].Text;
                sbParams.Append("<name>" + paramName + "</name>");
                string paramType = row.Cells[1].Text;
                sbParams.Append("<type>" + paramType + "</type>");
                sbParams.Append("</parameter>");
            }
            sbParams.Append("</parameters>");
            IReports theQBuilderReports = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");

            string queryToExecute = queryString.Value.Trim();


            DataTable theDT = theQBuilderReports.ReturnQueryResult(queryString.Value, sbParams.ToString()).Tables[0];

            theDT.TableName = thetableName.Value;

            if (theDT.Rows.Count == 0)
            {
                this.noData = this.pnlNoData.Visible = true;
                base.Session.Remove("QBReport");
                gridResult.DataSource = theDT;
                gridResult.DataBind();
            }
            else
            {
                gridResult.DataSource = theDT;
                gridResult.DataBind();
                base.Session["QbReport"] = theDT;
                this.pnlNoData.Visible   = false;
            }
            thetableName.Value = queryString.Value = "";
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     Session["PatientId"] = 0;
     //(Master.FindControl("lblRoot") as Label).Text = "Reports >>";
     //(Master.FindControl("lblMark") as Label).Visible = false;
     //(Master.FindControl("lblheader") as Label).Text = "QueryBuilder Reports";
     (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblRoot") as Label).Text   = "Reports >> ";
     (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblheader") as Label).Text = "QueryBuilder Reports";
     if (!IsPostBack)
     {
         IReports      theQBuilderReports = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");
         DataTable     theDT   = theQBuilderReports.GetReportsCategory();
         BindFunctions theBind = new BindFunctions();
         theBind.BindCombo(ddlCategory, theDT, "CategoryName", "CategoryId");
     }
 }
예제 #18
0
        private void GetDueForCareEnded()
        {
            IReports ReportDetails = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");

            string   dateInString = Application["AppCurrentDate"].ToString();
            DateTime convertdate  = DateTime.Parse(dateInString);
            DateTime startDate    = convertdate.AddDays(-90);

            System.Data.DataSet dsARTUnknown = ReportDetails.GetPtnotvisitedrecentlyUnknown(startDate.ToString("dd MMM yyyy"), Application["AppCurrentDate"].ToString(), Convert.ToInt32(rcbFacility.SelectedValue));
            DataTable           dtDueFCE     = dsARTUnknown.Tables[0];

            dtDueFCE.DefaultView.Sort = dtDueFCE.Columns[1].ColumnName + " DESC";
            dtDueFCE = dtDueFCE.DefaultView.ToTable();
            dtDueFCE.Columns.Remove("PatientFile#");
            rgdDueForCare.DataSource = dtDueFCE;
            rgdDueForCare.DataBind();
        }
예제 #19
0
        //
        private void btnWinLossReport_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                IReports objReports = (isCommonCDOforDeclaration && !string.IsNullOrEmpty(ExchangeConst)) ? ReportsBusinessObject.CreateInstance(ExchangeConst, TicketConst) : ReportsBusinessObject.CreateInstance();

                LogManager.WriteLog("Fetching report data from database...", LogManager.enumLogLevel.Info);

                BatchHistoryListView dr = (BatchHistoryListView)dgBatchBreakdown.SelectedItem;
                _Undeclared = (dr.Zone ?? "") == "UNDECLARED" ? true : false;//checking whether Zone is Undeclared and setting the _Undeclared
                var oReports = new CollectionBatchDetailReports(_BatchID, _WeekID, _SiteConfig, Window.GetWindow(this), _ChkWeek, _Undeclared);
                oReports.ShowDialogEx(this);
            }
            catch (Exception ex)
            {
                LogError("btnWinLossReport_Click", ex);
            }
        }
 protected void btnRun_Click(object sender, EventArgs e)
 {
     if (this.ddTitle.SelectedValue != "")
     {
         IReports CustomReport   = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports,BusinessProcess.Reports");
         DataSet  DSCustomReport = CustomReport.GetCustomReport(Convert.ToInt32(ddTitle.SelectedValue));
         string   theRptName     = "";
         if (Convert.ToInt32(DSCustomReport.Tables[4].Rows[0][0]) > 0 && Convert.ToInt32(DSCustomReport.Tables[4].Rows[0][0]) < 8)
         {
             theRptName = "rptPotrait";
         }
         else
         {
             theRptName = "rptLandscape";
         }
         Session.Add("ReportData", DSCustomReport);
         Response.Redirect("frmReportViewer.aspx?ReportId=" + ddTitle.SelectedValue.ToString() + "&rptType=" + theRptName);
     }
 }
예제 #21
0
        /// <summary>
        /// Handles the Click event of the btnActionOKCustomReport control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        protected void btnActionOKCustomReport_Click(object sender, EventArgs e)
        {
            System.Text.StringBuilder sbParams = new System.Text.StringBuilder("<parameters>");
            String s = "";

            foreach (GridViewRow row in gridParameter.Rows)
            {
                sbParams.Append("<parameter>");
                TextBox t          = row.FindControl("paramValue") as TextBox;
                string  paramValue = t.Text.Trim();
                sbParams.Append("<value>" + paramValue + "</value>");
                string paramName = row.Cells[0].Text;
                sbParams.Append("<name>" + paramName + "</name>");
                string paramType = row.Cells[1].Text;
                sbParams.Append("<type>" + paramType + "</type>");
                sbParams.Append("</parameter>");
                s = String.Format("{0}{1}: {2}   ", s, paramName, paramValue);
            }
            Session["ReportParameters"] = s;
            sbParams.Append("</parameters>");
            IReports theQBuilderReports = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");

            DataTable theDT = theQBuilderReports.ReturnQueryResult(queryString.Value, sbParams.ToString()).Tables[0];

            theDT.TableName = thetableName.Value;

            if (theDT.Rows.Count == 0)
            {
                pnlNoData.Visible = true;
                btnExport.Visible = false;
                btnPrint.Visible  = false;
            }
            else
            {
                pnlNoData.Visible = false;
                btnExport.Visible = true;
                btnPrint.Visible  = true;
            }
            gridResult.DataSource = theDT;
            gridResult.DataBind();
            Session["CBillingReport"] = theDT;
            thetableName.Value        = queryString.Value = "";
        }
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (rdButtonList.SelectedItem != null)
     {
         string    theQuery           = rdButtonList.SelectedItem.Value.ToString();
         IReports  theQBuilderReports = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");
         DataTable theDT = theQBuilderReports.ReturnQueryResult(theQuery).Tables[0];
         if (theDT.Rows.Count > 0)
         {
             IQWebUtils theUtils        = new IQWebUtils();
             string     ReportName1     = rdButtonList.SelectedItem.Text;
             string     thePath         = Server.MapPath("..\\ExcelFiles\\" + ReportName1 + ".xls");
             string     theTemplatePath = Server.MapPath("..\\ExcelFiles\\IQCareTemplate.xls");
             theUtils.ExporttoExcel(theDT, Response);
         }
     }
     else
     {
         IQCareMsgBox.Show("SelectRadioButton", this);
     }
 }
예제 #23
0
        void GenerateReport(string queryToExecute, string tableName)
        {
            IReports theQBuilderReports = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");

            DataTable theDT = theQBuilderReports.ReturnQueryResult(queryToExecute).Tables[0];

            theDT.TableName = tableName;

            if (theDT.Rows.Count == 0)
            {
                this.noData = this.pnlNoData.Visible = true;
                base.Session.Remove("QBReport");
                gridResult.DataSource = theDT;
                gridResult.DataBind();
            }
            else
            {
                gridResult.DataSource = theDT;
                gridResult.DataBind();
                base.Session["QbReport"] = theDT;
                this.pnlNoData.Visible   = false;
            }
        }
예제 #24
0
        /// <summary>
        /// Конструктор
        /// </summary>
        public ReportsForm(IReports reports, IClients clients, IEmployees employees, IApartments apartments, IObjects objects, IHomes homes, IMans man, IDocuments document, string reportTemplatesFolderPath, string reportsFolderPath, CreateReportDocument createReportDocumentFunction)
            : base()
        {
            InitializeComponent();                                      // Инициализировать компоненты формы

            _reports    = reports;                                      // Сохранить список отчетов в поле
            _clients    = clients;                                      // Сохранить список клиентов в поле
            _employees  = employees;                                    // Сохранить список сотрудников в поле
            _apartments = apartments;                                   // Сохранить список квартир в поле
            _objects    = objects;
            _homes      = homes;                                        // Сохранить список домов с поле
            _man        = man;                                          // Сохранить человека
            _document   = document;                                     // Сохранить документ
            _reportTemplatesFolderPath = reportTemplatesFolderPath;     // Сохранить путь к папке с шаблонами отчетов
            _reportsFolderPath         = reportsFolderPath;             // Сохранить путь к папке с отчетами
            _createReportDocument      = createReportDocumentFunction;  // Сохранить делегат метода создания отчета

            ConfigureEntitiesDataGridView();                            // Настроить визуальное представление элемента отображения списка сущностей

            FillEntitiesDataGridView();                                 // Заполнить элемент отображения списка сущностей

            SetButtonActivity();                                        // Задать активность элементов управления
        }
        private void CreateLiquidationReport()
        {
            try
            {
                if (Settings.SGVI_Enabled)
                {
                    CreateSGVILiquidationReport();
                    return;
                }
                IReports objReports = isCommonCDOforDeclaration ? ReportsBusinessObject.CreateInstance(ExchangeConst, TicketConst) : ReportsBusinessObject.CreateInstance();

                LogManager.WriteLog("Check whether the Liquidation performed for the batch or not-Starts", LogManager.enumLogLevel.Info);
                int?iLiquidationPerformed          = 0;
                int isLiquidationPerformedForBatch = objReports.CheckLiquidationPerformed(_BatchID, ref iLiquidationPerformed);

                if (isLiquidationPerformedForBatch == 0)
                {
                    MessageBox.ShowBox("MessageID891", BMC_Icon.Information);
                    return;
                }

                using (CReportViewer cReportViewer = new CReportViewer())
                {
                    LogManager.WriteLog("Launch the liquidation report", LogManager.enumLogLevel.Info);
                    cReportViewer.ShowLiquidationReportForRead(_BatchID, null);
                    cReportViewer.SetOwner(Window.GetWindow(this));
                    cReportViewer.ShowDialog();
                }

                LogManager.WriteLog("ShowLiquidationReport Successfull", LogManager.enumLogLevel.Info);
            }

            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
예제 #26
0
        /// <summary>
        /// Generates the report.
        /// </summary>
        /// <param name="queryToExecute">The query to execute.</param>
        /// <param name="tableName">Name of the table.</param>
        private void GenerateReport(string queryToExecute, string tableName)
        {
            IReports theQBuilderReports = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports, BusinessProcess.Reports");

            DataTable theDT = theQBuilderReports.ReturnQueryResult(queryToExecute).Tables[0];

            theDT.TableName = tableName;

            if (theDT.Rows.Count == 0)
            {
                pnlNoData.Visible = true;
                btnExport.Visible = false;
                btnPrint.Visible  = false;
            }
            else
            {
                pnlNoData.Visible = false;
                btnExport.Visible = true;
                btnPrint.Visible  = true;
            }
            gridResult.DataSource = theDT;
            gridResult.DataBind();
            Session["CBillingReport"] = theDT;
        }
예제 #27
0
 public RenewalReportController(IReports reports)
 {
     _reports = reports;
 }
예제 #28
0
 public ReportsController(IReports repo)
 {
     reports = repo;
 }
예제 #29
0
 /// <summary>
 /// Deletes the specified report
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='reportKey'>
 /// The report id
 /// </param>
 public static object DeleteReport(this IReports operations, string reportKey)
 {
     return(operations.DeleteReportAsync(reportKey).GetAwaiter().GetResult());
 }
예제 #30
0
 /// <summary>
 /// Generate token to view or edit the specified report
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The group id
 /// </param>
 /// <param name='reportKey'>
 /// The report id
 /// </param>
 /// <param name='requestParameters'>
 /// Generate token parameters
 /// </param>
 public static EmbedToken GenerateTokenInGroup(this IReports operations, string groupId, string reportKey, GenerateTokenRequest requestParameters)
 {
     return(operations.GenerateTokenInGroupAsync(groupId, reportKey, requestParameters).GetAwaiter().GetResult());
 }
예제 #31
0
 /// <summary>
 /// Rebinds the specified report to requested dataset id
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The group id
 /// </param>
 /// <param name='reportKey'>
 /// The report id
 /// </param>
 /// <param name='requestParameters'>
 /// Rebind report parameters
 /// </param>
 public static object RebindReportInGroup(this IReports operations, string groupId, string reportKey, RebindReportRequest requestParameters)
 {
     return(operations.RebindReportInGroupAsync(groupId, reportKey, requestParameters).GetAwaiter().GetResult());
 }
예제 #32
0
 /// <summary>
 /// Update the report content from a specified source
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The group id
 /// </param>
 /// <param name='reportKey'>
 /// The report id
 /// </param>
 /// <param name='requestParameters'>
 /// UpdateReportContent parameters
 /// </param>
 public static Report UpdateReportContentInGroup(this IReports operations, string groupId, string reportKey, UpdateReportContentRequest requestParameters)
 {
     return(operations.UpdateReportContentInGroupAsync(groupId, reportKey, requestParameters).GetAwaiter().GetResult());
 }
예제 #33
0
 /// <summary>
 /// Exports the specified report
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The group id
 /// </param>
 /// <param name='reportKey'>
 /// The report id
 /// </param>
 public static Stream ExportReportInGroup(this IReports operations, string groupId, string reportKey)
 {
     return(operations.ExportReportInGroupAsync(groupId, reportKey).GetAwaiter().GetResult());
 }
예제 #34
0
 /// <summary>
 /// Deletes the specified report
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The group id
 /// </param>
 /// <param name='reportKey'>
 /// The report id
 /// </param>
 public static object DeleteReportInGroup(this IReports operations, string groupId, string reportKey)
 {
     return(operations.DeleteReportInGroupAsync(groupId, reportKey).GetAwaiter().GetResult());
 }