Ejemplo n.º 1
0
    private void BackFlow()
    {
        FlowsInfo flowsInfo = this.ViewState["Flow"] as FlowsInfo;
        string    str       = string.Concat(new string[]
        {
            flowsInfo.HasOperatedUserList,
            this.RealName,
            "#",
            this.Uid,
            "#",
            this.DepName,
            ","
        });
        string cmdText = "update Flows set Status=-2,HasOperatedUserList='" + str + "' where status=0 and id=" + base.Request.QueryString["fl"];

        MsSqlOperate.ExecuteNonQuery(CommandType.Text, cmdText, new SqlParameter[0]);
        string title     = "[系统通知] : 您申请的工作流程(" + flowsInfo.Flow_Name + ") 已被退回!";
        string content   = "您的审批流程 没有被通过!";
        int    creatorID = flowsInfo.CreatorID;
        string userlist  = string.Concat(new object[]
        {
            flowsInfo.CreatorRealName,
            "#",
            flowsInfo.CreatorID,
            "#",
            flowsInfo.CreatorDepName,
            ","
        });
        string namelist = flowsInfo.CreatorRealName + "(" + flowsInfo.CreatorDepName + "),";

        Help.AdminSendMail(title, content, creatorID, userlist, namelist);
    }
Ejemplo n.º 2
0
		private void FinishFlow()
		{
			GovInfo govInfo = this.ViewState["Flow"] as GovInfo;
			string str = string.Concat(new string[]
			{
				govInfo.HasOperatedUserList,
				this.RealName,
				"#",
				this.Uid,
				"#",
				this.DepName,
				","
			});
			string cmdText = "update Gov set Status=1,HasOperatedUserList='" + str + "' where status=0 and id=" + base.Request.QueryString["fl"];
			MsSqlOperate.ExecuteNonQuery(CommandType.Text, cmdText, new SqlParameter[0]);
			string title = "[系统通知] : 您拟稿的公文(" + govInfo.Flow_Name + ") 已通过审批正式签发!";
			string content = "恭喜您! 公文通过所有审核审批步骤 已成功签发!";
			int creatorID = govInfo.CreatorID;
			string userlist = string.Concat(new object[]
			{
				govInfo.CreatorRealName,
				"#",
				govInfo.CreatorID,
				"#",
				govInfo.CreatorDepName,
				","
			});
			string namelist = govInfo.CreatorRealName + "(" + govInfo.CreatorDepName + "),";
			Help.AdminSendMail(title, content, creatorID, userlist, namelist);
		}
