Exemplo n.º 1
0
        public object SourseWiseRegistration(ReportModel model)
        {
            try
            {
                StringBuilderService builder = new StringBuilderService();
                string       fromDate        = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
                string       toDate          = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ",");
                string       regStatus       = builder.ExtractText(Convert.ToString(model.ReportOption), "regStatus", ",");
                string       status          = builder.ExtractText(Convert.ToString(model.ReportOption), "status", ",");
                string       regSource       = builder.ExtractText(Convert.ToString(model.ReportOption), "regSource", ",");
                string       branchCode      = builder.ExtractText(Convert.ToString(model.ReportOption), "branchCode", "}");
                ReportViewer reportViewer    = new ReportViewer();
                List <SourceWiseRegistration> SourceWiseRegistrationList = new List <SourceWiseRegistration>();

                SourceWiseRegistrationList          = service.SourceWiseRegistration(fromDate, toDate, regStatus, status, regSource, branchCode);
                reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTSourceWiseRegistration.rdlc");                  //Request.RequestUri("");


                reportViewer.LocalReport.SetParameters(GetReportParameterForSourceWiseRegistration(fromDate, toDate));
                ReportDataSource A = new ReportDataSource("SourceWiseRegistration", SourceWiseRegistrationList);
                reportViewer.LocalReport.DataSources.Add(A);
                ReportUtility  reportUtility = new ReportUtility();
                MFSFileManager fileManager   = new MFSFileManager();
                return(reportUtility.GenerateReport(reportViewer, model.FileType));
            }
            catch (Exception ex)
            {
                return(ex.ToString());
            }
        }
        public byte[] CustomerRegistration(ReportModel model)
        {
            StringBuilderService builder = new StringBuilderService();
            string mphone   = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", ",");
            string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
            string toDate   = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ",");
            string agentNo  = builder.ExtractText(Convert.ToString(model.ReportOption), "agentNo", "}");

            if (!string.IsNullOrEmpty(agentNo))
            {
                var agentInfo = (Reginfo)kycService.GetClientInfoByMphone(agentNo);
                if (agentInfo.Pmphone != mphone)
                {
                    return(null);
                }
            }
            List <CustomerRegDistPort> customerRegDistPorts = service.CustomerRegistration(mphone, fromDate, toDate, agentNo);
            ReportViewer reportViewer = new ReportViewer();

            reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTDist_CustReg.rdlc");              //Request.RequestUri("");
            reportViewer.LocalReport.SetParameters(CustomerRegistrationRptParameter(mphone, fromDate, toDate, agentNo));
            ReportDataSource A = new ReportDataSource("CustomerRegDistPort", customerRegDistPorts);

            reportViewer.LocalReport.DataSources.Add(A);
            ReportUtility  reportUtility = new ReportUtility();
            MFSFileManager fileManager   = new MFSFileManager();

            return(reportUtility.GenerateReport(reportViewer, model.FileType));
        }
Exemplo n.º 3
0
        public byte[] EmsReport(ReportModel model)
        {
            StringBuilderService builder = new StringBuilderService();
            string transNo    = builder.ExtractText(Convert.ToString(model.ReportOption), "transNo", ",");
            string fromDate   = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
            string toDate     = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ",");
            string studentId  = builder.ExtractText(Convert.ToString(model.ReportOption), "studentId", ",");
            string branchCode = builder.ExtractText(Convert.ToString(model.ReportOption), "branchCode", "}");
            string schoolId   = builder.ExtractText(Convert.ToString(model.ReportOption), "schoolId", ",");
            string dateType   = builder.ExtractText(Convert.ToString(model.ReportOption), "dateType", ",");


            List <EmsReport> emsReports   = emsService.GetEmsReport(fromDate, toDate, transNo, studentId, schoolId, branchCode, dateType);
            ReportViewer     reportViewer = new ReportViewer();

            reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTEmsInfo.rdlc");              //Request.RequestUri("");
            reportViewer.LocalReport.SetParameters(GetEmsRptParameter(fromDate, toDate, transNo, studentId, schoolId));
            ReportDataSource A = new ReportDataSource("EmsReport", emsReports);

            reportViewer.LocalReport.DataSources.Add(A);
            ReportUtility  reportUtility = new ReportUtility();
            MFSFileManager fileManager   = new MFSFileManager();

            return(reportUtility.GenerateReport(reportViewer, model.FileType));
        }
