protected void GetItemHistory(string ItemNo, string CustNo) { // get the history data. ds = SqlHelper.ExecuteDataset(connectionString, "pSOEGetItemHist", new SqlParameter("@SearchItemNo", ItemNo), new SqlParameter("@Organization", CustNo), new SqlParameter("@HistoryType", "Summary"), new SqlParameter("@operateMode", "")); if (ds.Tables.Count >= 1) { if (ds.Tables.Count == 1) { // We only go one table back, something is wrong dt = ds.Tables[0]; if (dt.Rows.Count > 0) { lblErrorMessage.Text = "History problem " + ItemNo.ToString() + CustNo.ToString(); MessageUpdatePanel.Update(); } } else { dt = ds.Tables[1]; HistoryGridView.DataSource = dt; HistoryGridView.DataBind(); HistoryUpdatePanel.Update(); if (dt.Rows.Count == 0) { lblSuccessMessage.Text = "No History Found."; MessageUpdatePanel.Update(); } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { HistoryGridView.DataBind(); } }
protected void ApplicationsGridView_SelectedIndexChanged(object sender, EventArgs e) { InfoDetailsView.DataSource = new ApplicationDirectory[] { apps[ApplicationsGridView.SelectedIndex].Directory }; InfoDetailsView.DataBind(); HistoryGridView.DataSource = apps[ApplicationsGridView.SelectedIndex].History; HistoryGridView.DataBind(); }
private void Refresh() { DataTable dt = CourseRegManager.GetClassDetailsInfo(); ddlCourseTrac.DataSource = dt; ddlCourseTrac.DataValueField = "id"; ddlCourseTrac.DataTextField = "TracName"; ddlCourseTrac.DataBind(); ddlCourseTrac.Items.Insert(0, new System.Web.UI.WebControls.ListItem("")); DataTable dts = CourseRegManager.GetAllDaysInfor(""); //ddlDays.DataSource = dts; //ddlDays.DataValueField = "id"; //ddlDays.DataTextField = "TracName"; //ddlDays.DataBind(); //ddlDays.Items.Insert(0, new System.Web.UI.WebControls.ListItem("")); DataTable dtst = StudentManager.GetAllStudentSearch("", "", "", ""); HistoryGridView.DataSource = dtst; HistoryGridView.DataBind(); dgSubSedule.DataSource = null; dgSubSedule.DataBind(); hfID.Value = ""; }
private void FillGrid() { try { string statusThreshold = VSWebBL.SettingBL.SettingsBL.Ins.Getvalue("StatusChangedThreshold"); int time; if (statusThreshold == "") { time = 15; } else { time = Convert.ToInt32(statusThreshold); } DataTable StatusTable = VSWebBL.DashboardBL.DashboardBL.Ins.GetDeviceStatusHistory(time); Session["HistoryTable"] = StatusTable; if (StatusTable.Rows.Count > 0) { if (Session["RestrictedServers"] != "" && Session["RestrictedServers"] != null) { List <int> ServerID = new List <int>(); List <int> LocationID = new List <int>(); DataTable resServers = (DataTable)Session["RestrictedServers"]; foreach (DataRow resser in resServers.Rows) { foreach (DataRow dominorow in StatusTable.Rows) { if (resser["serverid"].ToString() == dominorow["ID"].ToString()) { ServerID.Add(StatusTable.Rows.IndexOf(dominorow)); } } } foreach (int Id in ServerID) { StatusTable.Rows[Id].Delete(); } StatusTable.AcceptChanges(); } HistoryGridView.DataSource = StatusTable; HistoryGridView.DataBind(); } } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } }
public void FillgridfromSession() { if (Session["HistoryTable"] == null || Session["HistoryTable"] == "") { try { string statusThreshold = VSWebBL.SettingBL.SettingsBL.Ins.Getvalue("StatusChangedThreshold"); int time; if (statusThreshold == "") { time = 15; } else { time = Convert.ToInt32(statusThreshold); } DataTable StatusTable = VSWebBL.DashboardBL.DashboardBL.Ins.GetDeviceStatusHistory(time); Session["HistoryTable"] = StatusTable; } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } } if (Session["HistoryTable"] != "" && Session["HistoryTable"] != null) { DataTable StatusTable = Session["HistoryTable"] as DataTable; try { HistoryGridView.DataSource = StatusTable; HistoryGridView.DataBind(); } catch (Exception ex) { Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex); throw ex; } finally { } } }
protected void Page_Load(object sender, EventArgs e) { AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.InvestmentPlatformHistoryEnabled); if (!IsPostBack) { HistoryGridView.EmptyDataText = L1.NODATA; HistoryGridView.DataBind(); TicketsGridView.EmptyDataText = L1.NODATA; TicketsGridView.DataBind(); if (!AppSettings.InvestmentPlatform.ProofsEnabled) { HistoryGridView.Columns.RemoveAt(8); TicketsGridView.Columns.RemoveAt(7); } HistoryGridViewPlaceHolder.Visible = !AppSettings.InvestmentPlatform.LevelsEnabled; TicketsGridViewPlaceHolder.Visible = AppSettings.InvestmentPlatform.LevelsEnabled; } }
protected void HistoryLinkButtonRefresh_Click(object sender, EventArgs e) { HistoryGridView.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { //Append Data HistoryGridView.DataSource = GetGridViewData(); HistoryGridView.DataBind(); }