Ejemplo n.º 3
0
    private void Show(string id)
    {
        this.mid = id;
        MailsInfo byId = Mails.Init().GetById(Convert.ToInt32(this.mid));

        if (byId.ReceiverID == Convert.ToInt32(this.Uid) || byId.SenderID == Convert.ToInt32(this.Uid))
        {
            Mails_DetailInfo byId2 = Mails_Detail.Init().GetById(byId.did);
            this.Subject.InnerText = byId.Subject;
            this.Sender.InnerText  = byId.SenderRealName + " (" + byId.SenderDepName + ")";
            this.bet = byId.ReceiverID + ";" + byId.SenderID;
            this.Sendtime.InnerText = Utils.ConvertDate2(byId.SendTime) + " (" + Utils.GetDayOfWeek(byId.SendTime) + ")";
            this.sjr.InnerText      = Utils.GetSubString2(byId2.SendRealNames, 250, "...");
            if (!string.IsNullOrEmpty(byId2.CcRealNames))
            {
                this.csr = "<br><span style='font-weight:bold; color:#006600;'>抄送人</span>:" + Utils.GetSubString2(byId2.CcRealNames, 250, "...");
            }
            if (!string.IsNullOrEmpty(byId2.Attachments))
            {
                this.fjs = "<br><span style='font-weight:bold; color:#006600;'>附 &nbsp;&nbsp;&nbsp;件</span>:";
                string[] array = byId2.Attachments.Split(new char[]
                {
                    '|'
                });
                for (int i = 0; i < array.Length; i++)
                {
                    if (array[i].Trim() != "")
                    {
                        int    num = array[i].LastIndexOf('/') + 1;
                        string arg = array[i].Substring(num, array[i].Length - num);
                        string s   = array[i].Replace("~", "");
                        this.fjs += string.Format(this.fj, base.Server.UrlEncode(s), arg);
                    }
                }
            }
            byId2.Bodys = (byId2.Bodys ?? "");
            if (byId2.Bodys.ToLower().Contains("script"))
            {
                this.bodys.InnerHtml = byId2.Bodys.ToLower().Replace("script", "scrript");
            }
            else
            {
                this.bodys.InnerHtml = byId2.Bodys;
            }
            if (byId.IsRead == 0)
            {
                byId.IsRead = 1;
                Mails.Init().Update(byId);
                if (byId.SenderGUID == "1" && byId.ReceiverID == Convert.ToInt32(this.Uid) && byId.FolderType == 0)
                {
                    string title   = "[系统通知] : 收件人(" + this.RealName + ")已查看您发送的邮件!";
                    string content = string.Concat(new string[]
                    {
                        "您好! 您撰写发送的的邮件<br>“<strong>",
                        byId.Subject,
                        "</strong>” (发送于 ",
                        Utils.ConvertDate3(byId.SendTime),
                        ") <br><br>收件人<strong>(",
                        this.RealName,
                        ")</strong>已于 ",
                        Utils.ConvertDate3(DateTime.Now),
                        " 拆启查阅。<br>"
                    });
                    int    senderID = byId.SenderID;
                    string userlist = string.Concat(new object[]
                    {
                        byId.SenderRealName,
                        "#",
                        byId.SenderID,
                        "#",
                        byId.SenderDepName,
                        ","
                    });
                    string namelist = byId.SenderRealName + "(" + byId.SenderDepName + "),";
                    Help.AdminSendMail(title, content, senderID, userlist, namelist);
                }
            }
            this.ViewState["retitle"] = byId.Subject;
            this.ViewState["sid"]     = byId.SenderID;
            this.ViewState["snames"]  = byId.SenderRealName;
            this.ViewState["sdep"]    = byId.SenderDepName;
        }
        else
        {
            base.Response.Write("<script>alert('您没有查看权限');window.location='Mail_List.aspx?fid=0';</script>");
        }
    }