Exemplo n.º 4
0
        public object KycCommission(ReportModel model)
        {
            try
            {
                StringBuilderService builder = new StringBuilderService();
                string reportName            = builder.ExtractText(Convert.ToString(model.ReportOption), "reportName", ",");
                string regFromDate           = builder.ExtractText(Convert.ToString(model.ReportOption), "regFromDate", ",");
                string regToDate             = builder.ExtractText(Convert.ToString(model.ReportOption), "regToDate", ",");
                string commissionStatus      = builder.ExtractText(Convert.ToString(model.ReportOption), "commissionStatus", ",");
                string authFromDate          = builder.ExtractText(Convert.ToString(model.ReportOption), "authFromDate", ",");
                string authToDate            = builder.ExtractText(Convert.ToString(model.ReportOption), "authToDate", ",");
                string agentNo       = builder.ExtractText(Convert.ToString(model.ReportOption), "agentNo", "}");
                string distributorNo = builder.ExtractText(Convert.ToString(model.ReportOption), "distributorNo", ",");
                string transNo       = builder.ExtractText(Convert.ToString(model.ReportOption), "transNo", ",");


                ReportViewer         reportViewer   = new ReportViewer();
                List <KycCommission> kycCommissions = new List <KycCommission>();
                kycCommissions = service.GetRptkycCommissionsList(reportName, regFromDate, regToDate, commissionStatus, authFromDate, authToDate, distributorNo, agentNo, transNo);
                reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTKycCom.rdlc");
                reportViewer.LocalReport.SetParameters(GenerateParamKycCom(regFromDate, regToDate, reportName));
                ReportDataSource A = new ReportDataSource("KycCommission", kycCommissions);
                reportViewer.LocalReport.DataSources.Add(A);
                ReportUtility  reportUtility = new ReportUtility();
                MFSFileManager fileManager   = new MFSFileManager();
                return(reportUtility.GenerateReport(reportViewer, model.FileType));
            }
            catch (Exception ex)
            {
                return(ex.ToString());
            }
        }
Exemplo n.º 5
0
        public object MerchantBankInfo(ReportModel model)
        {
            try
            {
                StringBuilderService builder              = new StringBuilderService();
                string                  fromDate          = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
                string                  toDate            = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ",");
                string                  accNo             = builder.ExtractText(Convert.ToString(model.ReportOption), "accNo", ",");
                string                  catId             = builder.ExtractText(Convert.ToString(model.ReportOption), "catId", "}");
                ReportViewer            reportViewer      = new ReportViewer();
                List <MerchantBankInfo> merchantBankInfos = new List <MerchantBankInfo>();

                merchantBankInfos = service.MerchantBankInfoReport(fromDate, toDate, accNo, catId);
                reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTMerchantBankInfo.rdlc");                  //Request.RequestUri("");


                reportViewer.LocalReport.SetParameters(GetReportParameterForChannelBankInfoReport(fromDate, toDate, catId));
                ReportDataSource A = new ReportDataSource("MerchantBank", merchantBankInfos);
                reportViewer.LocalReport.DataSources.Add(A);
                ReportUtility  reportUtility = new ReportUtility();
                MFSFileManager fileManager   = new MFSFileManager();
                return(reportUtility.GenerateReport(reportViewer, model.FileType));
            }
            catch (Exception ex)
            {
                return(ex.ToString());
            }
        }
