Example #1
0
        public List <AreaInfo> GetAllAreaInfo()
        {
            try
            {
                List <AreaInfo> OBJ_LIST_AreaInfo = new List <AreaInfo>();
                var             _ListAreaInfo     = _IUoW.Repository <AreaInfo>().Get(x => x.AuthStatusId == "A" && x.LastAction != "DEL").OrderByDescending(x => x.AreaId);
                foreach (var item in _ListAreaInfo)
                {
                    AreaInfo           OBJ_AreaInfo           = new AreaInfo();
                    UpazilaInfoService OBJ_UpazilaInfoService = new UpazilaInfoService();
                    CityInfoService    OBJ_CityInfoService    = new CityInfoService();

                    OBJ_AreaInfo.AreaId      = item.AreaId;
                    OBJ_AreaInfo.AreaNm      = item.AreaNm;
                    OBJ_AreaInfo.AreaShortNm = item.AreaShortNm;
                    OBJ_AreaInfo.UpazilaId   = item.UpazilaId;
                    foreach (var item1 in OBJ_UpazilaInfoService.GetUpazilaInfoForDD())
                    {
                        if (item1.Value == OBJ_AreaInfo.UpazilaId)
                        {
                            OBJ_AreaInfo.UpazilaNm = item1.Text;
                        }
                    }
                    OBJ_AreaInfo.CityId = item.CityId;
                    foreach (var item1 in OBJ_CityInfoService.GetCityInfoForDD())
                    {
                        if (item1.Value == OBJ_AreaInfo.CityId)
                        {
                            OBJ_AreaInfo.CityNm = item1.Text;
                        }
                    }
                    OBJ_AreaInfo.AuthStatusId = item.AuthStatusId;
                    OBJ_AreaInfo.LastAction   = item.LastAction;
                    OBJ_AreaInfo.LastUpdateDT = item.LastUpdateDT;
                    OBJ_AreaInfo.MakeBy       = item.MakeBy;
                    OBJ_AreaInfo.MakeDT       = item.MakeDT;
                    OBJ_AreaInfo.TransDT      = item.TransDT;
                    OBJ_LIST_AreaInfo.Add(OBJ_AreaInfo);
                }
                return(OBJ_LIST_AreaInfo);
            }
            catch (Exception ex)
            {
                _ObjErrorLogService = new ErrorLogService();
                _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllAreaInfo()", string.Empty);
                return(null);
            }
        }
        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);
            }
        }