示例#1
0
 // 如果活动返回值,则从 CodeActivity<TResult>
 // 派生并从 Execute 方法返回该值。
 protected override void Execute(CodeActivityContext context)
 {
     // 获取 Text 输入参数的运行时值
     if (2 == ReviewUseCarApplyForm.Get(context).Agree)
     {
         StringBuilder MailBody = new StringBuilder();
         MailBody.Append("你好,这里是云山OA用车部门发布的信息,由");
         MailBody.Append(Apply.Get(context).ApplyUserName.ToString() + "发布续车申请,由于各种原因不能通过,请仔细检查原因,重新申请,如果有问题乐意联系我们!!");
         MailModel mailModel = new MailModel();
         mailModel.MailBody = MailBody.ToString();
         // mailModel.MailBody
         mailModel.DisplayName = "云山用车部门";
         mailModel.MailSubject = "续车申请不能通过!!";
         YunShanOA.Common2.SendEmail2.SendEmailToUseCarUsers(new YunShanOA.BusinessLogic.UseCar.UsecarAndUserManager().GetCarAndUserlistByFormID(Apply.Get(context).UseCarApplyFormID), mailModel);
     }
     else
     {
         StringBuilder MailBody = new StringBuilder();
         MailBody.Append("你好,这里是云山OA用车部门发布的信息,由");
         MailBody.Append(Apply.Get(context).ApplyUserName.ToString() + "发布续车申请已经通过,开始时间是:");
         MailBody.Append(Apply.Get(context).BeginTime.ToString() + ",结束时间是:");
         MailBody.Append(Apply.Get(context).EndTime + ",如果有问题,请联系我们!!!");
         MailModel mailModel = new MailModel();
         mailModel.MailBody = MailBody.ToString();
         // mailModel.MailBody
         mailModel.DisplayName = "云山用车部门";
         mailModel.MailSubject = "续车申请通过!!";
         YunShanOA.Common2.SendEmail2.SendEmailToUseCarUsers(new YunShanOA.BusinessLogic.UseCar.UsecarAndUserManager().GetCarAndUserlistByFormID(Apply.Get(context).UseCarApplyFormID), mailModel);
     }
 }
示例#2
0
        protected override void Execute(CodeActivityContext context)
        {
            YunShanOA.BusinessLogic.UseCar.UsecarApplyformManager ApplyformManager = new BusinessLogic.UseCar.UsecarApplyformManager();
            usecarapplyform myform = UpdateApplyInfo.Get(context);

            myform.ApplyStatus = ReviewUseCarApplyForm.Get(context).Agree;
            ApplyformManager.Sava(myform);
            new YunShanOA.BusinessLogic.UseCar.ReviewUseCarApplyFormManager().Save((YunShanOA.Model.UseCarModel.ReviewUseCarApplyForm)ReviewUseCarApplyForm.Get(context));
            OUTApplyForm.Set(context, myform);
        }
示例#3
0
        protected override void Execute(CodeActivityContext context)
        {
            YunShanOA.BusinessLogic.UseCar.UsecarApplyformManager ApplyformManager = new BusinessLogic.UseCar.UsecarApplyformManager();
            usecarapplyform myform = UpdateApplyInfo.Get(context);

            if (ReviewUseCarApplyForm.Get(context).Agree == 1)
            {
                myform.BeginTime = BeginTime.Get(context);
            }
            myform.ApplyStatus = 4;

            ApplyformManager.Sava(myform);
            OUTApplyForm.Set(context, myform);
        }