Exemplo n.º 6
0
        //public ICommand PrintSummaryCommandView
        //{
        //    get { return _printListCommandView ?? (_printListCommandView = new RelayCommand<Object>(PrintList)); }
        //}
        //public void PrintList(object obj)
        //{
        //    var myReport4 = new PinnaFit.WPF.Reports.Summary.NumberSummay();
        //    myReport4.SetDataSource(GetNumberListDataSet());

        //    //MenuItem menu = obj as MenuItem;
        //    //if (menu != null)
        //    //    new ReportUtility().DirectPrinter(myReport4);
        //    //else
        //    //{
        //    var report = new ReportViewerCommon(myReport4);
        //    report.Show();
        //    //}
        //}
        //public FitnessDataSet GetNumberListDataSet()
        //{
        //    var myDataSet = new FitnessDataSet();
        //    var serNo = 1;
        //    var selectedCompany = new CompanyService(true).GetCompany();

        //    MemberSubscriptionListForNumberSummary = MemberSubscriptionListForNumberSummary.Where(m => !m.IsExpired).ToList();

        //    #region Group By Facility
        //    var querFacility = from memberSubscriptionList in MemberSubscriptionListForNumberSummary
        //                       group memberSubscriptionList by memberSubscriptionList.FacilityName
        //                           into newGroup
        //                           orderby newGroup.Key
        //                           select newGroup;

        //    MemberCategorySubList = querFacility.Select(nameGroup => new SubscriptionSumModel
        //    {
        //        Category = nameGroup.Key,
        //        SubscriptionModels = nameGroup
        //    }).ToList();


        //    foreach (var subscriptionSumModel in MemberCategorySubList)
        //    {
        //        string cat = subscriptionSumModel.Category;
        //        var subModels = subscriptionSumModel.SubscriptionModels;

        //        var querSubscription = from memberSubscriptionList in subModels
        //                               group memberSubscriptionList by memberSubscriptionList.SubscriptionName
        //                                   into newGroup
        //                                   orderby newGroup.Key
        //                                   select newGroup;

        //        var memberCategorySubList2 = querSubscription.Select(nameGroup => new SubscriptionSumModel
        //        {
        //            Category = nameGroup.Key,
        //            SubscriptionModels = nameGroup
        //        }).ToList();

        //        int permonth = 0, threemonth = 0, sixmonth = 0, oneyear = 0;

        //        var firstOrDefault = memberCategorySubList2.FirstOrDefault(a => a.Category == "Per Month");
        //        if (firstOrDefault != null)
        //        {
        //            permonth = firstOrDefault.TotalNumber;
        //        }

        //        firstOrDefault = memberCategorySubList2.FirstOrDefault(a => a.Category == "3 Months");
        //        if (firstOrDefault != null)
        //        {
        //            threemonth = firstOrDefault.TotalNumber;
        //        }

        //        firstOrDefault = memberCategorySubList2.FirstOrDefault(a => a.Category == "6 Months");
        //        if (firstOrDefault != null)
        //        {
        //            sixmonth = firstOrDefault.TotalNumber;
        //        }

        //        firstOrDefault = memberCategorySubList2.FirstOrDefault(a => a.Category == "1 Year");
        //        if (firstOrDefault != null)
        //        {
        //            oneyear = firstOrDefault.TotalNumber;
        //        }

        //        var tot = oneyear + permonth + threemonth + sixmonth;

        //        myDataSet.SummaryReport.Rows.Add(
        //          serNo,
        //          ReportUtility.GetEthCalendarFormated(DateTime.Now, "-") + "(" +
        //            DateTime.Now.ToShortDateString() + ")",
        //          cat,
        //          0,
        //          permonth,
        //          threemonth,
        //          sixmonth,
        //          oneyear,
        //          tot,
        //          "",
        //          "",
        //          0, 0, selectedCompany.Header, "");

        //        serNo++;
        //    }



        //    #endregion


        //    return myDataSet;
        //}

        //public ICommand PrintDailySummaryCommandView
        //{
        //    get { return _printDailySummaryCommandView ?? (_printDailySummaryCommandView = new RelayCommand<Object>(PrintDailySummaryList)); }
        //}
        //public void PrintDailySummaryList(object obj)
        //{
        //    var myReport4 = new Reports.Summary.DailySummay();
        //    var dSet = GetSummaryDataSet();
        //    if (dSet == null)
        //        return;

        //    myReport4.SetDataSource(dSet);

        //    var report = new ReportViewerCommon(myReport4);
        //    report.Show();

        //}
        //public FitnessDataSet GetSummaryDataSet()
        //{
        //    try
        //    {
        //        var selectDate = SelectedEthioDay.Value + "/" + SelectedEthioMonth.Value + "/" + SelectedEthioYear.Display;

        //        var selectedDate = ReportUtility.GetGregorCalendar(SelectedEthioYear.Value, SelectedEthioMonth.Value,
        //            SelectedEthioDay.Value);

        //        var myDataSet = new FitnessDataSet();
        //        var serNo = 1;
        //        var selectedCompany = new CompanyService(true).GetCompany();

        //        var MemberSubsList = MemberSubscriptionList.Where(
        //            m => m.TransactionDate.Day == selectedDate.Day &&
        //            m.TransactionDate.Month == selectedDate.Month &&
        //            m.TransactionDate.Year == selectedDate.Year).ToList();

        //        if (MemberSubsList.Count == 0)
        //        {
        //            MessageBox.Show("No Data found on: " + Environment.NewLine + selectDate + "(" +
        //                selectedDate.ToShortDateString() + ")" + "(" + SelectedShiftType.Display + ")", "No Data",
        //                MessageBoxButtons.OK, MessageBoxIcon.Error);
        //            return null;
        //        }

        //        #region Group By Facility
        //        var querFacility = from memberSubscriptionList in MemberSubsList
        //                           group memberSubscriptionList by memberSubscriptionList.PackageName
        //                               into newGroup
        //                               orderby newGroup.Key
        //                               select newGroup;

        //        MemberCategorySubList = querFacility.Select(nameGroup => new SubscriptionSumModel
        //        {
        //            Category = nameGroup.Key,
        //            SubscriptionModels = nameGroup
        //        }).ToList();

        //        foreach (var subscriptionSumModel in MemberCategorySubList)
        //        {
        //            var subtototal = subscriptionSumModel.TotalAmount / (decimal)1.15;
        //            var tax = subtototal * (decimal)0.15;

        //            myDataSet.DailySummaryReport.Rows.Add(
        //              serNo,
        //              ReportUtility.GetEthCalendarFormated(selectedDate, "-") + "(" +
        //                selectedDate.ToShortDateString() + ") - (" + SelectedShiftType.Display + ")",
        //              subscriptionSumModel.Category,
        //              subscriptionSumModel.TotalUnit,
        //              subtototal,
        //              tax,
        //              subscriptionSumModel.TotalAmount,
        //              "",
        //              "",
        //              0, 0, selectedCompany.Header, "");

        //            serNo++;
        //        }



        //        #endregion


        //        return myDataSet;
        //    }
        //    catch
        //    {
        //        return null;
        //    }
        //}

        #endregion

        #region Filter List
        public void FillCalendar()
        {
            #region Initialize
            _ethioDays          = new ObservableCollection <ListDataItem>();
            _ethioMonths        = new ObservableCollection <ListDataItem>();
            _ethioYears         = new ObservableCollection <ListDataItem>();
            _selectedEthioDay   = new ListDataItem();
            _selectedEthioMonth = new ListDataItem();
            _selectedEthioYear  = new ListDataItem();
            #endregion

            for (var i = 1; i <= 30; i++)
            {
                EthioDays.Add(new ListDataItem {
                    Display = i.ToString(), Value = i
                });
            }

            for (var i = 1; i <= 12; i++)
            {
                EthioMonths.Add(new ListDataItem {
                    Display = ReportUtility.GetAmhMonth(i - 1), Value = i
                });
            }
            EthioMonths.Add(new ListDataItem {
                Display = ReportUtility.GetAmhMonth(12), Value = 13
            });

            for (var i = 2008; i <= 2020; i++)
            {
                EthioYears.Add(new ListDataItem {
                    Display = i.ToString(), Value = i
                });
            }
        }
