コード例 #1
0
        public JsonResult BusinessDetail(long DemandId)
        {
            var model = _business.GetByKey(DemandId);

            using (var result = new ResponseResult <BusinessDetailModel>())
            {
                var entity = new BusinessDetailModel
                {
                    Id                         = model.Id,
                    Name                       = _userService.GetByKey(model.CreateUserId) == null ? "" : _userService.GetByKey(model.CreateUserId).UserName,
                    Province                   = string.IsNullOrEmpty(model.Province) ? "" : _areaService.GetAreaNamesBy(model.Province),
                    City                       = string.IsNullOrEmpty(model.City) ? "" : _areaService.GetAreaNamesBy(model.City),
                    Region                     = string.IsNullOrEmpty(model.Region) ? "" : _areaService.GetAreaNamesBy(model.Region),
                    DemandType                 = _sysDictionary.GetByKey(model.DemandTypeId) == null ? "" : _sysDictionary.GetByKey(model.DemandTypeId).DisplayName,
                    PublishState               = _sysDictionary.GetByKey(model.PublishStateId) == null ? "" : _sysDictionary.GetByKey(model.PublishStateId).DisplayName,
                    ExpectedDate               = string.IsNullOrEmpty(model.ExpectedDate) ? "" : model.ExpectedDate,
                    ExpectedEndPrice           = model.ExpectedEndPrice,
                    ExpectedStartPrice         = model.ExpectedStartPrice,
                    TimeSlot                   = string.IsNullOrEmpty(model.TimeSlot) ? "" : model.TimeSlot,
                    AcquisitionWeightRangeType = _sysDictionary.GetByKey(model.AcquisitionWeightRangeTypeId) == null ? "" : _sysDictionary.GetByKey(model.AcquisitionWeightRangeTypeId).DisplayName,
                    FirstWeight                = _sysDictionary.GetByKey(model.FirstWeight) == null ? "" : _sysDictionary.GetByKey(model.FirstWeight).DisplayName,
                    Brief                      = string.IsNullOrEmpty(model.Brief) ? "" : model.Brief,
                    CreateTime                 = model.CreateTime
                };

                entity.ReplyList = _business.GetDemandReplyList(DemandId);

                result.IsSuccess = true;
                result.Entity    = entity;
                return(Json(result));
            }
        }
コード例 #2
0
        public JsonResult ModifyBusinessDetail(BusinessDetailModel businessDetailModel)
        {
            businessDetailModel.OptUserId   = UserContext.Current.Id;
            businessDetailModel.OptUserName = UserContext.Current.Name;
            var reg = iBusinessProvider.ModifyBusinessDetail(businessDetailModel);

            return(Json(new Ets.Model.Common.ResultModel(reg.DealFlag, reg.DealMsg), JsonRequestBehavior.DenyGet));
        }
コード例 #3
0
        /// <summary>
        /// 经营户详细信息列表
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public List <BusinessDetailModel> GetBusinessDetail(BusinessInModel info)
        {
            List <BusinessDetailModel> list = null;
            string strProce = "pro_bus_detail";
            List <OracleParameter> aslgList = new List <OracleParameter>();

            aslgList.Add(new OracleParameter("v_comp_code", info.CompCode));
            aslgList.Add(new OracleParameter("v_legalperson", string.IsNullOrEmpty(info.LegalPerson) ? string.Empty : info.LegalPerson));

            aslgList.Add(new OracleParameter("PageSize", info.PageSize));
            aslgList.Add(new OracleParameter("PageIndex", info.PageIndex));

            aslgList.Add(new OracleParameter("v_cur", System.Data.OracleClient.OracleType.Cursor)
            {
                Direction = ParameterDirection.Output
            });

            DataTable dt = OracleHelper.Query(CommandType.StoredProcedure, strProce, aslgList.ToArray());

            if (dt != null)
            {
                if (dt.Rows.Count > 0)
                {
                    list = new List <BusinessDetailModel>();
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        BusinessDetailModel temp = new BusinessDetailModel();
                        temp.BoothNumber = DBNull.Value == dt.Rows[i]["BOOTH_NUMBER"] ? string.Empty : dt.Rows[i]["BOOTH_NUMBER"].ToString();
                        temp.CompName    = DBNull.Value == dt.Rows[i]["biz_name"] ? string.Empty : dt.Rows[i]["biz_name"].ToString();
                        temp.LegalPerson = DBNull.Value == dt.Rows[i]["legal_represent"] ? string.Empty : dt.Rows[i]["legal_represent"].ToString();
                        temp.License     = DBNull.Value == dt.Rows[i]["reg_id"] ? string.Empty : dt.Rows[i]["reg_id"].ToString();
                        temp.Telphone    = DBNull.Value == dt.Rows[i]["tel"] ? string.Empty : dt.Rows[i]["tel"].ToString();

                        list.Add(temp);
                    }
                }
            }
            return(list);
        }