Пример #1
0
        private void Look(string calendarId) {
            if (string.IsNullOrEmpty(calendarId))
                return;

            QJVRMS.Business.CalendarFactory calendarFactory = new QJVRMS.Business.CalendarFactory();
            DataTable dt = calendarFactory.GetCalendar(calendarId);

            if (dt == null || dt.Rows.Count == 0)
                return;

            this.lbTheme.Text = dt.Rows[0]["Theme"].ToString();
            this.lbSite.Text = dt.Rows[0]["Site"].ToString();
            this.lbLabel.Text = dt.Rows[0]["Label"].ToString();
            DateTime sDate = Convert.ToDateTime(dt.Rows[0]["StartTime"].ToString());
            DateTime eDate = Convert.ToDateTime(dt.Rows[0]["EndTime"].ToString());
            param = GetString(sDate, eDate);
            if (IsDiffTime(DateTime.Now, sDate))
                this.lbState.Text = "距开始" + GetDiffTime(DateTime.Now, sDate);
            else
                if (IsDiffTime(DateTime.Now, eDate))
                    this.lbState.Text = "正在进行";
                else
                    this.lbState.Text = "已过期" + GetDiffTime(DateTime.Now, eDate);
            this.lbSdate.Text = sDate.ToShortDateString() + " " + sDate.ToShortTimeString();
            this.lbEdate.Text = eDate.ToShortDateString() + " " + eDate.ToShortTimeString();
            this.lbContent.Text = dt.Rows[0]["DContent"].ToString();
        }
Пример #2
0
        private void Update(string calendarId)
        {
            if (string.IsNullOrEmpty(calendarId))
            {
                this.Label1.Text = "";
            }

            QJVRMS.Business.CalendarFactory calendarFactory = new QJVRMS.Business.CalendarFactory();
            DataTable dt = calendarFactory.GetCalendar(calendarId);

            if (dt == null || dt.Rows.Count == 0)
            {
                this.Label1.Text = "";
            }

            this.txtTheme.Text = dt.Rows[0]["Theme"].ToString();
            this.txtSite.Text  = dt.Rows[0]["Site"].ToString();
            this.ddlLabel.Items.FindByValue(dt.Rows[0]["Label"].ToString()).Selected = true;
            DateTime sDate = Convert.ToDateTime(dt.Rows[0]["StartTime"].ToString());
            DateTime eDate = Convert.ToDateTime(dt.Rows[0]["EndTime"].ToString());

            this.AjaxCalendarS.Text = sDate.ToShortDateString();
            this.AjaxCalendarE.Text = eDate.ToShortDateString();
            this.ddlDTime.Items.FindByValue(sDate.ToShortTimeString()).Selected = true;
            this.ddlETime.Items.FindByValue(eDate.ToShortTimeString()).Selected = true;
            this.txtContent.Text = dt.Rows[0]["DContent"].ToString();
        }
Пример #3
0
        private void Update(string calendarId) {
            if (string.IsNullOrEmpty(calendarId))
                this.Label1.Text = "";

            QJVRMS.Business.CalendarFactory calendarFactory = new QJVRMS.Business.CalendarFactory();
            DataTable dt = calendarFactory.GetCalendar(calendarId);

            if (dt == null || dt.Rows.Count == 0)
                this.Label1.Text = "";

            this.txtTheme.Text = dt.Rows[0]["Theme"].ToString();
            this.txtSite.Text = dt.Rows[0]["Site"].ToString();
            this.ddlLabel.Items.FindByValue(dt.Rows[0]["Label"].ToString()).Selected = true;
            DateTime sDate = Convert.ToDateTime(dt.Rows[0]["StartTime"].ToString());
            DateTime eDate = Convert.ToDateTime(dt.Rows[0]["EndTime"].ToString());
            this.AjaxCalendarS.Text = sDate.ToShortDateString();
            this.AjaxCalendarE.Text = eDate.ToShortDateString();
            this.ddlDTime.Items.FindByValue(sDate.ToShortTimeString()).Selected = true;
            this.ddlETime.Items.FindByValue(eDate.ToShortTimeString()).Selected = true;
            this.txtContent.Text = dt.Rows[0]["DContent"].ToString();
        }
Пример #4
0
        private void Look(string calendarId)
        {
            if (string.IsNullOrEmpty(calendarId))
            {
                return;
            }

            QJVRMS.Business.CalendarFactory calendarFactory = new QJVRMS.Business.CalendarFactory();
            DataTable dt = calendarFactory.GetCalendar(calendarId);

            if (dt == null || dt.Rows.Count == 0)
            {
                return;
            }

            this.lbTheme.Text = dt.Rows[0]["Theme"].ToString();
            this.lbSite.Text  = dt.Rows[0]["Site"].ToString();
            this.lbLabel.Text = dt.Rows[0]["Label"].ToString();
            DateTime sDate = Convert.ToDateTime(dt.Rows[0]["StartTime"].ToString());
            DateTime eDate = Convert.ToDateTime(dt.Rows[0]["EndTime"].ToString());

            param = GetString(sDate, eDate);
            if (IsDiffTime(DateTime.Now, sDate))
            {
                this.lbState.Text = "距开始" + GetDiffTime(DateTime.Now, sDate);
            }
            else
            if (IsDiffTime(DateTime.Now, eDate))
            {
                this.lbState.Text = "正在进行";
            }
            else
            {
                this.lbState.Text = "已过期" + GetDiffTime(DateTime.Now, eDate);
            }
            this.lbSdate.Text   = sDate.ToShortDateString() + " " + sDate.ToShortTimeString();
            this.lbEdate.Text   = eDate.ToShortDateString() + " " + eDate.ToShortTimeString();
            this.lbContent.Text = dt.Rows[0]["DContent"].ToString();
        }