Ejemplo n.º 1
0
        public List <CountryInfo> GetAllCountryInfo()
        {
            try
            {
                List <CountryInfo> OBJ_LIST_CountryInfo = new List <CountryInfo>();
                var _ListCountryInfo = _IUoW.Repository <CountryInfo>().Get(x => x.AuthStatusId == "A" && x.LastAction != "DEL").OrderByDescending(x => x.CountryId);
                foreach (var item in _ListCountryInfo)
                {
                    CountryInfo         OBJ_CountryInfo         = new CountryInfo();
                    CurrencyInfoService OBJ_CurrencyInfoService = new CurrencyInfoService();

                    OBJ_CountryInfo.CountryId       = item.CountryId;
                    OBJ_CountryInfo.CountryNm       = item.CountryNm;
                    OBJ_CountryInfo.CountryShortNm  = item.CountryShortNm;
                    OBJ_CountryInfo.ISOCode         = item.ISOCode;
                    OBJ_CountryInfo.CBCode          = item.CBCode;
                    OBJ_CountryInfo.NationalityName = item.NationalityName;
                    OBJ_CountryInfo.CurrencyId      = item.CurrencyId;
                    foreach (var item1 in OBJ_CurrencyInfoService.GetCurrencyInfoForDD())
                    {
                        if (item1.Value == OBJ_CountryInfo.CurrencyId)
                        {
                            OBJ_CountryInfo.CurrencyNm = item1.Text;
                        }
                    }
                    OBJ_CountryInfo.NativeCountryFlag = item.NativeCountryFlag;
                    OBJ_CountryInfo.AuthStatusId      = item.AuthStatusId;
                    OBJ_CountryInfo.LastAction        = item.LastAction;
                    OBJ_CountryInfo.LastUpdateDT      = item.LastUpdateDT;
                    OBJ_CountryInfo.MakeBy            = item.MakeBy;
                    OBJ_CountryInfo.MakeDT            = item.MakeDT;
                    OBJ_CountryInfo.TransDT           = item.TransDT;
                    OBJ_LIST_CountryInfo.Add(OBJ_CountryInfo);
                }
                return(OBJ_LIST_CountryInfo);
            }
            catch (Exception ex)
            {
                _ObjErrorLogService = new ErrorLogService();
                _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllCountryInfo()", string.Empty);
                return(null);
            }
        }
