Ejemplo n.º 1
0
        private void InitPage()
        {
            Hashtable ht        = new Hashtable();
            string    fieldName = EnumHelper.GetEnumShowName(typeof(BusinessFieldType), FieldType);

            if (Request["type"] == BusinessType.Vehicle.GetHashCode().ToString())
            {
                // 车辆详细(介绍、价格体系、用户须知)
                VehicleManager vehicleManager = new VehicleManager();
                ht = vehicleManager.GetVehicleInfoByID(Request["id"]);
            }
            else if (Request["type"] == BusinessType.ChargingPies.GetHashCode().ToString())
            {
                // 充电桩/停车场
                ServiceAreaManager chargingPiesManager = new ServiceAreaManager();
                ht = chargingPiesManager.GetInfoByID(Request["id"]);
            }
            else if (Request["type"] == BusinessType.Pits.GetHashCode().ToString())
            {
                // 维修站
                PitsManager pitsManager = new PitsManager();
                ht = pitsManager.GetPitsInfoByID(Request["id"]);
            }
            if (ht != null && ht.Count > 0)
            {
                this.divContent.InnerHtml = ht[fieldName].ToString();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitData()
        {
            Hashtable ht = pitsManager.GetPitsInfoByID(_key);

            if (ht.Count > 0 && ht != null)
            {
                ControlBindHelper.SetWebControls(this.Page, ht);
            }
        }