コード例 #1
0
 /// <summary>
 /// 发送站内信
 /// </summary>
 /// <param name="user"></param>
 /// <returns></returns>
 public ActionResult Send(UserModel user)
 {
     string[] receivers = Request.Form["rsvID"].Split(',');
     string content = Request.Form["content"];
     string topic = Request.Form["topic"];
     try
     {
         foreach (var receiver in receivers)
         {
             yjgl_znx znx = new yjgl_znx
             {
                 fs_user_id = user.UserInfo.user_id,
                 js_user_id = Convert.ToInt32(receiver),
                 znx_topic = topic,
                 znx_nr = content,
                 znx_fssj = DateTime.Now.ToString("yyy-MM-dd hh:mm:ss"),
                 znx_isread = "否"
             };
             ArgsHelp ah = znxDAO.SendZnx(znx);
             if (!ah.flag)
                 throw new Exception(ah.msg);
         }
     }
     catch (Exception e)
     {
         return JavaScript("ZnxFailed('" + e.Message + "');");
     }
     return JavaScript("ZnxSuccessed();");
 }
コード例 #2
0
 public ArgsHelp SendZnx(yjgl_znx znx)
 {
     ArgsHelp ah = new ArgsHelp();
     try
     {
         znxDB.yjgl_znx.InsertOnSubmit(znx);
         znxDB.SubmitChanges();
     }
     catch (Exception e)
     {
         ah.flag = false;
         ah.msg = e.Message;
     }
     return ah;
 }
コード例 #3
0
 partial void Deleteyjgl_znx(yjgl_znx instance);
コード例 #4
0
 partial void Updateyjgl_znx(yjgl_znx instance);
コード例 #5
0
 partial void Insertyjgl_znx(yjgl_znx instance);