Example #1
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <returns></returns>
        private void StoreDataBind()
        {
            try
            {
                // 绑定查询条件开始卡口
                StoreStartStation.DataSource = tgsPproperty.GetStartStationInfo();
                StoreStartStation.DataBind();
                // 绑定展示 开始卡口
                StoreStartStationDict.DataSource = tgsPproperty.GetStationInfo("a.station_type_id in (02,03)");
                StoreStartStationDict.DataBind();

                this.StoreShow.DataSource = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240034")); //tgsPproperty.GetCommonDict("240034");
                this.StoreShow.DataBind();
                DataTable dtDirection = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240025"));     // tgsPproperty.GetDirectionDict();
                if (dtDirection.Rows[0][0].ToString().Equals("00"))
                {
                    dtDirection.Rows.RemoveAt(0);
                }
                this.StoreDirection.DataSource = dtDirection;
                this.StoreDirection.DataBind();
                DataTable dt = tgsPproperty.GetPeccancyAreaSetting("1=1");
                StorePecAreasetting.DataSource = dt;
                StorePecAreasetting.DataBind();
                if (dt.Rows.Count > 0)
                {
                    SelectFirst(dt.Rows[0]);
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PeccancyAreaSetting.aspx-DoYes", ex.Message + ";" + ex.StackTrace, "DoYes has an exception");
            }
        }
Example #2
0
        /// <summary>
        /// 数据绑定
        /// </summary>
        private void StoreDataBind()
        {
            try
            {
                DataTable            dt  = GetDataOfPeccancyAreaSetting();
                System.Data.DataView dv  = new System.Data.DataView(dt);
                DataTable            dt3 = dv.ToTable(true, new string[] { "col1", "col10" });

                StoreStartStation.DataSource = dt3;
                StoreStartStation.DataBind();
                StoreStartStationDict.DataSource = tgsPproperty.GetStationInfo("a.station_type_id in (02,03)");
                StoreStartStationDict.DataBind();
                this.StoreShow.DataSource = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240034"));      //tgsPproperty.GetCommonDict("240034");
                this.StoreShow.DataBind();
                this.StoreDirection.DataSource = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240025")); // tgsPproperty.GetDirectionDict();
                this.StoreDirection.DataBind();

                StorePecAreasetting.DataSource = dt;
                StorePecAreasetting.DataBind();
                if (dt.Rows.Count > 0)
                {
                    SelectFirst(dt.Rows[0]);
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PeccancyAreaSetting.aspx-StoreDataBind", ex.Message + ";" + ex.StackTrace, "StoreDataBind has an exception");
            }
        }