Ejemplo n.º 4
0
		private void UpdateTasksUser(string old_str, string new_str, TasksInfo tk)
		{
			List<string> list = new List<string>();
			List<string> list2 = new List<string>();
			List<string> list3 = new List<string>();
			List<string> list4 = new List<string>();
			if (old_str.Contains(","))
			{
				string[] array = old_str.Split(new char[]
				{
					','
				});
				int i = 0;
				int num = array.Length;
				while (i < num)
				{
					if (array[i].Contains("#"))
					{
						list.Add(array[i]);
					}
					i++;
				}
			}
			if (new_str.Contains(","))
			{
				string[] array = new_str.Split(new char[]
				{
					','
				});
				int i = 0;
				int num = array.Length;
				while (i < num)
				{
					if (array[i].Contains("#"))
					{
						list2.Add(array[i]);
					}
					i++;
				}
			}
			string text = string.Join("!", list.ToArray());
			string text2 = string.Join("!", list2.ToArray());
			string[] array2 = list.ToArray();
			string[] array3 = list2.ToArray();
			for (int i = 0; i < array2.Length; i++)
			{
				if (text2.IndexOf(array2[i]) == -1)
				{
					list4.Add(array2[i]);
				}
			}
			for (int i = 0; i < array3.Length; i++)
			{
				if (text.IndexOf(array3[i]) == -1)
				{
					list3.Add(array3[i]);
				}
			}
			foreach (string current in list3)
			{
				if (current.Contains("#"))
				{
					Tasks_UserInfo tasks_UserInfo = new Tasks_UserInfo();
					tasks_UserInfo.TaskID = tk.id;
					tasks_UserInfo.RealName = current.Split(new char[]
					{
						'#'
					})[0];
					tasks_UserInfo.UserID = Convert.ToInt32(current.Split(new char[]
					{
						'#'
					})[1]);
					tasks_UserInfo.DepName = current.Split(new char[]
					{
						'#'
					})[2];
					tasks_UserInfo.AddTime = "";
					tasks_UserInfo.WorkTag = -1;
					tasks_UserInfo.Instruction = "";
					Tasks_User.Init().Add(tasks_UserInfo);
					string title = "[系统通知] : " + tasks_UserInfo.RealName + ", 您好! 您有新工作任务需要执行!";
					string content = string.Concat(new string[]
					{
						"任务名称:<strong>",
						tk.TaskName,
						"</strong><br>任务分类:",
						tk.TypeName,
						" <br>任务级别:",
						tk.Important,
						"<br>任务管理者:",
						tk.ManageNameList,
						"<br>"
					});
					int userID = tasks_UserInfo.UserID;
					string text3 = string.Concat(new object[]
					{
						tasks_UserInfo.RealName,
						"#",
						tasks_UserInfo.id,
						"#",
						tasks_UserInfo.DepName,
						","
					});
					string text4 = tasks_UserInfo.RealName + "(" + tasks_UserInfo.DepName + "),";
					Help.AdminSendMail(title, content, userID, text3, text4);
				}
			}
			foreach (string current in list4)
			{
				if (current.Contains("#"))
				{
					IList all = Tasks_User.Init().GetAll("UserID=" + current.Split(new char[]
					{
						'#'
					})[1], null);
					foreach (object current2 in all)
					{
						Tasks_UserInfo tasks_UserInfo = current2 as Tasks_UserInfo;
						try
						{
							Help.DeleteFiles(tasks_UserInfo.FilePath);
						}
						catch
						{
						}
						Tasks_User.Init().Delete(tasks_UserInfo.id);
					}
				}
			}
		}
