Esempio n. 1
0
        //public IEnumerable<ManagerAccProfile> GetAllManager()
        //{
        //    try
        //    {
        //        var AllManagerAccProfile = _IUoW.Repository<ManagerAccProfile>().Get(x => x.AuthStatusId == "A" &&
        //                                                       x.LastAction != "DEL").OrderByDescending(x => x.ManId);
        //        return AllManagerAccProfile;
        //    }
        //    catch (Exception ex)
        //    {
        //        _ObjErrorLogService = new ErrorLogService();
        //        _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllManager()", string.Empty);
        //        return null;
        //    }
        //}
        public List <ManagerAccProfile> GetAllManagerAccProfile()
        {
            try
            {
                List <ManagerAccProfile> OBJ_LIST_ManagerAccProfile = new List <ManagerAccProfile>();
                var _ListManagerAccProfile = _IUoW.Repository <ManagerAccProfile>().Get(x => x.AuthStatusId == "A" && x.LastAction != "DEL").OrderByDescending(x => x.ManId);
                foreach (var item in _ListManagerAccProfile)
                {
                    ManagerAccProfile        OBJ_ManagerAccProfile        = new ManagerAccProfile();
                    ManagerAccProfileService OBJ_ManagerAccProfileService = new ManagerAccProfileService();
                    AccCategoryService       OBJ_AccCategoryService       = new AccCategoryService();
                    ManagerType OBJ_ManagerType = new ManagerType();
                    CustomerAccProfileService OBJ_CustomerAccProfileService = new CustomerAccProfileService();
                    AccStatusSetupService     OBJ_AccStatusSetupService     = new AccStatusSetupService();
                    ManagerTypeService        OBJ_ManagerTypeService        = new ManagerTypeService();
                    ManagerAccProfileService  OBJ_ManagerProfileService     = new ManagerAccProfileService();

                    OBJ_ManagerAccProfile.ManId   = item.ManId;
                    OBJ_ManagerAccProfile.ManType = item.ManType;
                    foreach (var item1 in OBJ_ManagerTypeService.GetManagerTypeForDD())
                    {
                        if (item1.Value == OBJ_ManagerAccProfile.ManType)
                        {
                            OBJ_ManagerAccProfile.ManagerTypeNm = item1.Text;
                        }
                    }
                    OBJ_ManagerAccProfile.ManNm           = item.ManNm;
                    OBJ_ManagerAccProfile.WalletAccountNo = item.WalletAccountNo;
                    OBJ_ManagerAccProfile.AuthStatusId    = item.AuthStatusId;
                    OBJ_ManagerAccProfile.LastAction      = item.LastAction;
                    OBJ_ManagerAccProfile.LastUpdateDT    = item.LastUpdateDT;
                    OBJ_ManagerAccProfile.MakeBy          = item.MakeBy;
                    OBJ_ManagerAccProfile.MakeDT          = item.MakeDT;
                    OBJ_LIST_ManagerAccProfile.Add(OBJ_ManagerAccProfile);
                }
                return(OBJ_LIST_ManagerAccProfile);
            }
            catch (Exception ex)
            {
                _ObjErrorLogService = new ErrorLogService();
                _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllManagerAccProfile()", string.Empty);
                throw ex;
            }
        }
        //public IEnumerable<ChannelAccProfile> GetAllChannelAccProfile()
        //{
        //    try
        //    {
        //        var _ListChannelAccProfile = _IUoW.mTakaDbQuery().GetAllChannelAccProfile_LQ();
        //        return _ListChannelAccProfile;
        //    }
        //    catch (Exception ex)
        //    {
        //        _ObjErrorLogService = new ErrorLogService();
        //        _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllChannelAccProfile()", string.Empty);
        //        return null;
        //    }
        //}
        public List <ChannelAccProfile> GetAllChannelAccProfile()
        {
            try
            {
                List <ChannelAccProfile> OBJ_LIST_ChannelAccProfile = new List <ChannelAccProfile>();
                var _ListChannelAccProfile = _IUoW.Repository <ChannelAccProfile>().Get(x => x.AuthStatusId == "A" && x.LastAction != "DEL").OrderByDescending(x => x.AccountProfileId);
                foreach (var item in _ListChannelAccProfile)
                {
                    ChannelAccProfile         OBJ_ChannelAccProfile         = new ChannelAccProfile();
                    ChannelAccProfileService  OBJ_ChannelAccProfileService  = new ChannelAccProfileService();
                    AccCategoryService        OBJ_AccCategoryService        = new AccCategoryService();
                    AccTypeService            OBJ_AccTypeService            = new AccTypeService();
                    CustomerAccProfileService OBJ_CustomerAccProfileService = new CustomerAccProfileService();
                    CountryInfoService        OBJ_CountryInfoService        = new CountryInfoService();
                    CityInfoService           OBJ_CityInfoService           = new CityInfoService();
                    DistrictInfoService       OBJ_DistrictInfoService       = new DistrictInfoService();
                    PSInfoService             OBJ_PSInfoService             = new PSInfoService();
                    AreaInfoService           OBJ_AreaInfoService           = new AreaInfoService();
                    BankInfoService           OBJ_BankInfoService           = new BankInfoService();
                    BranchInfoService         OBJ_BranchInfoService         = new BranchInfoService();
                    AccStatusSetupService     OBJ_AccStatusSetupService     = new AccStatusSetupService();
                    ManagerTypeService        OBJ_ManagerTypeService        = new ManagerTypeService();
                    ManagerAccProfileService  OBJ_ManagerProfileService     = new ManagerAccProfileService();

                    OBJ_ChannelAccProfile.AccountProfileId = item.AccountProfileId;
                    ////OBJ_ChannelAccProfile.AccountCategoryId = item.AccountCategoryId;
                    ////foreach (var item1 in OBJ_AccCategoryService.GetAccCategoryForDD())
                    ////{
                    ////    if (item1.Value == OBJ_ChannelAccProfile.AccountCategoryId)
                    ////    {
                    ////        OBJ_ChannelAccProfile.AccountCategoryNm = item1.Text;
                    ////    }
                    ////}
                    OBJ_ChannelAccProfile.AccountTypeId = item.AccountTypeId;
                    foreach (var item1 in OBJ_AccTypeService.GetAccTypeForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.AccountTypeId)
                        {
                            OBJ_ChannelAccProfile.AccountTypeNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.WalletAccountNo = item.WalletAccountNo;
                    OBJ_ChannelAccProfile.UserName        = item.UserName;
                    OBJ_ChannelAccProfile.FatherNm        = item.FatherNm;
                    OBJ_ChannelAccProfile.MotherNm        = item.MotherNm;
                    OBJ_ChannelAccProfile.DateofBirth     = item.DateofBirth;
                    OBJ_ChannelAccProfile.NationalityId   = item.NationalityId;
                    OBJ_ChannelAccProfile.Gender          = item.Gender;
                    foreach (var item1 in OBJ_CustomerAccProfileService.GetGender())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.Gender)
                        {
                            OBJ_ChannelAccProfile.GenderNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.TAXIdNo          = item.TAXIdNo;
                    OBJ_ChannelAccProfile.PassportNo       = item.PassportNo;
                    OBJ_ChannelAccProfile.PresentAddress1  = item.PresentAddress1;
                    OBJ_ChannelAccProfile.PresentAddress2  = item.PresentAddress2;
                    OBJ_ChannelAccProfile.PresentCountryId = item.PresentCountryId;
                    foreach (var item1 in OBJ_CountryInfoService.GetCountryInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PresentCountryId)
                        {
                            OBJ_ChannelAccProfile.PresentCountryNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PresentCityId = item.PresentCityId;
                    foreach (var item1 in OBJ_CityInfoService.GetCityInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PresentCityId)
                        {
                            OBJ_ChannelAccProfile.PresentCityNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PresentDistrictId = item.PresentDistrictId;
                    foreach (var item1 in OBJ_DistrictInfoService.GetDistrictInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PresentDistrictId)
                        {
                            OBJ_ChannelAccProfile.PresentDistrictNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PresentPoliceStationId = item.PresentPoliceStationId;
                    foreach (var item1 in OBJ_PSInfoService.GetPSInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PresentPoliceStationId)
                        {
                            OBJ_ChannelAccProfile.PresentPoliceStationNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PresentAreaId = item.PresentAreaId;
                    foreach (var item1 in OBJ_AreaInfoService.GetAreaInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PresentAreaId)
                        {
                            OBJ_ChannelAccProfile.PresentAreaNm = item1.Text;
                        }
                    }
                    //OBJ_ChannelAccProfile.PresentPhoneNo = item.PresentPhoneNo;
                    OBJ_ChannelAccProfile.PermanentAddress1  = item.PermanentAddress1;
                    OBJ_ChannelAccProfile.PermanentAddress2  = item.PermanentAddress2;
                    OBJ_ChannelAccProfile.PermanentCountryId = item.PermanentCountryId;
                    foreach (var item1 in OBJ_CountryInfoService.GetCountryInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PermanentCountryId)
                        {
                            OBJ_ChannelAccProfile.PermanentCountryNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PermanentCityId = item.PermanentCityId;
                    foreach (var item1 in OBJ_CityInfoService.GetCityInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PermanentCityId)
                        {
                            OBJ_ChannelAccProfile.PermanentCityNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PermanentDistrictId = item.PermanentDistrictId;
                    foreach (var item1 in OBJ_DistrictInfoService.GetDistrictInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PermanentDistrictId)
                        {
                            OBJ_ChannelAccProfile.PermanentDistrictNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PermanentPoliceStationId = item.PermanentPoliceStationId;
                    foreach (var item1 in OBJ_PSInfoService.GetPSInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PermanentPoliceStationId)
                        {
                            OBJ_ChannelAccProfile.PermanentPoliceStationNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.PermanentAreaId = item.PermanentAreaId;
                    foreach (var item1 in OBJ_AreaInfoService.GetAreaInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.PermanentAreaId)
                        {
                            OBJ_ChannelAccProfile.PermanentAreaNm = item1.Text;
                        }
                    }
                    //OBJ_ChannelAccProfile.PermanentPhoneNo = item.PermanentPhoneNo;
                    OBJ_ChannelAccProfile.BankId = item.BankId;
                    foreach (var item1 in OBJ_BankInfoService.GetBankInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.BankId)
                        {
                            OBJ_ChannelAccProfile.BankNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.BranchId = item.BranchId;
                    foreach (var item1 in OBJ_BranchInfoService.GetBranchInfoForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.BranchId)
                        {
                            OBJ_ChannelAccProfile.BranchNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.BankAccountNo       = item.BankAccountNo;
                    OBJ_ChannelAccProfile.ParentAccountTypeId = item.ParentAccountTypeId;
                    foreach (var item1 in OBJ_AccTypeService.GetAccTypeForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.ParentAccountTypeId)
                        {
                            OBJ_ChannelAccProfile.ParentAccountTypeNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.ParentAccountProfileId = item.ParentAccountProfileId;
                    foreach (var item1 in OBJ_ChannelAccProfileService.GetChannelAccProfileForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.ParentAccountProfileId)
                        {
                            OBJ_ChannelAccProfile.ParentChannelAccProfileNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.CompanyNm         = item.CompanyNm;
                    OBJ_ChannelAccProfile.Occupation        = item.Occupation;
                    OBJ_ChannelAccProfile.NationalIdNo      = item.NationalIdNo;
                    OBJ_ChannelAccProfile.VatRegistrationNo = item.VatRegistrationNo;
                    OBJ_ChannelAccProfile.AccountStatusId   = item.AccountStatusId;
                    foreach (var item1 in OBJ_AccStatusSetupService.GetAccStatusSetupForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.AccountStatusId)
                        {
                            OBJ_ChannelAccProfile.AccountStatusName = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.TradeLicenseNo = item.TradeLicenseNo;
                    ////OBJ_ChannelAccProfile.ManagerTypeId = item.ManagerTypeId;
                    ////foreach (var item1 in OBJ_ManagerTypeService.GetManagerTypeForDD())
                    ////{
                    ////    if (item1.Value == OBJ_ChannelAccProfile.ManagerTypeId)
                    ////    {
                    ////        OBJ_ChannelAccProfile.ManagerTypeNm = item1.Text;
                    ////    }
                    ////}
                    OBJ_ChannelAccProfile.ManagerAccountProfileId = item.ManagerAccountProfileId;
                    foreach (var item1 in OBJ_ManagerProfileService.GetManagerForDD())
                    {
                        if (item1.Value == OBJ_ChannelAccProfile.ManagerAccountProfileId)
                        {
                            OBJ_ChannelAccProfile.ManagerProfileNm = item1.Text;
                        }
                    }
                    OBJ_ChannelAccProfile.AuthStatusId = item.AuthStatusId;
                    OBJ_ChannelAccProfile.LastAction   = item.LastAction;
                    OBJ_ChannelAccProfile.LastUpdateDT = item.LastUpdateDT;
                    OBJ_ChannelAccProfile.MakeBy       = item.MakeBy;
                    OBJ_ChannelAccProfile.MakeDT       = item.MakeDT;
                    OBJ_ChannelAccProfile.TransDT      = item.TransDT;
                    OBJ_LIST_ChannelAccProfile.Add(OBJ_ChannelAccProfile);
                }
                return(OBJ_LIST_ChannelAccProfile);
            }
            catch (Exception ex)
            {
                _ObjErrorLogService = new ErrorLogService();
                _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllChannelAccProfile()", string.Empty);
                throw ex;
            }
        }