Esempio n. 1
0
        /// <summary>
        /// 添加联系人
        /// </summary>
        /// <param name="emailID"></param>
        /// <param name="emailName"></param>
        /// <returns></returns>

        public ActionResult AddNewMessageAjax(string messageID, string messageName)
        {
            if (Request.IsAjaxRequest())
            {
                setMessages se = new setMessages();
                se.SE_Value = messageName;
                bool flag = _exceptionInfoRepos.AddMessage(se);
                return(Json(flag, JsonRequestBehavior.AllowGet));
            }
            return(null);
        }
Esempio n. 2
0
 /// <summary>
 /// 添加联系人
 /// </summary>
 /// <param name="se"></param>
 /// <returns></returns>
 public bool AddMessage(setMessages se)
 {
     try
     {
         _dataContext.setMessages.InsertOnSubmit(se);
         _dataContext.SubmitChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 修改联系人
 /// </summary>
 /// <param name="formerName"></param>
 /// <param name="emailName"></param>
 /// <returns></returns>
 public bool ModifyMessage(string formerName, string messageName)
 {
     try
     {
         setMessages oldPC = _dataContext.setMessages.Single(x => x.SE_Value == formerName);
         oldPC.SE_Value = messageName;
         _dataContext.SubmitChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }