Ejemplo n.º 1
0
        /// <summary>
        /// 通知代理人
        /// </summary>
        /// <param name="sourceEmps"></param>
        /// <returns></returns>
        public void NoticeReplace(List <string> sourceEmps)
        {
            if (base.Form.BaseEmployee.Email == null)
            {
                return;
            }
            sourceEmps.ForEach(emp =>
            {
                BaseEmployee sourceEmployee = new BaseEmployeeBll().Single(emp);

                List <FormProxy> replaceEmployees =
                    new   BaseServices <FormProxy>().LoadEntities(c => c.SourceEmpNo == emp && c.FormId == base.Form.FormType.FormId && c.StarTime <DateTime.Now && c.EndTime> DateTime.Now).ToList();
                replaceEmployees.ForEach(e => base.ListArgs.Add(new EmailFormEventArgs()
                {
                    To = new Dictionary <string, string> {
                        { e.BaseEmployee.Email, e.BaseEmployee.Account }
                    },
                    Subject  = "表单签核通知【代签】[" + base.Form.FormType.FormName + "]",
                    NickName = e.BaseEmployee.Account,
                    Title    = "表单签核通知【代签】[" + base.Form.FormType.FormName + "]",
                    From     = "MINICUT",
                    Content  = "<p>系统中有一张由" + base.Form.BaseEmployee.Account + "申请的表单需要您或 <b>" + sourceEmployee.Account + "</b> 的处理;</p><p>表单号为:" + base.Form.FormNo + ";</p>",
                    Date     = DateTime.Now,
                    Link     = $"进入系统处理表单<a href='{HostUrl}{"/eForm/Signing/Index"}' >进入系统</a>"
                }));
            });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 异常申请单各回复
        /// </summary>
        /// <param name="formNo"></param>
        /// <returns></returns>
        public static string GetSignMarkByItemAndFormNo(string formNo)
        {
            if (string.IsNullOrEmpty(formNo))
            {
                return("");
            }
            var           formSign = new BaseServices <FormSign>().LoadEntities(c => c.FormNo == formNo).ToList();
            StringBuilder sb       = new StringBuilder();

            formSign.ForEach(c => sb.Append("<p>" + c.BaseEmployee.Account + ":" + c.SignMark + "</p>"));
            return(sb.ToString());
        }