FullCalendar3.8事件修改

Event_Edit.ashx

内容:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace AppTask
{
    /// 
    /// taskedit 的摘要说明
    /// 
    public class task_edit : IHttpHandler
    {
        public static SqlConnection AppConn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Default"].ToString());
        public void ProcessRequest(HttpContext context)
        {
            string attypename = System.Web.HttpUtility.UrlDecode(context.Request["attype"], Encoding.UTF8);//事件类别
            string attitle = System.Web.HttpUtility.UrlDecode(context.Request["title"], Encoding.UTF8);//标题
            string atcontent = System.Web.HttpUtility.UrlDecode(context.Request["description"], Encoding.UTF8);//内容

            string atsdate = System.Web.HttpUtility.UrlDecode(context.Request["start"], Encoding.UTF8);//开始时间
            string atedate = System.Web.HttpUtility.UrlDecode(context.Request["end"], Encoding.UTF8);//结束时间

            string id = context.Request["id"];
            //SqlConnection con = new SqlConnection(@"Password=tac26901333;Persist Security Info=True;User ID=sa;Initial Catalog=DocumentManagement;Data Source=.");
            string eventStr = "UPDATE [AppCube].[dbo].[atTasks] SET   attitle = '" + attitle + "', atsdate = '" + atsdate + "', atedate = '" + atedate + "', atcontent = '" + atcontent + "' where ID=" + id + "";
            ;
            SqlDataAdapter da = new SqlDataAdapter(eventStr, AppConn);
            DataSet ds = new DataSet();
            da.Fill(ds);
            AppConn.Close();

            //string id = ds.Tables[0].Rows[0]["id"].ToString();
            //context.Response.Write(id);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}



你可能感兴趣的:(FineUI开发实践)