protected void repeater_ItemCreated(object sender, RepeaterItemEventArgs e) { InterrogationLog log = e.Item.DataItem as InterrogationLog; SmartLabel policeName = e.Item.FindControl("policeName") as SmartLabel; SmartLabel culpritName = e.Item.FindControl("culpritName") as SmartLabel; SmartLabel status = e.Item.FindControl("status") as SmartLabel; DateTimeLabel StartTime = e.Item.FindControl("StartTime") as DateTimeLabel; DateTimeLabel EndTime = e.Item.FindControl("EndTime") as DateTimeLabel; User user = Data.User.Select(log.PoliceId); if (user != null) { policeName.Text = Data.User.Select(log.PoliceId).UserName; } culpritName.Text = HostTag.GetById(log.CulpritId).HostName; StartTime.DisplayValue = log.StartTime; if (log.EndTime != null) { EndTime.DisplayValue = log.EndTime.Value; status.Text = "提审完成"; } else { status.Text = "提审中"; } }
protected void list_ItemCreated(object sender, RepeaterItemEventArgs e) { APLocatorLogView log = e.Item.DataItem as APLocatorLogView; if (log != null) { Anchor apName = e.Item.FindControl("apName") as Anchor; apName.Text = string.Format("{0}[{1}]", log.APName, log.APMac); //apName.Href = PathUtil.ResolveUrl("Objects/Tag.aspx?id=" + log.TagId); Anchor apStatus = e.Item.FindControl("apStatus") as Anchor; if (log.APLocatorStatus == 1) { apStatus.Text = "重现"; } else if (log.APLocatorStatus == 0) { apStatus.Text = "消失"; } DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; writeTime.DisplayValue = log.WriteTime; SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; facilityName.Text = log.FacilityName; SmartLabel coordinatesName = e.Item.FindControl("coordinatesName") as SmartLabel; coordinatesName.Text = log.CoordinatesName; } }
protected void list_ItemCreated(object sender, RepeaterItemEventArgs e) { AlertProcessLog ev = e.Item.DataItem as AlertProcessLog; if (ev != null) { SmartLabel processPerson = e.Item.FindControl("processPerson") as SmartLabel; if (ev.UserId > 0) { processPerson.Text = Data.User.Select(ev.UserId) == null ? "未知" : Data.User.Select(ev.UserId).UserName; } else { processPerson.Text = "未知"; } SmartLabel preocessStatus = e.Item.FindControl("preocessStatus") as SmartLabel; preocessStatus.Text = Misc.GetAlertStatus((AlertStatusType)ev.AlertStatus); SmartLabel changeDes = e.Item.FindControl("changeDes") as SmartLabel; changeDes.Text = ev.ChangeReason; DateTimeLabel changetime = e.Item.FindControl("changetime") as DateTimeLabel; changetime.DisplayValue = ev.UpdateTime; } }
void ReleaseDesignerOutlets() { if (DateTimeLabel != null) { DateTimeLabel.Dispose(); DateTimeLabel = null; } if (HistoriqueImageView != null) { HistoriqueImageView.Dispose(); HistoriqueImageView = null; } if (NumberOfElementsLabel != null) { NumberOfElementsLabel.Dispose(); NumberOfElementsLabel = null; } if (SeekiosNameLabel != null) { SeekiosNameLabel.Dispose(); SeekiosNameLabel = null; } if (TitleNameLabel != null) { TitleNameLabel.Dispose(); TitleNameLabel = null; } }
protected void list_ItemCreated(object sender, RepeaterItemEventArgs e) { DataRowView log = (DataRowView)e.Item.DataItem; if (log != null) { //Img icon = e.Item.FindControl("icon") as Img; Anchor tagName = e.Item.FindControl("tagName") as Anchor; SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; SmartLabel coordinatesName = e.Item.FindControl("coordinatesName") as SmartLabel; SmartLabel isDisappeared = e.Item.FindControl("isDisappeared") as SmartLabel; DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; //icon.Src = CommonExtension.IdentityIcon(Convert.ToInt32(log["TagId"])); tagName.Text = Convert.ToString(log["HostName"]); //tagName.Href = PathUtil.ResolveUrl("TagUsers/TagUser.aspx?id=" + Convert.ToString(log["hostid"]) + "&type=" + (int)_userType); facilityName.Text = Convert.ToString(log["FacilityName"]); coordinatesName.Text = Convert.ToString(log["CoordinatesName"]); if (coordinatesName.Text.Length == 0) { coordinatesName.Text = "离开"; } if (Convert.ToInt32(log["IsDisappeared"]) >= 0) { isDisappeared.Text = ""; } else { isDisappeared.Text = "消失"; } writeTime.DisplayValue = Convert.ToDateTime(log["WriteTime"]); } }
protected void list_ItemCreated(object sender, RepeaterItemEventArgs e) { //AreaEventLogView log = e.Item.DataItem as AreaEventLogView; //---add by tan 2009-10-6---// DataRowView log = (DataRowView)e.Item.DataItem; if (log != null) { Anchor tagName = e.Item.FindControl("tagName") as Anchor; SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; SmartLabel areaName = e.Item.FindControl("areaName") as SmartLabel; SmartLabel areaEventType = e.Item.FindControl("areaEventType") as SmartLabel; DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; tagName.Text = LocatingMonitorUtils.GetHostName(log["TagName"].ToString(), log["TagMac"].ToString(), log["HostName"].ToString()); HostTagGroupStatus hostTagGroupStatus = HostTagGroupStatus.SelectByHostId((int)log["HostId"]); if (hostTagGroupStatus != null) { int groupId = hostTagGroupStatus.HostGroupId; tagName.Href = PathUtil.ResolveUrl(string.Format("/TagUsers/TagUser.aspx?id={0}&type={1}", log["HostId"], groupId)); } else { } facilityName.Text = Convert.ToString(log["FacilityName"]); areaName.Text = Convert.ToString(log["AreaName"]); if (Convert.ToInt32(log["AreaEventType"]) == 0) { areaEventType.Text = "进入区域"; } else { areaEventType.Text = "离开区域"; } writeTime.DisplayValue = Convert.ToDateTime(log["WriteTime"]); } //----------------------------------// /* * Anchor tagName = e.Item.FindControl("tagName") as Anchor; * SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; * SmartLabel areaName = e.Item.FindControl("areaName") as SmartLabel; * SmartLabel areaEventType = e.Item.FindControl("areaEventType") as SmartLabel; * DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; * * tagName.Text = log.TagName; * tagName.Href = PathUtil.ResolveUrl("Objects/Tag.aspx?id=" + log.TagId); * facilityName.Text = log.FacilityName; * areaName.Text = log.AreaName; * areaEventType.Text = (AreaEventType)log.AreaEventType == AreaEventType.StayInside ? "进入区域" : "离开区域"; * writeTime.DisplayValue = log.WriteTime; */ }
protected void list_ItemCreated(object sender, RepeaterItemEventArgs e) { AreaInOutTime areaTime = (AreaInOutTime)e.Item.DataItem; if (areaTime != null) { Img icon = e.Item.FindControl("icon") as Img; Anchor tagName = e.Item.FindControl("tagName") as Anchor; DateTimeLabel inTime = e.Item.FindControl("inTime") as DateTimeLabel; DateTimeLabel outTime = e.Item.FindControl("outTime") as DateTimeLabel; SmartLabel duration = e.Item.FindControl("duration") as SmartLabel; tagName.Text = Convert.ToString(areaTime.hostName); if (areaTime.inTime != DateTime.MinValue) { inTime.DisplayValue = areaTime.inTime; } if (areaTime.outTime != DateTime.MinValue) { outTime.DisplayValue = areaTime.outTime; } duration.Text = ""; if (tagName.Text == "--- ---") { duration.Text = "("; } if (areaTime.stayTime.Ticks == 0) { duration.Text += "0"; } else { if (areaTime.stayTime.Days > 0) { duration.Text += areaTime.stayTime.Days.ToString() + "天"; } if (areaTime.stayTime.Hours > 0) { duration.Text += areaTime.stayTime.Hours.ToString() + "时"; } if (areaTime.stayTime.Minutes > 0) { duration.Text += areaTime.stayTime.Minutes.ToString() + "分"; } if (areaTime.stayTime.Seconds > 0) { duration.Text += areaTime.stayTime.Seconds.ToString() + "秒"; } } if (tagName.Text == "--- ---") { duration.Text += ")"; } } }
protected void messageRepeater_ItemCreated(object sender, RepeaterItemEventArgs e) { DBViewTagAlert ev = e.Item.DataItem as DBViewTagAlert; if (ev != null) { SmartLabel isResolved = (SmartLabel)e.Item.FindControl("isResolved"); if (ev.AlertStatus != (byte)AlertStatusType.New) { isResolved.Text = "√"; } else { isResolved.Text = "<input type='checkbox' name='selection' value='" + ev.AlertId + "' />"; } Img icon = e.Item.FindControl("icon") as Img; HostTagGroupStatus hostTagGroupStatus = HostTagGroupStatus.SelectByHostId((int)ev.HostId); int groupId = hostTagGroupStatus.HostGroupId; icon.Src = CommonExtension.IdentityIconByGroupId(groupId); Anchor tagName = (Anchor)e.Item.FindControl("tagName"); tagName.Text = ev.HostName; tagName.Href = PathUtil.ResolveUrl(string.Format("/TagUsers/TagUser.aspx?id={0}&type={1}", ev.HostId, groupId)); SmartLabel facilityName = (SmartLabel)e.Item.FindControl("facilityName"); facilityName.Text = ev.FacilityName; SmartLabel coordinatesName = (SmartLabel)e.Item.FindControl("coordinatesName"); coordinatesName.Text = ev.CoordinatesName; SmartLabel eventType = (SmartLabel)e.Item.FindControl("eventType"); eventType.Text = CommonExtension.GetEventDescription((SupportEvent)ev.AlertType, ev.HostId.Value); SmartLabel alertStatus = (SmartLabel)e.Item.FindControl("alertStatus"); alertStatus.Text = Misc.GetAlertStatus((AlertStatusType)ev.AlertStatus); DateTimeLabel lastHappenTime = (DateTimeLabel)e.Item.FindControl("lastHappenTime"); lastHappenTime.DisplayValue = ev.WriteTime; Anchor alertDetail = (Anchor)e.Item.FindControl("alertDetail"); alertDetail.Text = "详情"; alertDetail.Href = PathUtil.ResolveUrl("/Monitor/TagAlertProcess.aspx?id=" + ev.AlertId); if (ev.AlertStatus == (byte)ResolveFlag.Processed) { HtmlTableRow tr = (HtmlTableRow)e.Item.FindControl("tr"); tr.Attributes["class"] = "t3"; tagName.CssClass = "t3"; } } }
protected void list_ItemCreated(object sender, RepeaterItemEventArgs e) { DataRowView log = (DataRowView)e.Item.DataItem; if (log != null) { Anchor tagName = e.Item.FindControl("tagName") as Anchor; //tagName.Text = LocatingMonitorUtils.GetHostName(log["TagName"].ToString(), log["TagMac"].ToString(), log["HostName"].ToString()); tagName.Text = Convert.ToString(log["HostName"]); HostTagGroupStatus hostTagGroupStatus = HostTagGroupStatus.SelectByHostId((int)log["HostId"]); if (hostTagGroupStatus != null) { int groupId = hostTagGroupStatus.HostGroupId; tagName.Href = PathUtil.ResolveUrl(string.Format("/TagUsers/TagUser.aspx?id={0}&type={1}", log["HostId"], groupId)); } else { } DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; writeTime.DisplayValue = Convert.ToDateTime(log["WriteTime"]); SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; SmartLabel coordinatesName = e.Item.FindControl("coordinatesName") as SmartLabel; facilityName.Text = Convert.ToString(log["FacilityName"]); coordinatesName.Text = Convert.ToString(log["CoordinatesName"]); } /////////////////////////////////////////////////////////////////////// /* * GenericEventLogView log = e.Item.DataItem as GenericEventLogView; * if (log != null) { * Anchor tagName = e.Item.FindControl("tagName") as Anchor; * tagName.Text = LocatingMonitorUtils.GetHostName(log.TagName, log.HostName); * tagName.Href = PathUtil.ResolveUrl("Objects/Tag.aspx?id=" + log.TagId); * * DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; * writeTime.DisplayValue = log.WriteTime; * * SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; * facilityName.Text = log.FacilityName; * * SmartLabel coordinatesName = e.Item.FindControl("coordinatesName") as SmartLabel; * coordinatesName.Text = log.CoordinatesName; * } */ }
protected void list_ItemCreated(object sender, RepeaterItemEventArgs e) { DataRowView log = (DataRowView)e.Item.DataItem; if (log != null) { Anchor tagName = e.Item.FindControl("tagName") as Anchor; tagName.Text = LocatingMonitorUtils.GetHostName(log["TagName"].ToString(), log["TagMac"].ToString(), log["HostName"].ToString()); tagName.Href = PathUtil.ResolveUrl("Objects/Tag.aspx?id=" + Convert.ToString(log["TagID"])); DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; writeTime.DisplayValue = Convert.ToDateTime(log["WriteTime"]); SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; SmartLabel coordinatesName = e.Item.FindControl("coordinatesName") as SmartLabel; facilityName.Text = Convert.ToString(log["FacilityName"]); coordinatesName.Text = Convert.ToString(log["CoordinatesName"]); } }
protected void list_ItemDataBound(object sender, RepeaterItemEventArgs e) { HostTag ev = e.Item.DataItem as HostTag; if (ev != null) { SmartLabel isChecked = (SmartLabel)e.Item.FindControl("isChecked"); SmartLabel jailRoom = e.Item.FindControl("jailRoom") as SmartLabel; SmartLabel tagHostName = e.Item.FindControl("tagHostName") as SmartLabel; SmartLabel tagMac = e.Item.FindControl("tagMac") as SmartLabel; DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; isChecked.Text = "<input type='checkbox' name='selection' value='" + ev.HostId + "' />"; jailRoom.Text = ev.Description; tagHostName.Text = ev.HostName; tagMac.Text = Tag.Select(ev.TagId).TagMac; writeTime.DisplayValue = ev.WriteTime; } }
void list_ItemCreated(object sender, RepeaterItemEventArgs e) { DBViewTagAlert log = e.Item.DataItem as DBViewTagAlert; if (log != null) { SmartLabel description = e.Item.FindControl("description") as SmartLabel; description.Text = CommonExtension.GetEventDescription((SupportEvent)log.AlertType, log.HostId.Value); SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; facilityName.Text = log.FacilityName; DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; writeTime.DisplayValue = log.WriteTime; SmartLabel coordinatesName = e.Item.FindControl("coordinatesName") as SmartLabel; coordinatesName.Text = log.CoordinatesName; } }
void ReleaseDesignerOutlets() { if (DateTimeLabel != null) { DateTimeLabel.Dispose(); DateTimeLabel = null; } if (DescriptionLabel != null) { DescriptionLabel.Dispose(); DescriptionLabel = null; } if (NotesLabel != null) { NotesLabel.Dispose(); NotesLabel = null; } }
void ReleaseDesignerOutlets() { if (CaptionLabel != null) { CaptionLabel.Dispose(); CaptionLabel = null; } if (NoteLabel != null) { NoteLabel.Dispose(); NoteLabel = null; } if (LocationLabel != null) { LocationLabel.Dispose(); LocationLabel = null; } if (MainImageView != null) { MainImageView.Dispose(); MainImageView = null; } if (DateTimeLabel != null) { DateTimeLabel.Dispose(); DateTimeLabel = null; } if (DeleteButton != null) { DeleteButton.Dispose(); DeleteButton = null; } }
protected void list_ItemCreated(object sender, RepeaterItemEventArgs e) { DataRowView log = (DataRowView)e.Item.DataItem; if (log != null) { //---add by tan 2009-10-6---// Anchor tagName = e.Item.FindControl("tagName") as Anchor; //tagName.Text = LocatingMonitorUtils.GetHostName(log["TagName"].ToString(), log["TagMac"].ToString(), log["HostName"].ToString()); //tagName.Href = PathUtil.ResolveUrl("/Objects/Tag.aspx?id=" + Convert.ToString(log["TagID"])); tagName.Text = Convert.ToString(log["HostName"]); tagName.Href = PathUtil.ResolveUrl("TagUsers/TagUser.aspx?id=" + Convert.ToString(log["hostid"]) + "&type=" + (int)_userType); DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; writeTime.DisplayValue = Convert.ToDateTime(log["WriteTime"]); SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; facilityName.Text = Convert.ToString(log["FacilityName"]); SmartLabel coordinatesName = e.Item.FindControl("coordinatesName") as SmartLabel; coordinatesName.Text = Convert.ToString(log["CoordinatesName"]); } /* * Anchor tagName = e.Item.FindControl("tagName") as Anchor; * tagName.Text = log.TagName; * tagName.Href = PathUtil.ResolveUrl("Objects/Tag.aspx?id=" + log.TagId); * * DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; * writeTime.DisplayValue = log.WriteTime; * * SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; * facilityName.Text = log.FacilityName; * * SmartLabel coordinatesName = e.Item.FindControl("coordinatesName") as SmartLabel; * coordinatesName.Text = log.CoordinatesName; */ }
protected void repeater_ItemCreated(object sender, RepeaterItemEventArgs e) { DiaryView log = e.Item.DataItem as DiaryView; if (log != null) { SmartLabel selection = (SmartLabel)e.Item.FindControl("selection"); NetRadio.Data.User oUser = NetRadio.Data.User.SelectByUserName(me.Name); if (oUser.Role >= (int)UserRole.Admin) { //selection.Text = "<input type='checkbox' name='selection' value='" + log.Id + "' />"; } else { //selection.Text = "-"; } if (log.UserId != 0) { SmartLabel userName = (SmartLabel)e.Item.FindControl("userName"); userName.Text = log.UserName; } SmartLabel description = (SmartLabel)e.Item.FindControl("description"); description.Text = log.Action; //SmartLabel hostName = (SmartLabel)e.Item.FindControl("hostName"); //hostName.Text = log.HostName; SmartLabel tagMac = (SmartLabel)e.Item.FindControl("tagMac"); tagMac.Text = log.TagMac; DateTimeLabel writeTime = (DateTimeLabel)e.Item.FindControl("writeTime"); writeTime.DisplayValue = log.WriteTime; } }
void ReleaseDesignerOutlets() { if (BodyContainer != null) { BodyContainer.Dispose(); BodyContainer = null; } if (ChatNameLabel != null) { ChatNameLabel.Dispose(); ChatNameLabel = null; } if (DateTimeLabel != null) { DateTimeLabel.Dispose(); DateTimeLabel = null; } if (MessageBodyLabel != null) { MessageBodyLabel.Dispose(); MessageBodyLabel = null; } if (ReadUnreadIndicator != null) { ReadUnreadIndicator.Dispose(); ReadUnreadIndicator = null; } if (SenderPhotoImageView != null) { SenderPhotoImageView.Dispose(); SenderPhotoImageView = null; } if (UnreadMessageCountBackground != null) { UnreadMessageCountBackground.Dispose(); UnreadMessageCountBackground = null; } if (UnreadMessageCountLabel != null) { UnreadMessageCountLabel.Dispose(); UnreadMessageCountLabel = null; } if (UnreadView != null) { UnreadView.Dispose(); UnreadView = null; } if (UsernameLabel != null) { UsernameLabel.Dispose(); UsernameLabel = null; } if (LastMessageBodyPhotoView != null) { LastMessageBodyPhotoView.Dispose(); LastMessageBodyPhotoView = null; } if (LastMessageBodyPhotoIcon != null) { LastMessageBodyPhotoIcon.Dispose(); LastMessageBodyPhotoIcon = null; } if (LastMessageBodyPhotoLabel != null) { LastMessageBodyPhotoLabel.Dispose(); LastMessageBodyPhotoLabel = null; } }
protected void settingList_ItemCreated(object sender, RepeaterItemEventArgs e) { DBViewTagSetting setting = e.Item.DataItem as DBViewTagSetting; if (setting != null) { Img icon = e.Item.FindControl("icon") as Img; icon.Src = CommonExtension.IdentityIcon((int)setting.Id);//TagId); Anchor tagName = (Anchor)e.Item.FindControl("tagName"); SmartLabel userType = (SmartLabel)e.Item.FindControl("userType"); SmartLabel userMemo = (SmartLabel)e.Item.FindControl("memo"); tagName.Text = setting.HostName; HostTagGroupStatus tagUser = HostTagGroupStatus.SelectByTagId((int)setting.Id);//.TagId); int groupId = 0; if (tagUser != null) { groupId = tagUser.HostGroupId; userType.Text = BusTagUserType.GetTagUserTypeName(tagUser.HostGroupId); userMemo.Text = tagUser.Description; } tagName.Href = PathUtil.ResolveUrl(string.Format("/TagUsers/TagUser.aspx?id={0}&type={1}", setting.HostId, groupId)); SmartLabel idSelection = (SmartLabel)e.Item.FindControl("idSelection"); string disableOrNot = this.IsLocatingServiceAvailable ? "" : " disabled=\"disabled\""; idSelection.Text = "<input type=\"checkbox\" name=\"selection\"" + disableOrNot + " onclick=\"javascript:Locating.selectTag(this);\" value=\"" + setting.Id + "\" />";//setting.TagId + "\" />"; if (setting.CommandState == null) { return; // <-----------------If never been configured ---------------------------------------------- } SmartLabel commandState = (SmartLabel)e.Item.FindControl("commandState"); DateTimeLabel startTime = (DateTimeLabel)e.Item.FindControl("startTime"); Anchor operate = (Anchor)e.Item.FindControl("operate"); switch ((LocatingCommandState)setting.CommandState) { case LocatingCommandState.WaitToStart: operate.Text = "N/A"; operate.CssClass = "t3"; commandState.Text = "请求开始中"; commandState.Style.Add("color", "Green"); break; case LocatingCommandState.WaitToStop: operate.Text = "N/A"; operate.CssClass = "t3"; commandState.Text = "请求停止中"; commandState.Style.Add("color", "Red"); break; default: case LocatingCommandState.Executed: if (setting.WorkingStatus == (byte)TagWorkingStatus.Locating) { operate.Text = "停止"; operate.Href = "javascript:Locating.quickStop(" + setting.Id + ");"; //setting.TagId + ");"; startTime.DisplayValue = (DateTime)setting.UpdateTime; } else { operate.Text = "快速启动"; operate.ToolTip = "按照已设定参数快速启动"; operate.Href = "javascript:Locating.quickStart(" + setting.Id + ");"; //setting.TagId + ");"; } operate.Attributes["id"] = "op_" + setting.Id; //setting.TagId; break; } if (!this.IsLocatingServiceAvailable) { operate.Text = "N/A"; operate.Href = null; operate.CssClass = "t3"; operate.ToolTip = "系统未检测到LocatingServer运行。"; } } }
protected void list_ItemCreated(object sender, RepeaterItemEventArgs e) { //---add by tan 2009-10-56---// DataRowView log = (DataRowView)e.Item.DataItem; if (log != null) { Img icon = e.Item.FindControl("icon") as Img; Anchor tagName = e.Item.FindControl("tagName") as Anchor; SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; SmartLabel coordinatesName = e.Item.FindControl("coordinatesName") as SmartLabel; SmartLabel isDisappeared = e.Item.FindControl("isDisappeared") as SmartLabel; DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; Anchor replayRoute = e.Item.FindControl("replayRoute") as Anchor; icon.Src = CommonExtension.IdentityIcon(Convert.ToInt32(log["TagId"])); tagName.Text = Convert.ToString(log["HostName"]); tagName.Href = PathUtil.ResolveUrl("TagUsers/TagUser.aspx?id=" + Convert.ToString(log["hostid"]) + "&type=" + (int)_userType); facilityName.Text = Convert.ToString(log["FacilityName"]); coordinatesName.Text = Convert.ToString(log["CoordinatesName"]); if (coordinatesName.Text.Length == 0) { coordinatesName.Text = "离开监控区域"; } if (Convert.ToInt32(log["IsDisappeared"]) >= 0) { isDisappeared.Text = ""; } else { isDisappeared.Text = "消失"; } writeTime.DisplayValue = Convert.ToDateTime(log["WriteTime"]); //replayRoute.Href = "javascript:viewTagPositionTrack(" + Convert.ToString(log["MapId"]) + ", '" + Convert.ToString(log["hostid"]) + "', '" + Convert.ToDateTime(log["WriteTime"]).AddMinutes(-10) + "', 10);"; replayRoute.Href = "javascript:viewTagPositionTrack(0, '" + Convert.ToString(log["hostid"]) + "', '" + Convert.ToDateTime(log["WriteTime"]).AddMinutes(-10) + "', 10);"; } //----------------------------------// //TagPositionLogView log = e.Item.DataItem as TagPositionLogView; /* * if (log != null) { * Img icon = e.Item.FindControl("icon") as Img; * Anchor tagName = e.Item.FindControl("tagName") as Anchor; * SmartLabel facilityName = e.Item.FindControl("facilityName") as SmartLabel; * SmartLabel coordinatesName = e.Item.FindControl("coordinatesName") as SmartLabel; * DateTimeLabel writeTime = e.Item.FindControl("writeTime") as DateTimeLabel; * Anchor replayRoute = e.Item.FindControl("replayRoute") as Anchor; * * icon.Src = CommonExtension.IdentityIcon(log.TagId); * tagName.Text = log.TagName; * tagName.Href = PathUtil.ResolveUrl("Objects/Tag.aspx?id=" + log.TagId); * facilityName.Text = log.FacilityName; * coordinatesName.Text = log.CoordinatesName; * writeTime.DisplayValue = log.WriteTime; * replayRoute.Href = "javascript:viewTagPositionTrack(" + log.MapId + ", '" + log.TagId + "', '" + log.WriteTime.AddMinutes(-10) + "', 10);"; * } */ }