コード例 #1
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");
            }
        }
コード例 #2
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");
            }
        }
コード例 #3
0
        /// <summary>
        /// 根据条件查询数据
        /// </summary>
        private void PecSettingDataBind()
        {
            try
            {
                GetDataOfPeccancyAreaSetting();
                if (Session["dataTable"] != null)
                {
                    DataTable            table = (DataTable)Session["dataTable"];
                    System.Data.DataView dv2   = new System.Data.DataView(table);
                    DataTable            dt3   = dv2.ToTable(true, new string[] { "col1", "col10" });
                    StoreStartStation.DataSource = dt3;
                    StoreStartStation.DataBind();

                    System.Data.DataView dv = new System.Data.DataView(table);
                    dv.RowFilter = Getwhere();
                    StorePecAreasetting.DataSource = dv;
                    StorePecAreasetting.DataBind();
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PeccancyAreaSetting.aspx-PecSettingDataBind", ex.Message + ";" + ex.StackTrace, "PecSettingDataBind has an exception");
            }
        }
コード例 #4
0
        /// <summary>
        /// Pecs the setting data bind.
        /// </summary>
        /// <returns></returns>
        private void PecSettingDataBind()
        {
            DataTable dt = tgsPproperty.GetPeccancyAreaSetting(Getwhere());

            //for (int i = 0; i < dt.Rows.Count; i++)
            //{
            //    dt.Rows[i]["col5"] = dt.Rows[i]["col5"].ToString() + "Km/h";
            //    dt.Rows[i]["col6"] = dt.Rows[i]["col6"].ToString() + "Km/h";
            //    dt.Rows[i]["col7"] = dt.Rows[i]["col7"].ToString() + "Km/h";
            //    dt.Rows[i]["col8"] = dt.Rows[i]["col8"].ToString() + "Km/h";
            //    dt.Rows[i]["col9"] = dt.Rows[i]["col9"].ToString() + "Km/h";
            //}
            StorePecAreasetting.DataSource = dt;
            StorePecAreasetting.DataBind();
        }