コード例 #1
0
        /// <summary>
        /// 根据单位编号获得单位实体类对象
        /// </summary>
        /// <param name="RD_ID"></param>
        /// <returns></returns>
        public static RoadDepart Get_RoadDepartEntity(int RD_ID)
        {
            RoadDepart depart = null;
            string     sqlStr = "select * from R_RoadDepart where RD_ID=" + RD_ID;
            DataTable  dt     = DBHelper.GetDataSet(sqlStr);

            if (dt != null && dt.Rows.Count > 0)
            {
                depart             = new RoadDepart();
                depart.RD_ID       = RD_ID;
                depart.RD_Name     = dt.Rows[0]["RD_Name"].ToString();
                depart.RD_Manager  = dt.Rows[0]["RD_Manager"].ToString();
                depart.RD_Phone    = dt.Rows[0]["RD_Phone"].ToString();
                depart.RD_Fax      = dt.Rows[0]["RD_Fax"].ToString();
                depart.RD_Email    = dt.Rows[0]["RD_Email"].ToString();
                depart.RD_PostCode = dt.Rows[0]["RD_QQ"].ToString();
                depart.RD_QQ       = dt.Rows[0]["RD_QQ"].ToString();
                int CI_ID = Convert.ToInt32(dt.Rows[0]["RD_City"]);
                depart.RD_City      = CityInfoService.Get_CityInfoEntity(CI_ID);
                depart.RD_Address   = dt.Rows[0]["RD_Address"].ToString();
                depart.RD_Honour    = dt.Rows[0]["RD_Honour"].ToString();
                depart.RD_Slogon    = dt.Rows[0]["RD_Slogon"].ToString();
                depart.RD_Remark    = dt.Rows[0]["RD_Remark"].ToString();
                depart.RD_MainPhoto = dt.Rows[0]["RD_MainPhoto"].ToString();
                depart.RD_ViewPhoto = dt.Rows[0]["RD_ViewPhoto"].ToString();
                depart.RD_Logo      = dt.Rows[0]["RD_Logo"].ToString();
                depart.RD_Report    = dt.Rows[0]["RD_Report"].ToString();
            }
            return(depart);
        }
コード例 #2
0
        public ActionResult CityInfoBlock(int id)
        {
            var block = CityInfoService.GetValues(id, x => x.Description);
            var model = new BaseVM {
                Title     = "Блок города справа",
                RightSide = _.List(new PagePart(Htmls2.Cham(block)))
            };

            return(ViewWithBaseVM(model));
        }
コード例 #3
0
        //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;
            }
        }