Ejemplo n.º 2
0
        public List <BranchInfo> GetAllBranchInfo()
        {
            try
            {
                List <BranchInfo> OBJ_LIST_BranchInfo = new List <BranchInfo>();
                var _ListBranchInfo = _IUoW.Repository <BranchInfo>().Get(x => x.AuthStatusId == "A" && x.LastAction != "DEL").OrderByDescending(x => x.BranchId);
                foreach (var item in _ListBranchInfo)
                {
                    BranchInfo          OBJ_BranchInfo          = new BranchInfo();
                    CurrencyInfoService OBJ_CurrencyInfoService = new CurrencyInfoService();
                    CityInfoService     OBJ_CityInfoService     = new CityInfoService();
                    DistrictInfoService OBJ_DistrictInfoService = new DistrictInfoService();
                    DivisionInfoService OBJ_DivisionInfoService = new DivisionInfoService();
                    CountryInfoService  OBJ_CountryInfoService  = new CountryInfoService();
                    PSInfoService       OBJ_PSInfoService       = new PSInfoService();

                    OBJ_BranchInfo.BranchId      = item.BranchId;
                    OBJ_BranchInfo.BranchNm      = item.BranchNm;
                    OBJ_BranchInfo.BranchShortNm = item.BranchShortNm;
                    OBJ_BranchInfo.CurrencyId    = item.CurrencyId;
                    foreach (var item1 in OBJ_CurrencyInfoService.GetCurrencyInfoForDD())
                    {
                        if (item1.Value == OBJ_BranchInfo.CurrencyId)
                        {
                            OBJ_BranchInfo.CurrencyNm = item1.Text;
                        }
                    }
                    OBJ_BranchInfo.BranchClosedFlag         = item.BranchClosedFlag;
                    OBJ_BranchInfo.BranchGrade              = item.BranchGrade;
                    OBJ_BranchInfo.BranchClosedDate         = item.BranchClosedDate;
                    OBJ_BranchInfo.BranchIdCBClearing       = item.BranchIdCBClearing;
                    OBJ_BranchInfo.BranchIdCBCL             = item.BranchIdCBCL;
                    OBJ_BranchInfo.BranchIdCBSBS            = item.BranchIdCBSBS;
                    OBJ_BranchInfo.BranchIdCBCIB            = item.BranchIdCBCIB;
                    OBJ_BranchInfo.BranchIdCBADFX           = item.BranchIdCBADFX;
                    OBJ_BranchInfo.BranchIdCBCTR            = item.BranchIdCBCTR;
                    OBJ_BranchInfo.ControllingBRCSHFlag     = item.ControllingBRCSHFlag;
                    OBJ_BranchInfo.ControllingBRCLGFlag     = item.ControllingBRCLGFlag;
                    OBJ_BranchInfo.RuralBranchFlag          = item.RuralBranchFlag;
                    OBJ_BranchInfo.UrbanBranchFlag          = item.UrbanBranchFlag;
                    OBJ_BranchInfo.InsuranceVaultCashFlag   = item.InsuranceVaultCashFlag;
                    OBJ_BranchInfo.InsuranceTransitCashFlag = item.InsuranceTransitCashFlag;
                    OBJ_BranchInfo.Address1 = item.Address1;
                    OBJ_BranchInfo.Address2 = item.Address2;
                    OBJ_BranchInfo.CityId   = item.CityId;
                    foreach (var item1 in OBJ_CityInfoService.GetCityInfoForDD())
                    {
                        if (item1.Value == OBJ_BranchInfo.CityId)
                        {
                            OBJ_BranchInfo.CityNm = item1.Text;
                        }
                    }
                    OBJ_BranchInfo.DistrictId = item.DistrictId;
                    foreach (var item1 in OBJ_DistrictInfoService.GetDistrictInfoForDD())
                    {
                        if (item1.Value == OBJ_BranchInfo.DistrictId)
                        {
                            OBJ_BranchInfo.DistrictNm = item1.Text;
                        }
                    }
                    OBJ_BranchInfo.DivisionId = item.DivisionId;
                    foreach (var item1 in OBJ_DivisionInfoService.GetDivisionInfoForDD())
                    {
                        if (item1.Value == OBJ_BranchInfo.DivisionId)
                        {
                            OBJ_BranchInfo.DivisionNm = item1.Text;
                        }
                    }
                    OBJ_BranchInfo.CountryId = item.CountryId;
                    foreach (var item1 in OBJ_CountryInfoService.GetCountryInfoForDD())
                    {
                        if (item1.Value == OBJ_BranchInfo.CountryId)
                        {
                            OBJ_BranchInfo.CountryNm = item1.Text;
                        }
                    }
                    OBJ_BranchInfo.PoliceStationId = item.PoliceStationId;
                    foreach (var item1 in OBJ_PSInfoService.GetPSInfoForDD())
                    {
                        if (item1.Value == OBJ_BranchInfo.PoliceStationId)
                        {
                            OBJ_BranchInfo.PoliceStationNm = item1.Text;
                        }
                    }
                    OBJ_BranchInfo.Phone        = item.Phone;
                    OBJ_BranchInfo.FAX          = item.FAX;
                    OBJ_BranchInfo.TELEX        = item.TELEX;
                    OBJ_BranchInfo.SWIFT        = item.SWIFT;
                    OBJ_BranchInfo.Email        = item.Email;
                    OBJ_BranchInfo.ZipCode      = item.ZipCode;
                    OBJ_BranchInfo.AuthStatusId = item.AuthStatusId;
                    OBJ_BranchInfo.LastAction   = item.LastAction;
                    OBJ_BranchInfo.LastUpdateDT = item.LastUpdateDT;
                    OBJ_BranchInfo.MakeBy       = item.MakeBy;
                    OBJ_BranchInfo.MakeDT       = item.MakeDT;
                    OBJ_BranchInfo.TransDT      = item.TransDT;
                    OBJ_LIST_BranchInfo.Add(OBJ_BranchInfo);
                }
                return(OBJ_LIST_BranchInfo);
            }
            catch (Exception ex)
            {
                _ObjErrorLogService = new ErrorLogService();
                _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllBranchInfo()", string.Empty);
                return(null);
            }
        }