Exemplo n.º 1
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);
        }