/// <summary>
/// QQ消息提醒
/// </summary>
public void ShowLikeQQ()
{
string userid = new DOE.Bll.EntityHelper.DesignTask_Audit().GetUserIDForAlias(HttpContext.Current.User.Identity.Name);
if (CheckUserRole(userid, "财务室"))
{
DataTable dt = new DOE.Bll.ContractInfo.GatherService().ReturnMessage("未审批");
int count = dt.Rows.Count;
if (count < 1)
{
return;
}
ScriptManager1.RegisterIcon(Icon.AwardStarBronze1);
string stub = "<br /><br /><br /><marquee direction='up' height='30' scrolldelay='250' ><font color='red'style='font-weight:bolder'> 有" + count + "条新收款信息,请注意审核!<br/></font></marquee>";
Ext.Notification.Show(new Notification.Config
{
Title = "最新公告",
HideDelay = 8000,
Icon = Icon.AwardStarBronze1,
Height = 160,
Width = 250,
Draggable = false,
AlignCfg = new Notification.AlignConfig
{
ElementAnchor = AnchorPoint.BottomRight,
TargetAnchor = AnchorPoint.BottomRight,
OffsetX = -0,
OffsetY = -0
},
AutoHide = false,
ShowPin = false,
CloseVisible = true,
BodyStyle = "padding:5px",
ShowFx = new SlideIn { Anchor = AnchorPoint.BottomRight, Options = new Fx.Config { Easing = Easing.BackOut } },
HideFx = new SlideOut { Anchor = AnchorPoint.BottomRight },
Html = stub
});
}
else if (CheckUserRole(userid, "设计部合同岗"))
{
DataTable dt = new DOE.Bll.ContractInfo.GatherService().ReturnMessage("已审批");
int count = dt.Rows.Count;
if (count < 1)
{
return;
}
ScriptManager1.RegisterIcon(Icon.AwardStarBronze1);
string stub = "<br /><br /><br /><marquee direction='up' height='30' scrolldelay='250' ><font color='red'style='font-weight:bolder'> 最近有" + count + "条审核的收款信息!<br/></font></marquee>";
Ext.Notification.Show(new Notification.Config
{
Title = "最新消息",
HideDelay = 8000,
Icon = Icon.AwardStarBronze1,
Height = 160,
Width = 250,
Draggable = false,
AlignCfg = new Notification.AlignConfig
{
ElementAnchor = AnchorPoint.BottomRight,
TargetAnchor = AnchorPoint.BottomRight,
OffsetX = -0,
OffsetY = -0
},
AutoHide = false,
ShowPin = false,
CloseVisible = true,
BodyStyle = "padding:5px",
ShowFx = new SlideIn { Anchor = AnchorPoint.BottomRight, Options = new Fx.Config { Easing = Easing.BackOut } },
HideFx = new SlideOut { Anchor = AnchorPoint.BottomRight },
Html = stub
});
}
}
Coolite实现类型于QQ的消息提醒功能
最新推荐文章于 2019-08-02 01:38:04 发布
该博客介绍了一种使用Coolite库来实现类似QQ的消息提醒功能的方法。通过检查用户角色,针对不同部门显示不同的消息通知,例如针对财务室显示未审批的收款信息,针对设计部合同岗显示已审批的收款信息。提醒采用滚动字幕的方式,并配置了通知的显示样式和动画效果。
摘要由CSDN通过智能技术生成