Exemplo n.º 7
0
        public object DormantAgent(ReportModel model)
        {
            try
            {
                StringBuilderService builder = new StringBuilderService();
                string type     = builder.ExtractText(Convert.ToString(model.ReportOption), "type", ",");
                string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
                string toDate   = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", "}");


                ReportViewer        reportViewer     = new ReportViewer();
                List <DormantAgent> dormantAgentList = new List <DormantAgent>();
                dormantAgentList = service.GetDormantAgentList(fromDate, toDate, type);
                reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTDormantAgent.rdlc");  //Request.RequestUri("");

                reportViewer.LocalReport.SetParameters(GenerateParamEmerchantSettlementInfo(fromDate, toDate));
                ReportDataSource A = new ReportDataSource("DormantAgent", dormantAgentList);
                reportViewer.LocalReport.DataSources.Add(A);
                ReportUtility  reportUtility = new ReportUtility();
                MFSFileManager fileManager   = new MFSFileManager();
                return(reportUtility.GenerateReport(reportViewer, model.FileType));
            }
            catch (Exception ex)
            {
                return(ex.ToString());
            }
        }
Exemplo n.º 8
0
 protected override void OnUnload(EventArgs e)
 {
     base.OnUnload(e);
     m_Registration.Dispose();
     m_Registration = null;
     m_ReportUtil   = null;
 }
Exemplo n.º 9
0
        public MainViewModel()
        {
            CheckRoles();
            TitleText = "PinnaStock, Stock Management System (" +
                        Singleton.User.UserName + ") - " +
                        DateTime.Now.ToString("dd/MM/yyyy") + " (" +
                        ReportUtility.getEthCalendarFormated(DateTime.Now, "-") + ") - " +
                        new ProductActivationDTO().BiosSn;

            if (UserRoles.OnHandInventory == "Visible")
            {
                HeaderText = "OnHand Inventories";
                OnHandInventoryViewModel.LoadData = true;
                CurrentViewModel = OnHandInventoryViewModel;
            }
            else if (UserRoles.Sales == "Visible")
            {
                HeaderText = "Sales Management";
                TransactionsViewModel.TransactionType = TransactionTypes.Sale;
                CurrentViewModel = TransactionsViewModel;
            }
            DashBoardViewCommand         = new RelayCommand(ExecuteDashBoardViewCommand);
            PhysicalInventoryViewCommand = new RelayCommand(ExecutePhysicalInventoriesViewCommand);
            ItemsMovementViewCommand     = new RelayCommand(ItemsMovementsViewCommand);
            OnHandInventoryViewCommand   = new RelayCommand(ExecuteOnHandInventoriesViewCommand);
            SalesViewCommand             = new RelayCommand(ExecuteSalesViewCommand);
            PurchasesViewCommand         = new RelayCommand(ExecutePurchasesViewCommand);
        }
Exemplo n.º 10
0
        public object CommissionReport(ReportModel model)
        {
            try
            {
                StringBuilderService builder = new StringBuilderService();
                string mphone   = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", "}");
                string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
                string toDate   = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ",");

                ReportViewer            reportViewer      = new ReportViewer();
                List <CommissionReport> commissionReports = new List <CommissionReport>();
                commissionReports = service.CommissionReport(mphone, fromDate, toDate);
                reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTCommssion.rdlc");                  //Request.RequestUri("");

                reportViewer.LocalReport.SetParameters(GetGenerateCommissionReportParameter(fromDate, toDate, mphone));
                ReportDataSource A = new ReportDataSource("Commission", commissionReports);
                reportViewer.LocalReport.DataSources.Add(A);
                ReportUtility  reportUtility = new ReportUtility();
                MFSFileManager fileManager   = new MFSFileManager();
                return(reportUtility.GenerateReport(reportViewer, model.FileType));
            }
            catch (Exception ex)
            {
                return(ex.ToString());
            }
        }
        public byte[] LankaBanglaDpsPaymentDetails(ReportModel model)
        {
            StringBuilderService builder = new StringBuilderService();
            string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
            string toDate   = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", "}");

            List <LankaBangla> dpsDeilsReports = service.GetDpsDetailsInfo(fromDate, toDate);
            ReportViewer       reportViewer    = new ReportViewer();

            if (model.FileType == "EXCEL")
            {
                reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPT_Lb_Dps_Dtl_Excel.rdlc");                  //Request.RequestUri("");
            }
            else
            {
                reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPT_Lb_Dps_Dtl.rdlc");                  //Request.RequestUri("");
            }
            reportViewer.LocalReport.SetParameters(GetDpsDetailsInfoRptParameter(fromDate, toDate));
            ReportDataSource A = new ReportDataSource("LankaBangla", dpsDeilsReports);

            reportViewer.LocalReport.DataSources.Add(A);
            ReportUtility  reportUtility = new ReportUtility();
            MFSFileManager fileManager   = new MFSFileManager();

            return(reportUtility.GenerateReport(reportViewer, model.FileType));
        }
