Esempio n. 1
0
        private Reginfo GetConvertedReginfoModel(Reginfo aReginfo)
        {
            Base64Conversion base64Conversion = new Base64Conversion();

            if (!string.IsNullOrEmpty(aReginfo.FatherName) && !base64Conversion.IsLetterEnglish(aReginfo.FatherName))
            {
                aReginfo.FatherName = base64Conversion.EncodeBase64(aReginfo.FatherName);
            }
            if (!string.IsNullOrEmpty(aReginfo.MotherName) && !base64Conversion.IsLetterEnglish(aReginfo.MotherName))
            {
                aReginfo.MotherName = base64Conversion.EncodeBase64(aReginfo.MotherName);
            }
            if (!string.IsNullOrEmpty(aReginfo.SpouseName) && !base64Conversion.IsLetterEnglish(aReginfo.SpouseName))
            {
                aReginfo.SpouseName = base64Conversion.EncodeBase64(aReginfo.SpouseName);
            }
            if (!string.IsNullOrEmpty(aReginfo.PerAddr) && !base64Conversion.IsLetterEnglish(aReginfo.PerAddr))
            {
                aReginfo.PerAddr = base64Conversion.EncodeBase64(aReginfo.PerAddr);
            }
            if (!string.IsNullOrEmpty(aReginfo.PreAddr) && !base64Conversion.IsLetterEnglish(aReginfo.PreAddr))
            {
                aReginfo.PreAddr = base64Conversion.EncodeBase64(aReginfo.PreAddr);
            }
            return(aReginfo);
        }
