/// <summary> /// 发消息给用户 /// </summary> /// <param name="msg">消息类型(已通过|被拒绝)</param> private void SendMessage(string msg) { EtNet_Models.Information messageEntity = new EtNet_Models.Information(); DataTable tbl = To_PolicyManager.GetLists(" isVerify=" + Request.QueryString["jobflowid"].ToString()); messageEntity.associationid = 0;//此处不需要,默认给一个值 messageEntity.contents = string.Format("编号为{0}的保单,{1}", tbl.Rows[0]["serialnum"], msg); messageEntity.createtime = DateTime.Now; messageEntity.founderid = (Session["login"] as LoginInfo).Id; messageEntity.sendtime = DateTime.Now; messageEntity.sortid = 1;//消息分类:个人消息 if (InformationManager.Add(messageEntity)) { int userID = int.Parse(tbl.Rows[0]["policy_makerId"].ToString()); int messageID = InformationManager.GetMaxId(); EtNet_Models.InformationNotice messageNoticeEntity = new InformationNotice(); messageNoticeEntity.informationid = messageID; messageNoticeEntity.recipientid = userID; messageNoticeEntity.remind = "是";//默认未阅读; InformationNoticeManager.Add(messageNoticeEntity); } }
protected void Page_Load(object sender, EventArgs e) { object id = Request.QueryString["jobflowid"]; if (id == null || id.ToString() == "") { return; } int rid = 0; DataTable tbl = To_PolicyManager.GetLists(" isVerify=" + id.ToString()); rid = int.Parse(tbl.Rows[0]["id"].ToString()); InitData(Convert.ToInt32(rid)); }