protected void BindGv() { System.Collections.Generic.List <PTStopMsg> list = ( from stop in this.stopMsgServer where stop.PrjGuid == this.hfldPrjId.Value select stop into list0 orderby list0.InputDate descending select list0).ToList <PTStopMsg>(); this.gvStopMsg.DataSource = list; this.gvStopMsg.DataBind(); if (list.Count <= 0) { this.hfldIsAllowAdd.Value = "1"; return; } PTStopMsg stopMsg = list.FirstOrDefault <PTStopMsg>(); PTRetMsgService source = new PTRetMsgService(); System.Collections.Generic.List <PTRetMsg> list2 = ( from ret in source where ret.StopMsgId == stopMsg.StopMsgId && ret.FlowState.Value == 1 select ret).ToList <PTRetMsg>(); if (list2.Count > 0) { this.hfldIsAllowAdd.Value = "1"; return; } this.hfldIsAllowAdd.Value = "0"; }
public void CommitEvent(object key) { PTRetMsg byId = new PTRetMsgService().GetById(key.ToString()); if (byId != null) { ProjectInfo.UpdatePrjState(byId.PrjGuid, "7"); } }