예제 #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string theme   = this.txtTheme.Text;
            string site    = this.txtSite.Text;
            string label   = this.ddlLabel.SelectedValue;
            string sDate   = this.AjaxCalendarS.Text;
            string eDate   = this.AjaxCalendarE.Text;
            string sTime   = this.ddlDTime.SelectedValue;
            string eTime   = this.ddlETime.SelectedValue;
            string content = this.txtContent.Text;

            if (type == "Add")
            {
                calendarId = Guid.NewGuid().ToString();
            }
            else
            {
                calendarId = ViewState["CALENDARID"].ToString();
            }
            QJVRMS.Business.CalendarFactory calendar = new QJVRMS.Business.CalendarFactory();
            if (calendar.EditCalendar(calendarId, theme, site, label, sDate, sTime, eDate, eTime, content, CurrentUser.UserLoginName))
            {
                this.Label1.Text = "成功";
                string   t         = ViewState["CALENDARTIME"].ToString();
                DateTime sDateTime = Convert.ToDateTime(sDate);
                DateTime eDateTime = Convert.ToDateTime(eDate);
                string   param     = GetString(sDateTime, eDateTime);
                //Page.RegisterClientScriptBlock("calendar", "<script>add('" + t + "', '" + CurrentUser.UserLoginName + "', '" + t.Replace("-", string.Empty) + "')</script>");
                Page.RegisterClientScriptBlock("calendar", "<script>adds('" + param + "', '" + CurrentUser.UserLoginName + "')</script>");
            }
            else
            {
                this.Label1.Text = "失败";
            }
        }
예제 #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string theme   = this.txtTheme.Text;
            string site    = this.txtSite.Text;
            string label   = this.ddlLabel.SelectedValue;
            string sDate   = this.AjaxCalendarS.Text;
            string eDate   = this.AjaxCalendarE.Text;
            string sTime   = this.ddlDTime.SelectedValue;
            string eTime   = this.ddlETime.SelectedValue;
            string content = this.txtContent.Text;

            if (type == "Add")
            {
                calendarId = Guid.NewGuid().ToString();
            }
            else
            {
                calendarId = ViewState["CALENDARID"].ToString();
            }
            QJVRMS.Business.CalendarFactory calendar = new QJVRMS.Business.CalendarFactory();
            if (calendar.EditCalendar(calendarId, theme, site, label, sDate, sTime, eDate, eTime, content, CurrentUser.UserLoginName))
            {
                this.Label1.Text = "成功";
            }
            else
            {
                this.Label1.Text = "失败";
            }
        }
예제 #3
0
        protected void btnSave_Click(object sender, EventArgs e) {
            string theme = this.txtTheme.Text;
            string site = this.txtSite.Text;
            string label = this.ddlLabel.SelectedValue;
            string sDate = this.AjaxCalendarS.Text;
            string eDate = this.AjaxCalendarE.Text;
            string sTime = this.ddlDTime.SelectedValue;
            string eTime = this.ddlETime.SelectedValue;
            string content = this.txtContent.Text;

            if(type == "Add")
                calendarId = Guid.NewGuid().ToString();
            else
                calendarId = ViewState["CALENDARID"].ToString();
            QJVRMS.Business.CalendarFactory calendar = new QJVRMS.Business.CalendarFactory();
            if (calendar.EditCalendar(calendarId, theme, site, label, sDate, sTime, eDate, eTime, content, CurrentUser.UserLoginName))
                this.Label1.Text = "成功";
            else
                this.Label1.Text = "失败";
        }
예제 #4
0
        protected void btnSave_Click(object sender, EventArgs e) {
            string theme = this.txtTheme.Text;
            string site = this.txtSite.Text;
            string label = this.ddlLabel.SelectedValue;
            string sDate = this.AjaxCalendarS.Text;
            string eDate = this.AjaxCalendarE.Text;
            string sTime = this.ddlDTime.SelectedValue;
            string eTime = this.ddlETime.SelectedValue;
            string content = this.txtContent.Text;

            if (type == "Add")
                calendarId = Guid.NewGuid().ToString();
            else
                calendarId = ViewState["CALENDARID"].ToString();
            QJVRMS.Business.CalendarFactory calendar = new QJVRMS.Business.CalendarFactory();
            if (calendar.EditCalendar(calendarId, theme, site, label, sDate, sTime, eDate, eTime, content, CurrentUser.UserLoginName)) {
                this.Label1.Text = "成功";
                string t = ViewState["CALENDARTIME"].ToString();
                DateTime sDateTime = Convert.ToDateTime(sDate);
                DateTime eDateTime = Convert.ToDateTime(eDate);
                string param = GetString(sDateTime, eDateTime);
                //Page.RegisterClientScriptBlock("calendar", "<script>add('" + t + "', '" + CurrentUser.UserLoginName + "', '" + t.Replace("-", string.Empty) + "')</script>");
                Page.RegisterClientScriptBlock("calendar", "<script>adds('" + param + "', '" + CurrentUser.UserLoginName + "')</script>");
            }
            else
                this.Label1.Text = "失败";
        }