示例#1
0
        /// <summary>
        /// 初始化绑定数据
        /// </summary>
        private void StoreDataBind()
        {
            try
            {
                DataTable da = tgsPproperty.GetCommonDict("240034");
                if (da != null)
                {
                    this.StoreUseType.DataSource = da;
                    this.StoreUseType.DataBind();
                }

                this.cmbUse.SelectedIndex = 1;
                DataTable dt = tgsPproperty.GetPeccancyType();
                if (dt != null)
                {
                    StorePecType.DataSource = dt;
                    StorePecType.DataBind();
                    if (dt.Rows.Count > 0)
                    {
                        SelectFirst(dt.Rows[0]);
                    }
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PeccancyType.aspx-StoreDataBind", ex.Message + ";" + ex.StackTrace, "StoreDataBind has an exception");
            }
        }
        /// <summary>
        /// 查询所有违法类型
        /// </summary>
        private void GetPeccancyData()
        {
            DataTable dt = tgsPproperty.GetPeccancyTypeSetting("1=1");

            StorePecType.DataSource = dt;
            StorePecType.DataBind();
        }
示例#3
0
        /// <summary>
        /// 查询方法
        /// </summary>
        /// <param name="where"></param>
        /// <param name="startNum"></param>
        /// <param name="endNum"></param>
        private void Query(string where, int startNum, int endNum)
        {
            try
            {
                DataTable dt = tgsPproperty.GetPeccancyTypeNew(Getwhere(), startNum, endNum);
                if (dt != null)
                {
                    StorePecType.DataSource = dt;
                    StorePecType.DataBind();
                }

                if (dt != null && dt.Rows.Count > 0)
                {
                    this.lblCurpage.Text   = curpage.Value.ToString();
                    this.lblAllpage.Text   = allPage.Value.ToString();
                    this.lblRealcount.Text = realCount.Value.ToString();
                }
                else
                {
                    this.lblCurpage.Text   = "1";
                    this.lblAllpage.Text   = "0";
                    this.lblRealcount.Text = "0";
                    Notice(GetLangStr("PeccancyType7", "信息提示"), GetLangStr("PeccancyType8", "未查询到相关记录"));
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PeccancyType.aspx-Query", ex.Message + ";" + ex.StackTrace, "Query has an exception");
            }
        }
        /// <summary>
        /// 初始化绑定数据
        /// </summary>
        private void StoreDataBind()
        {
            this.StoreUseType.DataSource = tgsPproperty.GetCommonDict("240034");
            this.StoreUseType.DataBind();

            DataTable dt = tgsPproperty.GetPeccancyTypeSetting("1=1");

            if (dt != null && dt.Rows.Count > 0)
            {
                StorePecType.DataSource = dt;
                StorePecType.DataBind();
            }
            this.StorePeccancyType.DataSource = tgsPproperty.GetPeccancyType("isuse='1'");
            this.StorePeccancyType.DataBind();
        }