Example #1
0
        private void InitPage()
        {
            User objUser = (User)Session["User"];
            //通知
            EntityData entityNotice = RemindDAO.GetNoticeUserByUserCode(objUser.UserCode);

            if (entityNotice.HasRecord())
            {
                HtmlTable     m_Table = this.tbNotice;
                HtmlTableRow  m_Row;
                HtmlTableCell m_Cell;

                foreach (DataRow dr in entityNotice.CurrentTable.Rows)
                {
                    m_Row = new HtmlTableRow();

                    m_Cell = new HtmlTableCell();
                    if (BLL.NoticeRule.GetFieldName(dr["NoticeCode"].ToString(), "Type") != "1")
                    {
                        m_Cell.InnerHtml = "<a href='#' onclick ='OpenNotice(" + dr["NoticeCode"].ToString() + ");return false;'>" + BLL.NoticeRule.GetNoticeName(dr["NoticeCode"].ToString()) + "</a>";
                    }
                    else
                    {
                        m_Cell.InnerHtml = "<a href='#' onclick =OpenTask('" + BLL.NoticeRule.GetFieldName(dr["NoticeCode"].ToString(), "RelatedHref") + "');return false;>" + BLL.NoticeRule.GetNoticeName(dr["NoticeCode"].ToString()) + "</a>";
                    }
                    m_Row.Cells.Add(m_Cell);
                    m_Table.Rows.Add(m_Row);
                }
            }
            entityNotice.Dispose();



//			EntityData entity = RemindDAO.GetAllRemindStrategy();
//
//			if (entity.HasRecord())
//			{
//				foreach(DataRow dr in entity.CurrentTable.Rows)
//				{
//					//获取所有超期工作
//					if (ds.Tables[0].Rows.Count > 0)
//					{
//						DataTable dt = DisposeTask(ds.Tables[0]);
//						string m_Condition = "";
//						m_Condition = " ((Status = 0 and PlannedStartDate <'" + DateTime.Now.ToShortDateString() + "')";
//						m_Condition += " or (Status <> 4 and PlannedFinishDate >'" + DateTime.Now.ToShortDateString() + "'))";
//						DateView dv = new DataView(dt,m_Condition,"",DataViewRowState.CurrentRows);
//					}
//
//
//				}
//					break;
//			}
            //EntityData entityNotice = RemindDAO.GetAllNotice();
        }