Esempio n. 1
0
        /// <summary>
        /// 将表单送签
        /// </summary>
        /// <param name="formNo">表单号</param>
        /// <param name="empNo">送签人</param>
        /// <returns></returns>
        public bool Send(string formNo, string empNo)
        {
            string firstEmployee;

            //送签结果
            bool result = _iApplying.Send(formNo, empNo, out firstEmployee);

            //
            //邮件通知
            //
            if (!result)
            {
                return(false);
            }
            var signs = new List <string> {
                firstEmployee
            };

            var emailForm = new Carlzhu.Iooin.Business.BaseModule.BpmBll(formNo, empNo);

            //var emailForm = new EmailForm(formNo, empNo);
            emailForm.Send();
            emailForm.NoticeSigner(signs);
            emailForm.NoticeReplace(signs);

            TemplateBll.SendBpm(emailForm);

            return(true);
        }
Esempio n. 2
0
        /// <summary>
        /// 申请人表单操作之崔签
        /// </summary>
        /// <param name="formNo"></param>
        /// <param name="empNo"></param>
        /// <returns></returns>
        public bool Urge(string formNo, string empNo)
        {
            //检查表单所有人
            var forms = new BaseServices <Form>().LoadEntities(c => c.CreateEmpNo == empNo && c.FormNo == formNo).FirstOrDefault();

            if (forms == null)
            {
                return(false);
            }

            var signs = new BaseServices <FormSign>().LoadEntities(c => c.FormNo == formNo && c.SignResult == (int)FormSign.SignResultEnum.Watting);

            //崔签邮件
            if (signs.Any())
            {
                var signsEmp = new List <string>();
                signs.ToList().ForEach(c => signsEmp.Add(c.BaseEmployee.EmpNo));

                var emailForm = new Carlzhu.Iooin.Business.BaseModule.BpmBll(formNo, empNo);
                //var emailForm = new EmailForm(formNo, empNo);
                emailForm.Urge(signsEmp);
                emailForm.NoticeReplace(signsEmp);


                //var email = new Email();
                //email.SdEmail += new Mailtemp.SendMail().Bpm;
                //emailForm.GetArgses().ForEach(a => email.Sending(a));
                TemplateBll.SendBpm(emailForm);
            }



            return(true);
        }