partial void DeleteMessage(Message instance);
 partial void InsertMessage(Message instance);
 partial void UpdateMessage(Message instance);
        /// <summary>
        /// 留言板
        /// </summary>
        /// <returns></returns>
        public JsonResult tijiao(string name, string email, string message)
        {
            string result;
            using (qdbusDataClassesDataContext ndc = new qdbusDataClassesDataContext())
            {

                if (name != "" && email !="" && message !="")
                {

                    Message n = new Message();
                    {
                        n.name = name;
                        n.mail = email;
                        n.message1 = message;
                        n.time = DateTime.Now;

                    };

                    ndc.Message.InsertOnSubmit(n);
                    ndc.SubmitChanges();
                    result = "成功";
                }
                else
                {

                    result = "失败";

                }

                //if (Request.Form["name"] != "")
                //{
                //    //string name = Request.Files["inputFile"].FileName;
                //    //string mingzi = Path.GetFileName(Request.Files["inputFile"].FileName);
                //    //string leixing = Request.Files["inputFile"].ContentType;

                //    //int index = name.LastIndexOf("\\") + 1;
                //    //int fileLen = Request.Files["inputFile"].ContentLength;
                //    //Byte[] fileData = new Byte[fileLen];
                //    //Stream sr = Request.Files["inputFile"].InputStream;
                //    //sr.Read(fileData, 0, fileLen);
                //    //sr.Close();

                //    Message n = new Message();
                //    {
                //        n.name = Request.Form["name"];
                //        n.mail = Request.Form["email"];
                //        n.message1 = Request.Form["message"];
                //        n.time = DateTime.Now;

                //    };

                //    ndc.Message.InsertOnSubmit(n);
                //    ndc.SubmitChanges();

                //}

            }

            return Json(result);
        }