Ejemplo n.º 5
0
		private void SendManageMail(bool isadd, string old_str, string new_str, TasksInfo tk)
		{
			if (isadd)
			{
				if (old_str.Contains(","))
				{
					string[] array = old_str.Split(new char[]
					{
						','
					});
					int i = 0;
					int num = array.Length;
					while (i < num)
					{
						if (array[i].Contains("#"))
						{
							string title = "[系统通知] : " + array[i].Split(new char[]
							{
								'#'
							})[0] + ", 您好! 您有新工作任务需要管理!";
							string content = string.Concat(new string[]
							{
								"任务名称:<strong>",
								tk.TaskName,
								"</strong><br>任务分类:",
								tk.TypeName,
								" <br>任务级别:",
								tk.Important,
								"<br>任务管理者:",
								tk.ManageNameList,
								"<br>"
							});
							int receiverid = Convert.ToInt32(array[i].Split(new char[]
							{
								'#'
							})[1]);
							string text = string.Concat(new string[]
							{
								array[i].Split(new char[]
								{
									'#'
								})[0],
								"#",
								array[i].Split(new char[]
								{
									'#'
								})[1],
								"#",
								array[i].Split(new char[]
								{
									'#'
								})[2],
								","
							});
							string text2 = array[i].Split(new char[]
							{
								'#'
							})[0] + "(" + array[i].Split(new char[]
							{
								'#'
							})[2] + "),";
							Help.AdminSendMail(title, content, receiverid, text, text2);
						}
						i++;
					}
				}
			}
			else
			{
				List<string> list = new List<string>();
				List<string> list2 = new List<string>();
				List<string> list3 = new List<string>();
				if (old_str.Contains(","))
				{
					string[] array = old_str.Split(new char[]
					{
						','
					});
					int i = 0;
					int num = array.Length;
					while (i < num)
					{
						if (array[i].Contains("#"))
						{
							list.Add(array[i]);
						}
						i++;
					}
				}
				if (new_str.Contains(","))
				{
					string[] array = new_str.Split(new char[]
					{
						','
					});
					int i = 0;
					int num = array.Length;
					while (i < num)
					{
						if (array[i].Contains("#"))
						{
							list2.Add(array[i]);
						}
						i++;
					}
				}
				string text3 = string.Join("!", list.ToArray());
				string.Join("!", list2.ToArray());
				string[] array2 = list2.ToArray();
				for (int i = 0; i < array2.Length; i++)
				{
					if (text3.IndexOf(array2[i]) == -1)
					{
						list3.Add(array2[i]);
					}
				}
				foreach (string current in list3)
				{
					if (current.Contains("#"))
					{
						string title = "[系统通知] : " + current.Split(new char[]
						{
							'#'
						})[0] + ", 您好! 您有新工作任务需要管理!";
						string content = string.Concat(new string[]
						{
							"任务名称:<strong>",
							tk.TaskName,
							"</strong><br>任务分类:",
							tk.TypeName,
							" <br>任务级别:",
							tk.Important,
							"<br>任务管理者:",
							tk.ManageNameList,
							"<br>"
						});
						int receiverid = Convert.ToInt32(current.Split(new char[]
						{
							'#'
						})[1]);
						string text = string.Concat(new string[]
						{
							current.Split(new char[]
							{
								'#'
							})[0],
							"#",
							current.Split(new char[]
							{
								'#'
							})[1],
							"#",
							current.Split(new char[]
							{
								'#'
							})[2],
							","
						});
						string text2 = current.Split(new char[]
						{
							'#'
						})[0] + "(" + current.Split(new char[]
						{
							'#'
						})[2] + "),";
						Help.AdminSendMail(title, content, receiverid, text, text2);
					}
				}
			}
		}
Ejemplo n.º 6
0
		private void AddTasksUser(string ulist, int tid, TasksInfo tk)
		{
			if (ulist.Contains(","))
			{
				string[] array = ulist.Split(new char[]
				{
					','
				});
				int i = 0;
				int num = array.Length;
				while (i < num)
				{
					if (array[i].Contains("#"))
					{
						Tasks_UserInfo tasks_UserInfo = new Tasks_UserInfo();
						tasks_UserInfo.TaskID = tid;
						tasks_UserInfo.RealName = array[i].Split(new char[]
						{
							'#'
						})[0];
						tasks_UserInfo.UserID = Convert.ToInt32(array[i].Split(new char[]
						{
							'#'
						})[1]);
						tasks_UserInfo.DepName = array[i].Split(new char[]
						{
							'#'
						})[2];
						tasks_UserInfo.AddTime = "";
						tasks_UserInfo.WorkTag = -1;
						tasks_UserInfo.Instruction = "";
						Tasks_User.Init().Add(tasks_UserInfo);
						string title = "[系统通知] : " + tasks_UserInfo.RealName + ", 您好! 您有新工作任务需要执行!";
						string content = string.Concat(new string[]
						{
							"任务名称:<strong>",
							tk.TaskName,
							"</strong><br>任务分类:",
							tk.TypeName,
							" <br>任务级别:",
							tk.Important,
							"<br>任务管理者:",
							tk.ManageNameList,
							"<br>"
						});
						int userID = tasks_UserInfo.UserID;
						string text = string.Concat(new object[]
						{
							tasks_UserInfo.RealName,
							"#",
							tasks_UserInfo.id,
							"#",
							tasks_UserInfo.DepName,
							","
						});
						string text2 = tasks_UserInfo.RealName + "(" + tasks_UserInfo.DepName + "),";
						Help.AdminSendMail(title, content, userID, text, text2);
					}
					i++;
				}
			}
		}