/// <summary>
 /// 查询事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void TbutQueryClick(object sender, DirectEventArgs e)
 {
     try
     {
         if (!string.IsNullOrEmpty(CmbCountType.SelectedItem.Value))
         {
             if (string.IsNullOrEmpty(FieldStation.Value.ToString()))
             {
                 Notice("信息提示", "请在卡口列表中选择卡口");
                 return;
             }
             DataTable dt = tgsDataInfo.GetPasscarCount(CmbCountType.SelectedItem.Value, GetWhere());
             StoreCount.DataSource = dt;
             StoreCount.DataBind();
             Session["passcarcount"] = dt;
             if (dt != null && dt.Rows.Count > 0)
             {
                 ButPie.Hidden = false;
                 string fxbh = dt.Rows[0]["col1"].ToString();
                 string fxmc = dt.Rows[0]["col0"].ToString() + dt.Rows[0]["col2"].ToString();
                 CreateData(dt, fxbh, fxmc, true);
             }
             else
             {
                 Notice("信息提示", "未查询到任何符合条件的信息");
             }
         }
     }
     catch (Exception ex)
     {
         ILog.WriteErrorLog(ex);
         logManager.InsertLogError("PassCarInfoCount.aspx-TbutQueryClick", ex.Message + ";" + ex.StackTrace, "TbutQueryClick has an exception");
     }
 }
        /// <summary>
        /// 查询事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void TbutQueryClick(object sender, DirectEventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(GridData.Value.ToString()))
                {
                    Notice("信息提示", "请选择违法地点!");
                    return;
                }
                if (!string.IsNullOrEmpty(CmbCountType.SelectedItem.Value))
                {
                    string flowdate = DateStartTime.Value.ToString();
                    string ctype    = "1";
                    if (!string.IsNullOrEmpty(GridData.Value.ToString()))
                    {
                        ctype = "0";
                    }

                    DataTable dt = tgsDataInfo.GetPeccancyCount(CmbCountType.SelectedItem.Value, GetWhere(), ctype);
                    StoreCount.DataSource = dt;
                    StoreCount.DataBind();
                    Session["peccancycount"] = dt;
                    if (dt.Rows.Count > 0)
                    {
                        ButPie.Hidden = false;
                        string fxbh = dt.Rows[0]["col0"].ToString();
                        string fxmc = dt.Rows[0]["col1"].ToString();
                        CreateData(dt, fxbh, fxmc, true);
                    }
                    else
                    {
                        Notice("信息提示", "未查询到符合条件的信息");
                    }
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PeccancyCount.aspx-TbutQueryClick", ex.Message + ";" + ex.StackTrace, "TbutQueryClick has an exception");
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 查询事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void TbutQueryClick(object sender, DirectEventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(kakou.Value.ToString()))
         {
             Notice(GetLangStr("AlarmInfoCount30", "信息提示"), GetLangStr("AlarmInfoCount31", "请在卡口列表中选择卡口"));
             return;
         }
         if (!string.IsNullOrEmpty(CmbCountType.SelectedItem.Value))
         {
             string    flowdate = starttime.Substring(0, 10);
             DataTable dt       = tgsDataInfo.GetAlarmCount(CmbCountType.SelectedItem.Value, GetWhere());
             if (dt != null)
             {
                 StoreCount.DataSource = dt;
                 StoreCount.DataBind();
                 Session["alarmcount"] = dt;
                 ButPie.Hidden         = false;
                 if (dt.Rows.Count > 0)
                 {
                     // 默认加载第一条记录并绘制图
                     string fxbh = dt.Rows[0]["col1"].ToString();
                     string fxmc = dt.Rows[0]["col2"].ToString();
                     CreateData(dt, fxbh, fxmc);
                 }
                 else
                 {
                     Notice(GetLangStr("AlarmInfoCount30", "信息提示"), GetLangStr("AlarmInfoCount32", "未查询到符合条件的任何记录!"));
                 }
             }
         }
     }
     catch (Exception ex)
     {
         ILog.WriteErrorLog(ex);
         logManager.InsertLogError("AlarmInfoCount.aspx-TbutQueryClick", ex.Message + ";" + ex.StackTrace, "TbutQueryClick has an exception");
     }
 }