Exemplo n.º 12
0
        public object CashBackReport(ReportModel model)
        {
            try
            {
                StringBuilderService builder          = new StringBuilderService();
                string                mphone          = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", ",");
                string                fromDate        = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
                string                toDate          = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ",");
                string                options         = builder.ExtractText(Convert.ToString(model.ReportOption), "reportType", ",");
                string                cbType          = builder.ExtractText(Convert.ToString(model.ReportOption), "cbType", "}");
                ReportViewer          reportViewer    = new ReportViewer();
                List <CashBackReport> cashBackReports = new List <CashBackReport>();
                if (options == "dtl")
                {
                    cashBackReports = service.CashBackDetails(mphone, fromDate, toDate, cbType);
                    reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTCashBackDtl.rdlc");                      //Request.RequestUri("");
                }
                if (options == "sum")
                {
                    cashBackReports = service.CashBackSummaryReport(mphone, fromDate, toDate, cbType);
                    reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTCashBackSum.rdlc");                      //Request.RequestUri("");
                }

                reportViewer.LocalReport.SetParameters(GetGenerateCashBackParameter(fromDate, toDate, cbType));
                ReportDataSource A = new ReportDataSource("CashBack", cashBackReports);
                reportViewer.LocalReport.DataSources.Add(A);
                ReportUtility  reportUtility = new ReportUtility();
                MFSFileManager fileManager   = new MFSFileManager();
                return(reportUtility.GenerateReport(reportViewer, model.FileType));
            }
            catch (Exception ex)
            {
                return(ex.ToString());
            }
        }
        public ActionResult PayerMapping(long?nodeId, int reportType, string currentDateTime)
        {
            string fileName = string.Empty;
            ContractPayerMapReport contractPayerMapReport = new ContractPayerMapReport
            {
                NodeId     = nodeId,
                ReportType = Constants.PayerMapping[reportType],
                CommandTimeoutForModelingReport = Convert.ToInt32(GlobalConfigVariable.CommandTimeout),
                LoggedInUser = GetLoggedInUserName()
            };

            var mappedReport = PostApiResponse <ContractPayerMapReport>(Constants.ContractPayerMapReport,
                                                                        Convert.ToString(Enums.Action.Get),
                                                                        contractPayerMapReport);

            var payerMapReportViewModel =
                AutoMapper.Mapper.Map <ContractPayerMapReport, ContractPayerMapReportViewModel>(mappedReport);

            payerMapReportViewModel.NodeId       = nodeId;
            payerMapReportViewModel.LoggedInUser = GetCurrentUserName();
            // Gets local timeZone string.
            payerMapReportViewModel.CurrentDateTime = Utilities.GetLocalTimeString(currentDateTime);
            if (payerMapReportViewModel.ContractPayerMapReportViewModels != null && payerMapReportViewModel.ContractPayerMapReportViewModels.Count > 0)
            {
                fileName = ReportUtility.CreateFileUsingTelerik(new PayerMapping(payerMapReportViewModel), Enums.DownloadFileType.Pdf,
                                                                GlobalConfigVariable.ReportsFilePath, Constants.PayerMappingReportFileBaseName, currentDateTime);
            }
            return(Json(fileName));
        }
Exemplo n.º 14
0
        public ActionResult NegativeDetail(int issueId)
        {
            ViewBag.Tab     = "history";
            ViewBag.Submenu = 1;
            var issue = ReportUtility.GetNegativeIssue(issueId);

            return(View(issue));
        }
Exemplo n.º 15
0
        /// <summary>
        /// Download the report for a requested format
        /// </summary>
        /// <param name="reportFileName">Holds report file name</param>
        /// <param name="currentDateTime"></param>
        /// <returns>files result. is used to download the file</returns>
        public ActionResult DownloadReport(string reportFileName, string currentDateTime)
        {
            string fileName;
            string contentType;
            string filePath = ReportUtility.GetReportFileDetailsToDownload(Constants.ClaimVarianceReportFileBaseName, reportFileName, out fileName, Enums.DownloadFileType.Csv, out contentType, currentDateTime);

            return(File(filePath, contentType, fileName));
        }
