예제 #1
0
        public ActionResult Save(contact_msg msg)
        {
            contact_msg contMsg = msg;

            if (contMsg != null)
            {
                if (contMsg.id > 0)
                {
                    Uof.Icontact_msgService.Save(contMsg.id, msg);
                }
                else
                {
                    Uof.Icontact_msgService.AddEntity(contMsg);
                }
                return(Json(contMsg));
            }
            return(ErrorResult);
        }
예제 #2
0
        /// <summary>
        /// 取得产口详细
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Get(int id)
        {
            if (id <= 0)
            {
                return(ErrorResult);
            }
            contact_msg pro    = Uof.Icontact_msgService.GetById(id);
            contact_msg result = pro;

            if (pro.is_read == null || pro.is_read == 0)
            {
                result.is_read = 1;
                Uof.Icontact_msgService.UpdateEntity(pro);
            }



            return(Json(result, JsonRequestBehavior.AllowGet));
        }