Exemple #1
0
        public MtCbsinfo ConvertBatchUpdateParameterToMtCbsinfoModel(BatchUpdateModel model)
        {
            MtCbsinfo            aMtCbsinfo = null;
            StringBuilderService builder    = new StringBuilderService();

            var changeBy = builder.ExtractText(Convert.ToString(model.Param), "changeby", "}");

            aMtCbsinfo = new MtCbsinfo
            {
                Mphone      = builder.ExtractText(Convert.ToString(model.Param), "mobnum", ","),
                Custid      = builder.ExtractText(Convert.ToString(model.Param), "custid", ","),
                Name        = builder.ExtractText(Convert.ToString(model.Param), "name", ","),
                Accno       = builder.ExtractText(Convert.ToString(model.Param), "accno", ","),
                Branch      = builder.ExtractText(Convert.ToString(model.Param), "branch", ","),
                Class       = builder.ExtractText(Convert.ToString(model.Param).ToLower(), "class", ","),
                Frozen      = builder.ExtractText(Convert.ToString(model.Param), "frozen", ","),
                Dorm        = builder.ExtractText(Convert.ToString(model.Param), "dorm", ","),
                Mobnum      = builder.ExtractText(Convert.ToString(model.Param), "mobnum", ","),
                Nationid    = builder.ExtractText(Convert.ToString(model.Param), "nationid", "}"),
                Accstat     = builder.ExtractText(Convert.ToString(model.Param), "accstat", ","),
                MakeStatus  = "A",
                EntryBy     = changeBy,
                MakeBy      = changeBy,
                CheckStatus = "P"
            };

            return(aMtCbsinfo);
        }
Exemple #2
0
        public object SendVeriCodeToEmailAfterChecking([FromBody] ForgotPassReset forgotPassResetModel)
        {
            try
            {
                if (emailService.IsCheckExist(forgotPassResetModel))
                {
                    Email objEmail = new Email();
                    objEmail.EMAIL    = forgotPassResetModel.OfficialEmail;
                    objEmail.TEMPLETE = "1";
                    //objEmail.DATA1 = "Email Verification Code for OK Wallet Application User";


                    StringBuilderService stringBuilderService = new StringBuilderService();
                    int    randromNumber = stringBuilderService.RandomNumber(1000, 9999);
                    string md5Password   = stringBuilderService.GenerateMD5Hash(randromNumber.ToString());
                    objEmail.DATA1 = randromNumber.ToString();
                    //objEmail.DATA2 = "Your email verification code for OK Wallet Application User is : " + randromNumber.ToString();
                    emailService.SendVeriCodeToEmail(objEmail);
                    return(md5Password);
                }
                else
                {
                    return("");
                }
            }
            catch (Exception ex)
            {
                return(errorLogService.InsertToErrorLog(ex, MethodBase.GetCurrentMethod().Name, Request.Headers["UserInfo"].ToString()));
            }
        }
        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());
            }
        }
        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));
        }
        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());
            }
        }
        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());
            }
        }
Exemple #7
0
        public List <MtCbsinfo> ConvertBatchUpdateModelToMtCbsinfoModelForCheck(BatchUpdateModel model)
        {
            MtCbsinfo            aMtCbsinfo = null;
            StringBuilderService builder    = new StringBuilderService();
            List <MtCbsinfo>     mtCbsinfos = new List <MtCbsinfo>();
            var changeBy = model.Param;

            foreach (var item in model.List)
            {
                aMtCbsinfo = new MtCbsinfo
                {
                    Mphone      = item.MOBNUM,
                    Custid      = item.CUSTID,
                    Name        = item.NAME,
                    Accno       = item.ACCNO,
                    Branch      = item.BRANCH,
                    Mobnum      = item.MOBNUM,
                    Nationid    = item.NATIONID,
                    Accstat     = item.ACCSTAT,
                    CheckBy     = changeBy,
                    CheckTime   = DateTime.Now,
                    CheckStatus = item.CHECK_STATUS
                };
                aMtCbsinfo.MakeStatus = item.MAKE_STATUS == "Active" ? "A" : "I";
                aMtCbsinfo.Status     = item.STATUS == "Active" ? "A" : "I";
                aMtCbsinfo.Frozen     = item.FROZEN == "Yes" ? "Y" : "N";
                aMtCbsinfo.Dorm       = item.DORM == "Yes" ? "A" : "N";

                mtCbsinfos.Add(aMtCbsinfo);
            }
            return(mtCbsinfos);
        }
        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 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 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 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));
        }
        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));
        }
Exemple #13
0
 public GenerateScriptModule(MssqlDbService mssqlDbService, PgDbService pgDbService, StringBuilderService stringBuilderService, IOptions <TableOptions> tableOptions, IOptions <MssqlConnectOptions> mssqlConnectOptions)
 {
     _mssqlDbService       = mssqlDbService;
     _pgDbService          = pgDbService;
     _stringBuilderService = stringBuilderService;
     _mssqlConnectOptions  = mssqlConnectOptions.Value;
     _tableOptions         = tableOptions.Value;
 }
Exemple #14
0
 public object GetMd5Password(string verificationCode)
 {
     try
     {
         StringBuilderService stringBuilderService = new StringBuilderService();
         string md5Password = stringBuilderService.GenerateMD5Hash(verificationCode);
         return(md5Password);
     }
     catch (Exception ex)
     {
         return(errorLogService.InsertToErrorLog(ex, MethodBase.GetCurrentMethod().Name, Request.Headers["UserInfo"].ToString()));
     }
 }
Exemple #15
0
 private object ChangePassword(DisbursementUser userDetails, ChangePasswordModel model)
 {
     try
     {
         StringBuilderService stringBuilderService = new StringBuilderService();
         userDetails.Md5Password   = stringBuilderService.GenerateMD5Hash(model.NewPassword);
         userDetails.Sha1Password  = stringBuilderService.GenerateSha1Hash(model.NewPassword);
         userDetails.SecurityStamp = Guid.NewGuid().ToString();
         userDetails.Pstatus       = "Y";
         return(Save(userDetails));
     }
     catch (Exception ex)
     {
         return(errorLogService.InsertToErrorLog(ex, MethodBase.GetCurrentMethod().Name, Request.Headers["UserInfo"].ToString()));
     }
 }
        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());
            }
        }
Exemple #17
0
        // private bool validatePassword(DisbursementUser userDetails, ChangePasswordModel model)
        private string validatePassword(DisbursementUser userDetails, ChangePasswordModel model)
        {
            try
            {
                StringBuilderService stringBuilderService = new StringBuilderService();

                if (userDetails.Sha1Password == stringBuilderService.GenerateSha1Hash(model.OldPassword))
                {
                    //add more validation
                    PasswordPolicy objPasswordPolicy = disbursementUserService.GetPasswordPolicy();
                    if (model.NewPassword.Length < objPasswordPolicy.PassMinLength)
                    {
                        return("Password can't less than " + objPasswordPolicy.PassMinLength.ToString() + " characters");
                    }
                    else if (model.NewPassword.Length > objPasswordPolicy.PassMaxLength)
                    {
                        return("Password can't more than " + objPasswordPolicy.PassMaxLength.ToString() + " characters");
                    }
                    else if (objPasswordPolicy.PassAlphaLower == "Y" && !model.NewPassword.Any(char.IsLower))
                    {
                        return("Password must contain a lower case letter");
                    }
                    else if (objPasswordPolicy.PassAlphaUpper == "Y" && !model.NewPassword.Any(char.IsUpper))
                    {
                        return("Password must contain a upper case letter");
                    }
                    else if (objPasswordPolicy.PassNumber == "Y" && !model.NewPassword.Any(char.IsDigit))
                    {
                        return("Password must contain a digit");
                    }
                    else if (objPasswordPolicy.PassSpecialChar == "Y" && !model.NewPassword.Any(ch => !char.IsLetterOrDigit(ch)))
                    {
                        return("Password must contain a special character");
                    }
                    return("Valid");
                }

                return("Invalid");
            }
            catch (Exception ex)
            {
                errorLogService.InsertToErrorLog(ex, MethodBase.GetCurrentMethod().Name, Request.Headers["UserInfo"].ToString());
                throw;
            }
        }
Exemple #18
0
        private MerchantUser generateSecuredCredentials(MerchantUser model)
        {
            try
            {
                StringBuilderService stringBuilderService = new StringBuilderService();
                model.PlainPassword = model.PlainPassword;
                model.Md5Password   = stringBuilderService.GenerateMD5Hash(model.PlainPassword);
                model.Sha1Password  = stringBuilderService.GenerateSha1Hash(model.PlainPassword);
                model.SecurityStamp = Guid.NewGuid().ToString();

                return(model);
            }
            catch (Exception ex)
            {
                errorLogService.InsertToErrorLog(ex, MethodBase.GetCurrentMethod().Name, Request.Headers["UserInfo"].ToString());
                throw;
            }
        }
        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));
        }
