工作流待办事项消息提醒
web页面提醒的缺点:不可能一直开着浏览器;邮件提醒的缺点:领导工作繁忙哪有时间看邮件,即便像我这样不忙的,也懒得看邮件,所以邮件提醒其实很鸡肋。所以需要做个桌面提醒,每个办公人员都有自己的电脑,只要电脑开着,就能收到提醒。
所用到的技术:WebService、线程
功能:1、桌面消息提醒器开机自动启动;2、根据设置的间隔自动提醒;3、点击消息,即可打开浏览器处理待办;4、首次使用需要登录一次,以后不需要每次登录,可以切换账号登录;
主要代码:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Configuration; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Web.Services.Protocols; using System.Windows.Forms; using Microsoft.Win32; using Utils;namespace MessageReminder {/// <summary>/// 桌面消息提醒器/// </summary>public partial class Form1 : Form{#region 变量/// <summary>/// 桌面消息提醒WebService/// </summary>public DesktopMsgService.Service m_DesktopMsgService = new DesktopMsgService.Service();/// <summary>/// 服务器url/// </summary>public string m_Url = ConfigurationManager.AppSettings["url"];/// <summary>/// 消息提醒框/// </summary>public MsgForm m_msgForm;/// <summary>/// 用户名/// </summary>public string m_UserName;/// <summary>/// 密码/// </summary>public string m_Pwd;/// <summary>/// 时间单位/// </summary>private int timeUnit = ConfigurationManager.AppSettings["testFlag"] == "1" ? 1000 : 1000 * 60;/// <summary>/// 待审阅/// </summary>private int m_dsyCount = 0;/// <summary>/// 待审阅辅审/// </summary>private int m_dsyFsCount = 0;/// <summary>/// 待审核/// </summary>private int m_dshCount = 0;/// <summary>/// 待审核辅审/// </summary>private int m_dshFsCount = 0;/// <summary>/// 待批准/// </summary>private int m_dpzCount = 0;/// <summary>/// 未通过/// </summary>private int m_wtgCount = 0;/// <summary>/// 是否可以退出/// </summary>private bool canExit = false;#endregion#region Form1public Form1(){InitializeComponent();#region 隐藏主窗体//隐藏主窗体this.ShowInTaskbar = false;this.WindowState = FormWindowState.Minimized;this.Visible = false;#endregion#region 开机自动启动//开机自动启动string path = Application.ExecutablePath;RegistryKey rk = Registry.LocalMachine;RegistryKey rk2 = rk.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);if (rk2 == null){rk.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");}if (rk2.GetValue("技术报告消息提醒器") == null|| rk2.GetValue("技术报告消息提醒器").ToString() != path){rk2.SetValue("技术报告消息提醒器", path);}rk2.Close();rk.Close();#endregion#region 记录用户名密码//记录用户名密码m_UserName = MessageReminder.Properties.Settings.Default.userName;m_Pwd = MessageReminder.Properties.Settings.Default.pwd;#endregion#region 菜单显示//菜单显示if (MessageReminder.Properties.Settings.Default.userName != ""){this.登录ToolStripMenuItem.Text = "用户信息";}#endregion#region 提醒间隔if (Properties.Settings.Default.reminderInterval == timeUnit * 1){this.reminderInterval1分钟.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 2){this.reminderInterval2分钟.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 5){this.reminderInterval5分钟.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 10){this.reminderInterval10分钟.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 20){this.reminderInterval20分钟.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 30){this.reminderInterval30分钟.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 60 * 1){this.reminderInterval1小时.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 60 * 2){this.reminderInterval2小时.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 60 * 4){this.reminderInterval4小时.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 60 * 6){this.reminderInterval6小时.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 60 * 8){this.reminderInterval8小时.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 60 * 12){this.reminderInterval12小时.Checked = true;}else if (Properties.Settings.Default.reminderInterval == timeUnit * 60 * 24){this.reminderInterval24小时.Checked = true;}else{Properties.Settings.Default.reminderInterval = timeUnit * 10;Properties.Settings.Default.Save();this.reminderInterval10分钟.Checked = true;}#endregion#region 设置WebService地址m_DesktopMsgService.Url = m_Url + "/WebService/DesktopMsgService/Service.asmx";#endregion}#endregion#region Form1_Loadprivate void Form1_Load(object sender, EventArgs e){if (!string.IsNullOrWhiteSpace(Properties.Settings.Default.userName)){timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Start();}}#endregion#region 登录服务器/// <summary>/// 登录窗体/// </summary>private Login m_Login;/// <summary>/// 登录窗体/// </summary>private void CreateLogin(){if (m_Login == null || m_Login.IsDisposed){m_Login = new Login();m_Login.Show(this);}else{m_Login.Focus();}}/// <summary>/// 用户信息窗体/// </summary>private LoginInfo m_LoginInfo;/// <summary>/// 用户信息窗体/// </summary>private void CreateLoginInfo(){if (m_LoginInfo == null || m_LoginInfo.IsDisposed){m_LoginInfo = new LoginInfo();m_LoginInfo.Show(this);}else{m_LoginInfo.Focus();}}private void 登录ToolStripMenuItem_Click(object sender, EventArgs e){if (Properties.Settings.Default.userName == ""){CreateLogin();}else{CreateLoginInfo();}}#endregion#region 关闭程序private void 关闭ToolStripMenuItem_Click(object sender, EventArgs e){if (MessageBox.Show("退出后无法接收到技术报告提醒消息,确定要退出桌面提醒吗?", "提示", MessageBoxButtons.OKCancel) == DialogResult.OK){canExit = true;Application.Exit();}}#endregion#region GetMsgForm/// <summary>/// GetMsgForm/// </summary>private MsgForm GetMsgForm(){if (m_msgForm == null || m_msgForm.IsDisposed){m_msgForm = new MsgForm();}return m_msgForm;}#endregion#region 提醒间隔//1分钟提示一次private void 分钟提示一次ToolStripMenuItem_Click_1(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 1;UncheckReminder();this.reminderInterval1分钟.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//2分钟提示一次private void 分钟提示一次ToolStripMenuItem1_Click_1(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 2;UncheckReminder();this.reminderInterval2分钟.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//5分钟提示一次private void 分钟提示一次ToolStripMenuItem3_Click(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 5;UncheckReminder();this.reminderInterval5分钟.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//10分钟提示一次private void 分钟提示一次ToolStripMenuItem_Click(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 10;UncheckReminder();this.reminderInterval10分钟.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//20分钟提示一次private void 分钟提示一次ToolStripMenuItem1_Click(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 20;UncheckReminder();this.reminderInterval20分钟.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//30分钟提示一次private void 分钟提示一次ToolStripMenuItem2_Click(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 30;UncheckReminder();this.reminderInterval30分钟.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//1小时提示一次private void toolStripMenuItem2_Click(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 60;UncheckReminder();this.reminderInterval1小时.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//2小时提示一次private void 小时提示一次ToolStripMenuItem_Click(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 60 * 2;UncheckReminder();this.reminderInterval2小时.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//4小时提示一次private void 小时提示一次ToolStripMenuItem1_Click(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 60 * 4;UncheckReminder();this.reminderInterval4小时.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//6小时提示一次private void 小时提示一次ToolStripMenuItem2_Click(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 60 * 6;UncheckReminder();this.reminderInterval6小时.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//8小时提示一次private void 小时提示一次ToolStripMenuItem3_Click(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 60 * 8;UncheckReminder();this.reminderInterval8小时.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//12小时提示一次private void 小时提示一次ToolStripMenuItem4_Click(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 60 * 12;UncheckReminder();this.reminderInterval12小时.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}//24小时提示一次private void 小时提示一次ToolStripMenuItem5_Click(object sender, EventArgs e){Properties.Settings.Default.reminderInterval = timeUnit * 60 * 24;UncheckReminder();this.reminderInterval24小时.Checked = true;Properties.Settings.Default.Save();timerCheckReport.Interval = Properties.Settings.Default.reminderInterval;timerCheckReport.Stop();timerCheckReport.Start();}/// <summary>/// 取消勾选/// </summary>private void UncheckReminder(){this.reminderInterval1分钟.Checked = false;this.reminderInterval2分钟.Checked = false;this.reminderInterval5分钟.Checked = false;this.reminderInterval10分钟.Checked = false;this.reminderInterval20分钟.Checked = false;this.reminderInterval30分钟.Checked = false;this.reminderInterval1小时.Checked = false;this.reminderInterval2小时.Checked = false;this.reminderInterval4小时.Checked = false;this.reminderInterval6小时.Checked = false;this.reminderInterval8小时.Checked = false;this.reminderInterval12小时.Checked = false;this.reminderInterval24小时.Checked = false;}#endregion#region timerCheckReport_Tick 消息提醒间隔定时器private void timerCheckReport_Tick(object sender, EventArgs e){try{new Thread(new ThreadStart(delegate(){try{if (!string.IsNullOrWhiteSpace(Properties.Settings.Default.userName)) //已登录 {CheckReportCount();ShowReminder();}}catch (Exception ex){}})).Start();}catch (Exception ex){}}#endregion#region 立即检测private void 立即检测ToolStripMenuItem_Click(object sender, EventArgs e){new Thread(new ThreadStart(delegate(){try{if (!string.IsNullOrWhiteSpace(Properties.Settings.Default.userName)) //已登录 {CheckReportCount();if (m_dsyCount + m_dsyFsCount + m_dshCount + m_dshFsCount + m_dpzCount + m_wtgCount > 0){ShowReminder();InvokeUtil.Invoke(this, new InvokeDelegate(delegate(){timerCheckReport.Stop();timerCheckReport.Start();}));}else{MessageBox.Show("没有待办工作!");}}else{InvokeUtil.Invoke(this, new InvokeDelegate(delegate(){CreateLogin();}));}}catch (SoapException ex){MessageBox.Show("检测失败,请检查是否断网");}catch (Exception ex){MessageBox.Show(ex.Message);}})).Start();}#endregion#region CheckReportCount 检测报告/// <summary>/// 检测报告/// </summary>private void CheckReportCount(){if (!string.IsNullOrWhiteSpace(Properties.Settings.Default.userName)) //已登录 {m_dsyCount = m_DesktopMsgService.GetDsyReportCount(Properties.Settings.Default.deptCode);m_dsyFsCount = m_DesktopMsgService.GetDsyFsReportCount(Properties.Settings.Default.userName);m_dshCount = m_DesktopMsgService.GetDshReportCount(Properties.Settings.Default.userName);m_dshFsCount = m_DesktopMsgService.GetDshFsReportCount(Properties.Settings.Default.userName);m_dpzCount = m_DesktopMsgService.GetDpzReportCount(Properties.Settings.Default.userName);m_wtgCount = m_DesktopMsgService.GetWtgReportCount(Properties.Settings.Default.userName);}}#endregion#region ShowReminder 弹出提醒/// <summary>/// 弹出提醒/// </summary>private void ShowReminder(){if (m_dsyCount + m_dsyFsCount + m_dshCount + m_dshFsCount + m_dpzCount + m_wtgCount > 0){InvokeUtil.Invoke(this, new InvokeDelegate(delegate(){m_msgForm = GetMsgForm();m_msgForm.Controls.Clear();#region 加载link//待审阅if (m_dsyCount > 0){string text = string.Format("您有 {0} 条待审阅报告", m_dsyCount);CreateMsgLine("dsy", text, "/MultilevelAudit/CheckReport/Index");}//待审阅辅审if (m_dsyFsCount > 0){string text = string.Format("您有 {0} 条待审阅辅审报告", m_dsyFsCount);CreateMsgLine("dsyfs", text, "/MultilevelAudit/AssistCheckReport/Index");}//待审核if (m_dshCount > 0){string text = string.Format("您有 {0} 条待审核报告", m_dshCount);CreateMsgLine("dsh", text, "/MultilevelAudit/AuditingReport/Index");}//待审核辅审if (m_dshFsCount > 0){string text = string.Format("您有 {0} 条待审核辅审报告", m_dshFsCount);CreateMsgLine("dshfs", text, "/MultilevelAudit/AssistAuditingReport/Index");}//待批准if (m_dpzCount > 0){string text = string.Format("您有 {0} 条待批准报告", m_dpzCount);CreateMsgLine("dpz", text, "/MultilevelAudit/AuthorizeReport/Index");}//审批未通过if (m_wtgCount > 0){string text = string.Format("您有 {0} 条审批未通过报告", m_wtgCount);CreateMsgLine("wtg", text, "/Tech/CompletedReportManage/Index?wtg=true");}#endregion#region 显示消息窗体m_msgForm.Height = m_msgForm.Controls.Count * 30 + 60;m_msgForm.Left = Screen.PrimaryScreen.WorkingArea.Width - m_msgForm.Width;m_msgForm.Top = Screen.PrimaryScreen.Bounds.Height;m_msgForm.TopLevel = true;m_msgForm.TopMost = true;m_msgForm.ShowInTaskbar = false;m_msgForm.Show();new Thread(new ThreadStart(delegate(){while (m_msgForm.Top > Screen.PrimaryScreen.WorkingArea.Height - m_msgForm.Height){InvokeUtil.Invoke(m_msgForm, new InvokeDelegate(delegate(){m_msgForm.Top = m_msgForm.Top - 1;m_msgForm.Refresh();}));Thread.Sleep(10);}})).Start();#endregion}));}}/// <summary>/// 创建一条消息/// </summary>private void CreateMsgLine(string name, string text, string url){LinkLabel link = CreateLink(name, text, 15 + m_msgForm.Controls.Count * 30);byte[] bArr = ASCIIEncoding.UTF8.GetBytes(m_Url + url);url = Convert.ToBase64String(bArr);link.Links.Clear();link.Links.Add(0, link.Text.Length,string.Format("{0}/Auth/Account/MessageReminderLoginIn?userName={1}&pwd={2}&url={3}", m_Url, m_UserName, m_Pwd, url));link.LinkClicked += new LinkLabelLinkClickedEventHandler(delegate(object obj, LinkLabelLinkClickedEventArgs ea){System.Diagnostics.Process.Start(ea.Link.LinkData.ToString());});}#endregion#region CreateLink/// <summary>/// 创建Link/// </summary>/// <param name="name">name属性</param>/// <param name="topPos">位置</param>public LinkLabel CreateLink(string name, string text, int topPos){Control[] ctrls = this.Controls.Find(name, false);if (ctrls.Length > 0){return ctrls[0] as LinkLabel;}else{LinkLabel link = new LinkLabel();link.AutoSize = true;link.LinkColor = System.Drawing.Color.Red;link.Location = new System.Drawing.Point(12, topPos);link.Name = name;link.Size = new System.Drawing.Size(65, 12);link.TabIndex = 0;link.TabStop = true;link.Text = text;m_msgForm.Controls.Add(link);return link;}}#endregion#region 关于/// <summary>/// 关于窗体/// </summary>private AboutBox m_AboutBox;/// <summary>/// 关于窗体/// </summary>private void CreateAboutBox(){if (m_AboutBox == null || m_AboutBox.IsDisposed){m_AboutBox = new AboutBox();m_AboutBox.Show(this);}else{m_AboutBox.Focus();}}private void 关于ToolStripMenuItem_Click(object sender, EventArgs e){CreateAboutBox();}#endregion#region 双击托盘图标private void notifyIcon_MouseDoubleClick(object sender, MouseEventArgs e){立即检测ToolStripMenuItem_Click(sender, e);}#endregion#region 阻止关闭窗体private void Form1_FormClosing(object sender, FormClosingEventArgs e){if (!canExit){this.WindowState = FormWindowState.Minimized;this.Visible = false;}e.Cancel = !canExit;}#endregion#region 设置/// <summary>/// 设置窗体/// </summary>private SettingsForm m_SettingsForm;/// <summary>/// 设置窗体/// </summary>private void CreateSettingsForm(){if (m_SettingsForm == null || m_SettingsForm.IsDisposed){m_SettingsForm = new SettingsForm();m_SettingsForm.Show(this);}else{m_SettingsForm.Focus();}}private void 设置ToolStripMenuItem_Click(object sender, EventArgs e){CreateSettingsForm();}#endregion} }
View Code
代码下载:点击下载源代码
截图:
WebService代码:
using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Web; using System.Web.Services; using DAL; using DBHelper; using Models;namespace TechReport.Web.WebService.DesktopMsg {/// <summary>/// 桌面消息提醒WebService/// </summary>[WebService(Namespace = "http://tempuri.org/")][WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)][System.ComponentModel.ToolboxItem(false)]// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。 // [System.Web.Script.Services.ScriptService]public class Service : System.Web.Services.WebService{#region 变量private OracleHelper dbHelper = new OracleHelper();#endregion#region HelloWorld[WebMethod]public string HelloWorld(){return "Hello World";}#endregion#region 获取待审阅报告/// <summary>/// 获取待审阅报告/// </summary> [WebMethod]public int GetDsyReportCount(string deptCode){string sql = string.Format(@"select count(1)from REPORT,REPORTSTATE,sys_user where report.reportstateid=reportstate.reportstateid and report.empcode=sys_user.empcodeand REPORT.REPORTSTATEID in({1}) and report.DEPTCODE='{0}'", deptCode, (int)Enums.ReportState.待审阅报告);return Convert.ToInt32(dbHelper.GetSingle(sql));}#endregion#region 获取待审阅辅审报告/// <summary>/// 获取待审阅辅审报告/// </summary> [WebMethod]public int GetDsyFsReportCount(string userName){string sql = string.Format(@"select count(1)from report,reportaudit,sys_user where report.reportcode=reportaudit.reportcode and report.empcode=sys_user.empcode and reportaudit.isfinished=0 and reportaudit.audittype={1} and reportaudit.auditusername='{0}'", userName, (int)Enums.AuditType.审阅辅审);return Convert.ToInt32(dbHelper.GetSingle(sql));}#endregion#region 获取待审核报告/// <summary>/// 获取待审核报告/// </summary> [WebMethod]public int GetDshReportCount(string userName){string sql = string.Format(@"select count(1)from report,reportaudit,sys_user,reportstate where report.reportcode=reportaudit.reportcode and report.empcode=sys_user.empcode and reportaudit.isfinished=0 and report.reportstateid=reportstate.reportstateid and reportaudit.audittype={2} and reportaudit.auditusername='{0}' and report.reportstateid in({1}) and report.reportTypeId in(1,2)", userName, (int)Enums.ReportState.待审核报告, (int)Enums.AuditType.审核);return Convert.ToInt32(dbHelper.GetSingle(sql));}#endregion#region 获取待审核辅审报告/// <summary>/// 获取待审核辅审报告/// </summary> [WebMethod]public int GetDshFsReportCount(string userName){string sql = string.Format(@"select count(1)from report,reportaudit,sys_user where report.reportcode=reportaudit.reportcode and report.empcode=sys_user.empcode and reportaudit.isfinished=0 and reportaudit.audittype={1} and reportaudit.auditusername='{0}'", userName, (int)Enums.AuditType.审核辅审);return Convert.ToInt32(dbHelper.GetSingle(sql));}#endregion#region 获取待批准报告/// <summary>/// 获取待批准报告/// </summary> [WebMethod]public int GetDpzReportCount(string userName){string sql = string.Format(@"select count(1)from report,reportaudit,sys_user where report.reportcode=reportaudit.reportcode and report.empcode=sys_user.empcode and reportaudit.isfinished=0 and reportaudit.audittype={2} and reportaudit.auditusername='{0}' and report.reportstateid={1} and report.reportTypeId in (1,2)", userName, (int)Enums.ReportState.待批准报告, (int)Enums.AuditType.批准);return Convert.ToInt32(dbHelper.GetSingle(sql));}#endregion#region 获取未通过报告/// <summary>/// 获取未通过报告/// </summary> [WebMethod]public int GetWtgReportCount(string userName){string sql = string.Format(@"select count(1)from REPORT,sys_user where report.empcode=sys_user.empcodeand sys_user.username='{3}'and REPORT.REPORTSTATEID in({0},{1},{2})", (int)Enums.ReportState.审阅未通过报告, (int)Enums.ReportState.审核未通过报告, (int)Enums.ReportState.批准未通过报告, userName);return Convert.ToInt32(dbHelper.GetSingle(sql));}#endregion} }
View Code
与用户登录相关的代码:
#region 消息提醒器登录 /// <summary> /// 消息提醒器登录 /// </summary> /// <param name="userName">用户名</param> /// <param name="pwd">密码(加密状态)</param> [AuthIgnore] public ActionResult MsgReminderLoginIn(string userName, string pwd) {SYS_USER empDetail = m_UserDal.Get(userName);if (empDetail != null && empDetail.PASSWORD == pwd){Session["_sysAuth"] = userName;return Content("OK|" + empDetail.EMPNAME + "|" + empDetail.DEPTCODE);}return Content("登录失败!"); } /// <summary> /// 消息提醒器登录 /// </summary> /// <param name="userName">用户名</param> /// <param name="pwd">密码(加密状态)</param> /// <param name="url">跳转url</param> [AuthIgnore] public ActionResult MessageReminderLoginIn(string userName, string pwd, string url) {SYS_USER empDetail = m_UserDal.Get(userName);if (empDetail != null && empDetail.PASSWORD == pwd){Session["_sysAuth"] = userName;return new RedirectResult(ASCIIEncoding.UTF8.GetString(Convert.FromBase64String(url)));}return Content("登录失败,没有权限!"); }
View Code
转载于:https://www.cnblogs.com/s0611163/p/5091723.html
工作流待办事项消息提醒相关推荐
- 工作流之待办事宜消息提醒篇
目的: 最近老是听到用户没有及时登录到eip中审批文件,导致事情延误的事情.细想一下也没办法,基于B/S下的工作流确实没有winform那样方便的提醒功能,虽然里面也有提醒,但也只是在eip打开的情况 ...
- python 日程(待办事项) 提醒简单小程序——基于Timer和tkinter
想找一个桌面待办事项提醒的软件,找了好久都没有找到合适的,现有软件的提醒时间都只是精确到上下午或晚上,没有能精确到分钟,便想着自己做一个,这样子还能顺带加强自己对python的学习. 功能目标:输入时 ...
- 如何设置敬业签定时提醒待办事项?
如何设置敬业签定时提醒待办事项? 一.敬业签电脑版如何设置定时提醒待办事项? 1.1.在电脑版敬业签待办分类内新增或编辑一条待办事项,并点击输入框下面的时钟图标: 1.2.设置待办事项提醒日期.时间等 ...
- 系统待办事项设计_B端产品工作台设计详解
编辑导语:B端产品的设计更多地是为了提高企业员工的工作效率,而工作台的设计则是为了提高员工使用B端产品的效率,因此,工作台对B端产品而言具有非常重要的意义:本文作者详细介绍了B端产品工作台设计内容. ...
- 企业微信如何创建待办事项?
日常工作中总会有一些重要事项需要按时完成,否则会影响工作进度,为了避免遗忘可以在企业微信上创建待办事项. 前言 在日常工作中,每天都有各种各样的工作内容需要完成,而且有些重要事项需要按时去完成,否则会 ...
- 如何云同步敬业签待办事项任务?
如何云同步敬业签待办事项任务? 敬业签待办事项支持Windows电脑.Android安卓手机.iPhone苹果手机分别下载安装敬业签,然后使用同一个敬业签帐号分别登录.在任意一端记录的待办事项任务将云 ...
- 什么是待办事项?日常办事项清单怎么写
什么是待办事项?待办事项简单来说就是还没有完成,但是需要完成的事项.这类事项非常容易忘记,而且忘记了会给自己和周围的人带来麻烦.如果你每天事情比较多,想要记住所有的事情显然不可能,这就需要一个记录清单 ...
- 管理每日待办事项的日程安排APP有吗?
手机上有哪些管理每日待办事项的日程安排APP? 手机上使用的管理个人待办事项的桌面日程安排软件,通常是一些手机便签.手机日历等程序. 便签可以用来记录备忘待办事项,日历则兼具日程提醒的功能,无论是便签 ...
- 电脑待办事项软件推荐,电脑上记录待办事项用哪个工具
很多人在日常办公中都离不开使用电脑,很多事情都要借助电脑上的一些工具来记录,可用于日常工作中记录待办事项的软件是比较多的,大家在选择这类软件时,往往比较看重软件的口碑.品质等,不可能找到一个去试验一个 ...
- 2022年度待办事项以及任务清单类便签app推荐
2022年已经开始了,在新的一年里,又要大干一场了.工欲善其事必先利其器,计划做完之后,总要有能记录待办事项以及任务清单的应用,可以记录自己要做的事情,方便自己及时查看自己有哪些事情没有做,尽早安排自 ...
最新文章
- MFC菜鸟学编程——第一篇
- Java多线模式-Producer-Consumer模式(生产者、消费者模式)
- C语言写的俄罗斯方块
- 为什么分类对象越多训练时间越长?
- Kubernetes存储之Secret
- Qt Creator将QML模块与插件一起使用
- Linux下source命令
- 20210314:力扣第 232 场周赛
- 高等代数——大学高等代数课程创新教材(丘维声)——3.2笔记+习题
- uniapp遮罩_uni-app 遮罩模板
- android 手机壁纸制作教程,教程:让你的手机桌面瞬间高逼格!
- toms 尺寸 shoes or boots finds
- 一步一回头撞在了南墙上
- 蓝牙连接的sco问题
- pink老师学习之Echarts
- Liunx下Qos功能实现简析
- 考研数据结构之线性表(1.7)——练习题之分离单链表的奇数偶数(C表示)
- 有趣的Unicode字符
- 小米汽车设计图纸泄露,官方称非最终文件;微软裁员遣散费高达8亿美元,人均获赔54万元;苹果暂停自研Wi-Fi芯片|极客头条...
- SAP 生产订单/流程订单中日期的解释
热门文章
- 微信云开发之小游戏排行榜的实现,云数据库,云函数【白玉无冰】每天进步一点点
- OpenStack实践(十一):Instance Live Migrate and Evacuate
- 雷顿学院大数据一期课程免费下载
- 微信小程序相关操作示例
- python爬虫自动更换ip_python爬虫:自动投票代码(自动爬取代理IP)
- 【序列化】Kryo 的几种常见序列化实现方式,及其兼容性
- 蓝桥杯——鲁卡斯队列
- matlab匿名函数如何写,matlab的匿名函数
- 笔记本计算机的连接无线网络连接,计算机无法连接到无线网络,我将详细教您解决笔记本电脑无法连接到无线网络...
- doctrine安装和配置