Exemplo n.º 16
0
        private void Print()
        {
            LoadDeposits();

            var myDataSet       = new ReportDataSet();
            var serNo           = 1;
            var selectedCompany = new CompanyService(true).GetCompany();

            string datecaption = ReportUtility.GetEthCalendar(FilterStartDate, true) + "(" +
                                 FilterStartDate.ToShortDateString() + ")";

            if (FilterStartDate.Day != FilterEndDate.Day || FilterStartDate.Month != FilterEndDate.Month || FilterStartDate.Year != FilterEndDate.Year)
            {
                datecaption = "ከ " + datecaption + " እስከ " + ReportUtility.GetEthCalendar(FilterEndDate, true) + "(" +
                              FilterEndDate.ToShortDateString() + ")";
            }
            var returned = "";

            if (SelectedCpoType.Value != 1)
            {
                returned = "የተመለሰበት ቀን";
            }

            foreach (var rentalPaymentDTO in RentDeposits)
            {
                var rentee = rentalPaymentDTO.Contrat.Rentee.DisplayName;
                if (rentee.Length > 20)
                {
                    rentee = rentee.Substring(0, 18) + "...";
                }
                myDataSet.RentalPayment.Rows.Add(
                    serNo,
                    SelectedCpoType.Display,
                    datecaption,
                    rentalPaymentDTO.DepositedDateStringAmharicFormatted,
                    rentalPaymentDTO.Contrat.Room.Number,
                    rentee,
                    "",
                    0.0, 0.0, 0.0,
                    0.0, 0.0,
                    rentalPaymentDTO.TotalDepositAmount,
                    rentalPaymentDTO.ReturnedDateStringAmharicFormatted,
                    0, 0.0, returned, "", "", "", selectedCompany.Header, null, "");
                serNo++;
            }

            var myReport4 = new DepositList();

            myReport4.SetDataSource(myDataSet);

            var report = new ReportViewerCommon(myReport4);

            report.Show();
        }
Exemplo n.º 17
0
        public string GetEquipmentNumber(int equipmentId)
        {
            var pref = equipmentId.ToString();

            if (equipmentId < 1000)
            {
                var id = equipmentId + 110000;
                pref = id.ToString();
                //pref = pref.Substring(1);
            }
            var amhCalender = ReportUtility.GetEthCalendar(DateTime.Now, false);

            return(pref + amhCalender.Substring(6));
        }
Exemplo n.º 18
0
        public string GetBusinessPartnerNumber(int businessPartnerId)
        {
            var pref = businessPartnerId.ToString();

            if (businessPartnerId < 1000)
            {
                var id = businessPartnerId + 10000;
                pref = id.ToString();
                pref = pref.Substring(1);
            }
            var amhCalender = ReportUtility.GetEthCalendar(DateTime.Now, false);

            return("DFT/" + pref + "/" + amhCalender.Substring(6));
        }
Exemplo n.º 19
0
        public string GetRentalPaymentNumber(int rentalPaymentId)
        {
            var pref = rentalPaymentId.ToString();

            if (rentalPaymentId < 1000)
            {
                var id = rentalPaymentId + 10000;
                pref = id.ToString();
                pref = pref.Substring(1);
            }
            var amhCalender = ReportUtility.GetEthCalendar(DateTime.Now, false);

            return("DRN/" + pref + "/" + amhCalender.Substring(6));
        }
Exemplo n.º 20
0
        public MainViewModel()
        {
            CheckRoles();
            TitleText = "PDMAS V1.0.0.0, PDEX Delivery Management System - " +
                        Singleton.User.UserName + " - " +
                        DateTime.Now.ToString("dd/MM/yyyy") + " - " +
                        ReportUtility.GetEthCalendarFormated(DateTime.Now, "/");

            HeaderText = "Request Managment";
            DeliveryViewModel.LoadData = true;
            CurrentViewModel           = DeliveryViewModel;

            DeliveryViewModelViewCommand = new RelayCommand(ExecuteDeliveryViewModelViewCommand);
            FollowUpViewModelViewCommand = new RelayCommand(ExecuteFollowUpViewModelViewCommand);
        }
        void PrintBOM()
        {
            // bool BOMWorkspaceExist = false;

            SalesOrder salesorder = new SalesOrder();

            List <SalesOrder> salesOrdersList = salesorder.GetAllSalesOrders();

            if (salesOrdersList.Count > 0)
            {
                ReportViewerUI repWindow = new ReportViewerUI();
                BOMReport      soReport  = new BOMReport();
                ReportUtility.Display_report(soReport, salesOrdersList, repWindow);
            }
        }