Exemple #20
0
        private bool validatePasswordForClient(MerchantUser userDetails, ChangePasswordModel model)
        {
            try
            {
                StringBuilderService stringBuilderService = new StringBuilderService();

                if (userDetails.Sha1Password == stringBuilderService.GenerateSha1Hash(model.OldPassword))
                {
                    return(true);
                }

                return(false);
            }
            catch (Exception ex)
            {
                errorLogService.InsertToErrorLog(ex, MethodBase.GetCurrentMethod().Name, Request.Headers["UserInfo"].ToString());
                throw;
            }
        }
Exemple #21
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;
            }
        }
        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));
        }
Exemple #23
0
        public object SendVeriCodeToEmail(string toEmailId)
        {
            try
            {
                Email objEmail = new Email();
                objEmail.EMAIL    = toEmailId;
                objEmail.TEMPLETE = "1";
                //objEmail.DATA1 = "Email verification code";

                StringBuilderService stringBuilderService = new StringBuilderService();
                int    randromNumber = stringBuilderService.RandomNumber(1000, 9999);
                string md5Password   = stringBuilderService.GenerateMD5Hash(randromNumber.ToString());
                objEmail.DATA1 = randromNumber.ToString();
                //objEmail.DATA2 = "Your email verification code: " + randromNumber.ToString();
                emailService.SendVeriCodeToEmail(objEmail);
                return(md5Password);
            }
            catch (Exception ex)
            {
                return(errorLogService.InsertToErrorLog(ex, MethodBase.GetCurrentMethod().Name, Request.Headers["UserInfo"].ToString()));
            }
        }
        public object KycBalance(ReportModel model)
        {
            StringBuilderService builder = new StringBuilderService();
            string regStatus             = builder.ExtractText(Convert.ToString(model.ReportOption), "regStatus", "}");
            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 options     = builder.ExtractText(Convert.ToString(model.ReportOption), "options", ",");
            string accCategory = builder.ExtractText(Convert.ToString(model.ReportOption), "accCategory", ",");

            List <KycBalance> kycBalances  = service.GetKycBalance(regStatus, fromDate, toDate, accNo, options, accCategory);
            ReportViewer      reportViewer = new ReportViewer();

            reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTKycBalance.rdlc");              //Request.RequestUri("");
            reportViewer.LocalReport.SetParameters(GetKycBalanceRptParameter(regStatus, fromDate, toDate, accNo, options, accCategory));
            ReportDataSource A = new ReportDataSource("KycBalance", kycBalances);

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

            return(reportUtility.GenerateReport(reportViewer, model.FileType));
        }
        public object AgentInformation(ReportModel model)
        {
            StringBuilderService builder = new StringBuilderService();
            string accCategorySub        = builder.ExtractText(Convert.ToString(model.ReportOption), "subAccCategory", ",");
            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", ",");
            string accCategory = builder.ExtractText(Convert.ToString(model.ReportOption), "accCategory", "}");


            List <AgentInformation> registrationReports = service.GetAgentInfo(fromDate, toDate, options, accCategory, accCategorySub);
            ReportViewer            reportViewer        = new ReportViewer();

            reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTAgentInformation.rdlc");              //Request.RequestUri("");
            reportViewer.LocalReport.SetParameters(GetKycInformationRptParameter(fromDate, toDate, options, accCategory));
            ReportDataSource A = new ReportDataSource("AgentInformation", registrationReports);

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

            return(reportUtility.GenerateReport(reportViewer, model.FileType));
        }
