partial void DeleteWallInfo(WallInfo instance);
 partial void InsertWallInfo(WallInfo instance);
 partial void UpdateWallInfo(WallInfo instance);
		private void detach_WallInfo(WallInfo entity)
		{
			this.SendPropertyChanging();
			entity.employeeInfo = null;
		}
예제 #5
0
        public ActionResult SendWall(FormCollection fc, WallInfo wi, string sessionid, string UserID)
        {
            int eid = int.Parse(SecurityEncryption.DESDecrypt(sessionid));
            ViewData["userId"] = UserID;
            //1、判断用户信息是否完整,完整则可以留言,不完整则先完善个人信息
            FansContract fans = FansBll.GetFansInfoByOpenID(UserID);

            wi.FansOpenId = fans.FromUserName;
            wi.EmpId = eid;
            wi.Temp1 = fans.TrueName;
            wi.date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            WallInfoService WallBll = new WallInfoService();
            if (WallBll.Insert(wi) > 0)
            {

                ViewData["url"] = Url.Action("WllList", new { sessionid = sessionid, UserID = UserID });
                ViewData["msg"] = "留言成功!";
                return View("Success");
            }
            else
            {

                ViewData["url"] = Url.Action("WllList", new { sessionid = sessionid, UserID = UserID });
                ViewData["msg"] = "留言失败!";
                return View("Error");
            }
        }
예제 #6
0
 /// <summary>
 /// 添加留言
 /// </summary>
 /// <param name="sessionid"></param>
 /// <param name="UserID"></param>
 /// <returns></returns>
 public ActionResult SendWall(string sessionid, string UserID)
 {
     int eid = int.Parse(SecurityEncryption.DESDecrypt(sessionid));
     ViewData["userId"] = UserID;
     //1、判断用户信息是否完整,完整则可以留言,不完整则先完善个人信息
     FansContract fans = FansBll.GetFansInfoByOpenID(UserID);
     if (fans.TrueName == null || fans.UserBr == null || fans.UserPhone == null || fans.UserPhone == "")
     {
         ViewData["msg"] = "你还没有完善个人信息,请先完善个人信息!";
         ViewData["url"] = Url.Action("Member", new { sessionid = sessionid, UserID = UserID, bak = "SendWall" });
         return View("Error");
     }
     else
     {
         WallInfo wi = new WallInfo();
         wi.FansOpenId = fans.FromUserName;
         wi.EmpId = eid;
         wi.Temp1 = fans.TrueName;
         return View(wi);
     }
 }
 public int Insert(WallInfo wi)
 {
     return WallDao.Insert(wi);
 }
예제 #8
0
 public int Insert(WallInfo wi)
 {
     db.WallInfo.InsertOnSubmit(wi);
     db.SubmitChanges();
     return wi.id;
 }