Exemplo n.º 22
0
        public object BranchWiseCount(ReportModel model)
        {
            try
            {
                StringBuilderService builder = new StringBuilderService();
                string branchCode            = builder.ExtractText(Convert.ToString(model.ReportOption), "branchCode", ",");
                string userId   = builder.ExtractText(Convert.ToString(model.ReportOption), "userId", ",");
                string option   = builder.ExtractText(Convert.ToString(model.ReportOption), "option", ",");
                string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
                string toDate   = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", "}");

                if (branchCode == "null")
                {
                    branchCode = null;
                }
                if (userId == "null")
                {
                    userId = null;
                }
                if (fromDate == "null")
                {
                    fromDate = DateTime.Now.AddYears(-99).ToString("yyyy/MM/dd");
                }
                if (toDate == "null")
                {
                    toDate = DateTime.Now.ToString("yyyy/MM/dd");
                }

                ReportViewer           reportViewer        = new ReportViewer();
                List <BranchWiseCount> BranchWiseCountList = new List <BranchWiseCount>();

                BranchWiseCountList = service.BranchWiseCount(branchCode, userId, option, fromDate, toDate);
                reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTBranchWiseCount.rdlc");                  //Request.RequestUri("");


                reportViewer.LocalReport.SetParameters(GetReportParameterForSourceWiseRegistration(fromDate, toDate));
                ReportDataSource A = new ReportDataSource("BranchWiseCount", BranchWiseCountList);
                reportViewer.LocalReport.DataSources.Add(A);
                ReportUtility  reportUtility = new ReportUtility();
                MFSFileManager fileManager   = new MFSFileManager();
                return(reportUtility.GenerateReport(reportViewer, model.FileType));
            }
            catch (Exception ex)
            {
                return(ex.ToString());
            }
        }
Exemplo n.º 23
0
 public void SetEthioValues()
 {
     try
     {
         var gregorDayFrom = new DateTime(SelectedGregorYear.Value, SelectedGregorMonth.Value, SelectedGregorDay.Value);
         var ethioDayFrom  = ReportUtility.getEthCalendar(gregorDayFrom, false);
         int dayf          = Convert.ToInt32(ethioDayFrom.Substring(0, 2)),
             monthf        = Convert.ToInt32(ethioDayFrom.Substring(2, 2)),
             yearf         = Convert.ToInt32(ethioDayFrom.Substring(4, 4));
         SelectedEthioDay   = EthioDays[dayf - 1];
         SelectedEthioMonth = EthioMonths[monthf - 1];
         SelectedEthioYear  = EthioYears[yearf - 2000];
     }
     catch
     {
         //MessageBox.Show("Can't convert, may be out side of the scope!");
     }
 }
        public byte[] GetAgentDsrListByPmphone(ReportModel model)
        {
            StringBuilderService builder = new StringBuilderService();
            string mphone = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", "}");

            List <AgentDsrList> registrationReports = service.GetAgentDsrListByPmphone(mphone);
            ReportViewer        reportViewer        = new ReportViewer();

            reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTAgentDsr.rdlc");              //Request.RequestUri("");
            reportViewer.LocalReport.SetParameters(GetAgentDsrListByPmphoneRptParameter(mphone));
            ReportDataSource A = new ReportDataSource("AgentDsrList", registrationReports);

            reportViewer.LocalReport.DataSources.Add(A);
            ReportUtility  reportUtility = new ReportUtility();
            MFSFileManager fileManager   = new MFSFileManager();

            return(reportUtility.GenerateReport(reportViewer, model.FileType));
        }
Exemplo n.º 25
0
 public void SetGregorValues()
 {
     try
     {
         //var ethioDayFrom = new DateTime(SelectedEthioYear.Value, SelectedEthioMonth.Value, SelectedEthioDay.Value);
         //var ethioDayTo = new DateTime(SelectedEthioYearTo.Value, SelectedEthioMonthTo.Value, SelectedEthioDayTo.Value);
         var gregorDayFrom = ReportUtility.getGregorCalendar(SelectedEthioYear.Value, SelectedEthioMonth.Value, SelectedEthioDay.Value);
         int dayf          = Convert.ToInt32(gregorDayFrom.Day),
             monthf        = Convert.ToInt32(gregorDayFrom.Month),
             yearf         = Convert.ToInt32(gregorDayFrom.Year);
         SelectedGregorDay   = GregorDays[dayf - 1];
         SelectedGregorMonth = GregorMonths[monthf - 1];
         SelectedGregorYear  = GregorYears[yearf - 2010];
     }
     catch
     {
         //MessageBox.Show("Can't convert, may be out side of the scope!");
     }
 }