Exemple #26
0
        public object DailySumReport(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);
                var childMerchantCode = chainMerchantService.GetChainMerchantCodeByMphone(mphone);


                List <OutletDailySummaryTransaction> merchantTransactionList = new List <OutletDailySummaryTransaction>();

                merchantTransactionList = childMerchantService.ChildMerDailySumReport(mphone, childMerchantCode, fromDate, toDate, dateType).ToList();

                string       merchantName = merchantTransactionList[0].OutletName;
                string       merchantCode = merchantTransactionList[0].OutletId;
                ReportViewer reportViewer = new ReportViewer();

                reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTChildOutletDailySummaryTrans.rdlc");
                reportViewer.LocalReport.SetParameters(GetReportParameterDailySumReport(mphone, fromDate, toDate, merchantName, merchantCode));
                ReportDataSource A = new ReportDataSource("OutletDailyTransaction", merchantTransactionList);
                reportViewer.LocalReport.DataSources.Add(A);


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

                return(reportUtility.GenerateReport(reportViewer, model.FileType));
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Exemple #27
0
        public List <MtCbsinfo> ConvertBatchUpdateModelToMtCbsinfoModel(BatchUpdateModel model)
        {
            MtCbsinfo            aMtCbsinfo = null;
            StringBuilderService builder    = new StringBuilderService();
            List <MtCbsinfo>     mtCbsinfos = new List <MtCbsinfo>();
            var changeBy = builder.ExtractText(Convert.ToString(model.Param), "changeby", "}");
            var ubranch  = builder.ExtractText(Convert.ToString(model.Param), "ubranch", ",");

            foreach (var item in model.List)
            {
                aMtCbsinfo = new MtCbsinfo
                {
                    Mphone      = item.mobnum,
                    Custid      = item.custid,
                    Name        = item.name,
                    Accno       = item.accno,
                    Branch      = item.branch,
                    Class       = builder.ExtractText(Convert.ToString(item), "class", ","),
                    Frozen      = item.frozen,
                    Dorm        = item.dorm,
                    Mobnum      = item.mobnum,
                    Nationid    = item.nationid,
                    Accstat     = item.accstat,
                    EntryBy     = changeBy,
                    MakeBy      = changeBy,
                    Ubranch     = ubranch,
                    CheckStatus = "P"
                };
                if (item.status != null)
                {
                    aMtCbsinfo.Status = item.status;
                }
                aMtCbsinfo.MakeStatus = item.make_status_dump == 1 ? "A" : "I";
                mtCbsinfos.Add(aMtCbsinfo);
            }
            return(mtCbsinfos);
        }
Exemple #28
0
        public byte[] AuditTrailReport(ReportModel model)
        {
            StringBuilderService builder = new StringBuilderService();
            string branchCode            = builder.ExtractText(Convert.ToString(model.ReportOption), "branchCode", ",");
            string user       = builder.ExtractText(Convert.ToString(model.ReportOption), "user", ",");
            string parentMenu = builder.ExtractText(Convert.ToString(model.ReportOption), "parentMenu", ",");
            string action     = builder.ExtractText(Convert.ToString(model.ReportOption), "action", ",");
            string fromDate   = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
            string toDate     = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ",");
            string auditId    = builder.ExtractText(Convert.ToString(model.ReportOption), "auditId", "}");

            List <AuditTrailReport> auditTrailReports = reportShareService.GetAuditTrailReport(branchCode, user, parentMenu, action, fromDate, toDate, auditId);
            ReportViewer            reportViewer      = new ReportViewer();

            reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTAuditTrail.rdlc");              //Request.RequestUri("");
            reportViewer.LocalReport.SetParameters(GetAuditTrailReportParameter(branchCode, user, parentMenu, action, fromDate, toDate, auditId));
            ReportDataSource A = new ReportDataSource("AuditTrail", auditTrailReports);

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

            return(reportUtility.GenerateReport(reportViewer, model.FileType));
        }
Exemple #29
0
        public byte[] ApplicationUserReport(ReportModel model)
        {
            StringBuilderService builder = new StringBuilderService();
            string branchCode            = builder.ExtractText(Convert.ToString(model.ReportOption), "branchCode", ",");
            string userName = builder.ExtractText(Convert.ToString(model.ReportOption), "userName", ",");
            string name     = builder.ExtractText(Convert.ToString(model.ReportOption), "name", ",");
            string mobileNo = builder.ExtractText(Convert.ToString(model.ReportOption), "mobileNo", ",");
            string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ",");
            string toDate   = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ",");
            string roleName = builder.ExtractText(Convert.ToString(model.ReportOption), "roleName", "}");

            List <ApplicationUserReport> applicationUserReports = reportShareService.GetApplicationUserReports(branchCode, userName, name, mobileNo, fromDate, toDate, roleName);
            ReportViewer reportViewer = new ReportViewer();

            reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTApplicationUser.rdlc");              //Request.RequestUri("");
            reportViewer.LocalReport.SetParameters(GetApplicationUserRptParameter(branchCode, userName, name, mobileNo, fromDate, toDate, roleName));
            ReportDataSource A = new ReportDataSource("ApplicationUserReport", applicationUserReports);

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

            return(reportUtility.GenerateReport(reportViewer, model.FileType));
        }
Exemple #30
0
        public object OutletDetailsTransReport(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");
                }
                List <ChildMerchantTransaction> merchantTransactionList = new List <ChildMerchantTransaction>();
                merchantTransactionList = childMerchantService.GetChildMerchantTransactionReport(mphone, fromDate, toDate).ToList();

                ReportViewer reportViewer = new ReportViewer();

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


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

                return(reportUtility.GenerateReport(reportViewer, model.FileType));
            }
            catch (Exception ex)
            {
                throw;
            }
        }