/// <summary> /// 取得資料 /// </summary> private void LookupDataList() { //----- 宣告:資料參數 ----- SignDataRepository _data = new SignDataRepository(); Dictionary <string, string> search = new Dictionary <string, string>(); try { #region >> 條件篩選 << search.Add("Who", fn_Param.MemberID); #endregion //----- 原始資料:取得所有資料 ----- var query = _data.GetMeetingList(search, out ErrMsg); //----- 資料整理:繫結 ----- lvList.DataSource = query; lvList.DataBind(); //----- 資料整理:顯示分頁(放在DataBind之後) ----- if (query.Rows.Count == 0) { ph_EmptyData.Visible = true; ph_Data.Visible = false; } else { ph_EmptyData.Visible = false; ph_Data.Visible = true; } } catch (Exception) { throw; } finally { _data = null; } }
/// <summary> /// 取得資料 /// </summary> private void LookupDataList() { //----- 宣告:資料參數 ----- SignDataRepository _data = new SignDataRepository(); Dictionary <string, string> search = new Dictionary <string, string>(); try { #region >> 條件篩選 << search.Add("Who", fn_Param.MemberID); search.Add("DataID", Req_DataID); #endregion //----- 原始資料:取得所有資料 ----- var query = _data.GetMeetingList(search, out ErrMsg); //----- 資料整理:繫結 ----- lvList.DataSource = query; lvList.DataBind(); //No data if (query.Rows.Count == 0) { Response.Redirect(FuncPath()); return; } } catch (Exception) { throw; } finally { _data = null; } }