Exemplo n.º 26
0
        public object OutletSumTransReportByTranDate(ReportModel model)
        {
            try
            {
                StringBuilderService builder = new StringBuilderService();
                string mphone     = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", ",");
                string fromDate   = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
                string toDate     = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ",");
                string dateType   = builder.ExtractText(Convert.ToString(model.ReportOption), "dateType", "}");
                var    clientInfo = (Reginfo)kycService.GetClientInfoByMphone(mphone);

                if (clientInfo.CatId != "M")
                {
                    return("NOTM");
                }
                double totalTransAmt   = 0;
                double totalTransCount = 0;
                List <MerchantTransactionSummary> merchantTransactionList = new List <MerchantTransactionSummary>();
                merchantTransactionList = childMerchantService.ChainMerTransSummReportByTd(mphone, fromDate, toDate).ToList();
                if (merchantTransactionList.Count() > 0)
                {
                    totalTransCount = merchantTransactionList.Count();
                    totalTransAmt   = merchantTransactionList.Sum(x => x.TransAmt);
                }
                ReportViewer reportViewer = new ReportViewer();

                reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTChainMerTranSumByTd.rdlc");
                reportViewer.LocalReport.SetParameters(GetReportParameterMerchantSummary(mphone, fromDate, toDate, merchantTransactionList.Count() > 1 ? merchantTransactionList[1].MerchantCode : null, merchantTransactionList.Count() > 1 ? merchantTransactionList[1].MerchantName : null, totalTransCount, totalTransAmt));
                ReportDataSource A = new ReportDataSource("MerchantTransferSummary", merchantTransactionList);
                reportViewer.LocalReport.DataSources.Add(A);


                ReportUtility  reportUtility = new ReportUtility();
                MFSFileManager fileManager   = new MFSFileManager();

                return(reportUtility.GenerateReport(reportViewer, model.FileType));
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Exemplo n.º 27
0
        public object RegistrationReportSummary(ReportModel model)
        {
            StringBuilderService builder = new StringBuilderService();
            string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
            string toDate   = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ",");
            string options  = builder.ExtractText(Convert.ToString(model.ReportOption), "options", "}");

            List <RegistrationSummary> registrationReports = service.GetRegistrationReportSummary(fromDate, toDate, options);
            ReportViewer reportViewer = new ReportViewer();

            reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTRegistrationSummary.rdlc");              //Request.RequestUri("");
            reportViewer.LocalReport.SetParameters(GetRegistrationRptParameter(fromDate, toDate, options));
            ReportDataSource A = new ReportDataSource("RegistrationSummary", registrationReports);

            reportViewer.LocalReport.DataSources.Add(A);
            ReportUtility  reportUtility = new ReportUtility();
            MFSFileManager fileManager   = new MFSFileManager();

            return(reportUtility.GenerateReport(reportViewer, model.FileType));
        }
Exemplo n.º 28
0
        public MainViewModel()
        {
            CheckRoles();
            TitleText = "PinnaFit V1.0.0.1, Gym and Fitness Management System - " +
                        Singleton.User.UserName + " - " +
                        DateTime.Now.ToString("dd/MM/yyyy") + " - " +
                        ReportUtility.GetEthCalendarFormated(DateTime.Now, "/");
            if (UserRoles.DashboardMgmt == "Visible")
            {
                HeaderText       = "Dashboard";
                CurrentViewModel = DashBoardViewModel;
            }
            else
            {
                HeaderText       = "ስራዎች ማስተዳደሪያ";
                CurrentViewModel = AttendanceListViewModel;
            }

            DeliveryViewModelViewCommand = new RelayCommand(ExecuteDeliveryViewModelViewCommand);
            FollowUpViewModelViewCommand = new RelayCommand(ExecuteFollowUpViewModelViewCommand);
        }
Exemplo n.º 29
0
        private void bootstrapButton1_Click(object sender, EventArgs e)
        {
            var data = gridControl1.DataSource as IList <QuotationDetail>;

            if (data == null || data.Count < 1)
            {
                return;
            }
            var data2 = new List <QuotationDetail>(data);
            var data1 = data[0];

            for (int i = 0; i < 10; i++)
            {
                data2.Add(data1);
            }
            Report.Reportmain report  = new Report.Reportmain();
            IReportUtility    ireprot = new ReportUtility(report);

            ireprot.Binding(report.bindingSource1, data2);
            ireprot.ShowPreview();
        }
Exemplo n.º 30
0
        private void ExecutePrintCommand()
        {
            var    myReport4       = new Reports.Summary.DailyActivity();
            var    myDataSet       = new FitnessDataSet();
            var    selectedCompany = new CompanyService(true).GetCompany();
            var    selectedDate    = DateTime.Now;
            int    serNo           = 1;
            string shift           = EnumUtil.GetEnumDesc(ShiftTypes.Morning);

            if (selectedDate.Hour > 14)
            {
                shift = EnumUtil.GetEnumDesc(ShiftTypes.Afternoon);
            }

            foreach (var itemQuantityDto in ItemsQuantity)
            {
                myDataSet.DailySummaryReport.Rows.Add(
                    serNo,
                    ReportUtility.GetEthCalendarFormated(selectedDate, "-") + "(" +
                    selectedDate.ToShortDateString() + ") - (" + shift + ")",
                    itemQuantityDto.Item.DisplayName,
                    itemQuantityDto.QuantityOnHand,
                    null,
                    null,
                    null,
                    itemQuantityDto.Item.UnitOfMeasure.DisplayName,
                    "",
                    null, null,
                    selectedCompany.Header,
                    SelectedWarehouse.DisplayName);

                serNo++;
            }
            myReport4.SetDataSource(myDataSet);

            new ReportUtil().DirectPrinter(myReport4);
            //var report = new ReportViewerCommon(myReport4);

            //report.Show();
        }