Esempio n. 2
0
        public object GetCustomerByMphone(string mPhone)
        {
            try
            {
                Base64Conversion base64Conversion = new Base64Conversion();
                var reginfo = (Reginfo)_customerRepository.GetCustomerByMphone(mPhone);
                if (reginfo != null)
                {
                    if (base64Conversion.IsBase64(reginfo.FatherName))
                    {
                        reginfo.FatherName = base64Conversion.DecodeBase64(reginfo.FatherName);
                    }
                    if (base64Conversion.IsBase64(reginfo.MotherName))
                    {
                        reginfo.MotherName = base64Conversion.DecodeBase64(reginfo.MotherName);
                    }
                    if (base64Conversion.IsBase64(reginfo.SpouseName))
                    {
                        reginfo.SpouseName = base64Conversion.DecodeBase64(reginfo.SpouseName);
                    }
                    if (base64Conversion.IsBase64(reginfo.PreAddr))
                    {
                        reginfo.PreAddr = base64Conversion.DecodeBase64(reginfo.PreAddr);
                    }
                    if (base64Conversion.IsBase64(reginfo.PerAddr))
                    {
                        reginfo.PerAddr = base64Conversion.DecodeBase64(reginfo.PerAddr);
                    }
                    //
                    if (base64Conversion.IsBase64(reginfo._FatherNameBangla))
                    {
                        reginfo._FatherNameBangla = base64Conversion.DecodeBase64(reginfo._FatherNameBangla);
                    }
                    if (base64Conversion.IsBase64(reginfo._MotherNameBangla))
                    {
                        reginfo._MotherNameBangla = base64Conversion.DecodeBase64(reginfo._MotherNameBangla);
                    }
                    if (base64Conversion.IsBase64(reginfo._SpouseNameBangla))
                    {
                        reginfo._SpouseNameBangla = base64Conversion.DecodeBase64(reginfo._SpouseNameBangla);
                    }
                    if (base64Conversion.IsBase64(reginfo._PreAddrBangla))
                    {
                        reginfo._PreAddrBangla = base64Conversion.DecodeBase64(reginfo._PreAddrBangla);
                    }
                    if (base64Conversion.IsBase64(reginfo._PerAddrBangla))
                    {
                        reginfo._PerAddrBangla = base64Conversion.DecodeBase64(reginfo._PerAddrBangla);
                    }
                }

                return(reginfo);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
Esempio n. 3
0
        public List <RegInfoReport> GetRegReportByCategory(string fromDate, string toDate, string regSource, string status, string accCategory, string regStatus)
        {
            List <RegInfoReport> regInfoReports   = new List <RegInfoReport>();
            Base64Conversion     base64Conversion = new Base64Conversion();

            regInfoReports = kycRepository.GetRegReportByCategory(fromDate, toDate, regSource, status, accCategory, regStatus);
            foreach (var item in regInfoReports)
            {
                if (base64Conversion.IsBase64(item.PreAddr))
                {
                    item.PreAddr = base64Conversion.DecodeBase64(item.PreAddr);
                }
            }
            return(regInfoReports);
        }
Esempio n. 4
0
        private Reginfo GetConvertedReginfoModel(Reginfo aReginfo)
        {
            Base64Conversion base64Conversion = new Base64Conversion();

            if (!string.IsNullOrEmpty(aReginfo.FatherName) && !base64Conversion.IsLetterEnglish(aReginfo.FatherName))
            {
                aReginfo.FatherName = base64Conversion.EncodeBase64(aReginfo.FatherName);
            }
            if (!string.IsNullOrEmpty(aReginfo.MotherName) && !base64Conversion.IsLetterEnglish(aReginfo.MotherName))
            {
                aReginfo.MotherName = base64Conversion.EncodeBase64(aReginfo.MotherName);
            }
            if (!string.IsNullOrEmpty(aReginfo.SpouseName) && !base64Conversion.IsLetterEnglish(aReginfo.SpouseName))
            {
                aReginfo.SpouseName = base64Conversion.EncodeBase64(aReginfo.SpouseName);
            }
            if (!string.IsNullOrEmpty(aReginfo.PerAddr) && !base64Conversion.IsLetterEnglish(aReginfo.PerAddr))
            {
                aReginfo.PerAddr = base64Conversion.EncodeBase64(aReginfo.PerAddr);
            }
            if (!string.IsNullOrEmpty(aReginfo.PreAddr) && !base64Conversion.IsLetterEnglish(aReginfo.PreAddr))
            {
                aReginfo.PreAddr = base64Conversion.EncodeBase64(aReginfo.PreAddr);
            }
            aReginfo.PhotoId = aReginfo.PhotoId.Trim();
            //if (!string.IsNullOrEmpty(aReginfo._FatherNameBangla) && !base64Conversion.IsLetterEnglish(aReginfo._FatherNameBangla))
            //{
            //	aReginfo._FatherNameBangla = base64Conversion.EncodeBase64(aReginfo._FatherNameBangla);
            //}
            //if (!string.IsNullOrEmpty(aReginfo._MotherNameBangla) && !base64Conversion.IsLetterEnglish(aReginfo._MotherNameBangla))
            //{
            //	aReginfo._MotherNameBangla = base64Conversion.EncodeBase64(aReginfo._MotherNameBangla);
            //}
            //if (!string.IsNullOrEmpty(aReginfo._SpouseNameBangla) && !base64Conversion.IsLetterEnglish(aReginfo._SpouseNameBangla))
            //{
            //	aReginfo._SpouseNameBangla = base64Conversion.EncodeBase64(aReginfo._SpouseNameBangla);
            //}
            //if (!string.IsNullOrEmpty(aReginfo._PerAddrBangla) && !base64Conversion.IsLetterEnglish(aReginfo._PerAddrBangla))
            //{
            //	aReginfo._PerAddrBangla = base64Conversion.EncodeBase64(aReginfo._PerAddrBangla);
            //}
            //if (!string.IsNullOrEmpty(aReginfo._PreAddrBangla) && !base64Conversion.IsLetterEnglish(aReginfo._PreAddrBangla))
            //{
            //	aReginfo._PreAddrBangla = base64Conversion.EncodeBase64(aReginfo._PreAddrBangla);
            //}
            return(aReginfo);
        }
Esempio n. 5
0
        public List <OnlineRegistration> GetOnlineRegReport(string fromDate, string toDate, string category, string accNo, string regStatus, string fromHour, string toHour)
        {
            List <OnlineRegistration> onlineRegistrations = new List <OnlineRegistration>();
            Base64Conversion          base64Conversion    = new Base64Conversion();

            if (fromDate != "null" || toDate != "null")
            {
                fromDate = fromDate + " " + fromHour + ":00";
                toDate   = toDate + " " + toHour + ":00";
            }
            onlineRegistrations = kycRepository.GetOnlineRegReport(fromDate, toDate, category, accNo, regStatus, fromHour, toHour);
            foreach (var item in onlineRegistrations)
            {
                if (base64Conversion.IsBase64(item.Address))
                {
                    item.Address = base64Conversion.DecodeBase64(item.Address);
                }
            }
            return(onlineRegistrations);
        }
 public object GetDistributorByMphone(string mPhone)
 {
     try
     {
         Base64Conversion base64Conversion = new Base64Conversion();
         Reginfo          reginfo          = (Reginfo)_distributorRepository.GetDistributorByMphone(mPhone);
         if (reginfo != null)
         {
             if (base64Conversion.IsBase64(reginfo.FatherName))
             {
                 reginfo.FatherName = base64Conversion.DecodeBase64(reginfo.FatherName);
             }
             if (base64Conversion.IsBase64(reginfo.MotherName))
             {
                 reginfo.MotherName = base64Conversion.DecodeBase64(reginfo.MotherName);
             }
             if (base64Conversion.IsBase64(reginfo.SpouseName))
             {
                 reginfo.SpouseName = base64Conversion.DecodeBase64(reginfo.SpouseName);
             }
             if (base64Conversion.IsBase64(reginfo.PreAddr))
             {
                 reginfo.PreAddr = base64Conversion.DecodeBase64(reginfo.PreAddr);
             }
             if (base64Conversion.IsBase64(reginfo.PerAddr))
             {
                 reginfo.PerAddr = base64Conversion.DecodeBase64(reginfo.PerAddr);
             }
             //
             if (base64Conversion.IsBase64(reginfo._FatherNameBangla))
             {
                 reginfo._FatherNameBangla = base64Conversion.DecodeBase64(reginfo._FatherNameBangla);
             }
             if (base64Conversion.IsBase64(reginfo._MotherNameBangla))
             {
                 reginfo._MotherNameBangla = base64Conversion.DecodeBase64(reginfo._MotherNameBangla);
             }
             if (base64Conversion.IsBase64(reginfo._SpouseNameBangla))
             {
                 reginfo._SpouseNameBangla = base64Conversion.DecodeBase64(reginfo._SpouseNameBangla);
             }
             if (base64Conversion.IsBase64(reginfo._PreAddrBangla))
             {
                 reginfo._PreAddrBangla = base64Conversion.DecodeBase64(reginfo._PreAddrBangla);
             }
             if (base64Conversion.IsBase64(reginfo._PerAddrBangla))
             {
                 reginfo._PerAddrBangla = base64Conversion.DecodeBase64(reginfo._PerAddrBangla);
             }
             if (reginfo.CatId == "AMBD" && reginfo.SchargePer > 0)
             {
                 double?serviceCharge = reginfo.SchargePer;
                 reginfo.SchargePer = serviceCharge * 100;
             }
         }
         return(reginfo);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 7
0
 public static string ToBase64String(this byte[] inArray)
 {
     return(Base64Conversion.ToBase64String(inArray));
 }