Esempio n. 1
0
        protected override void Execute(CodeActivityContext context)
        {
            int resultState = State.Get(context);

            YunShanOA.DataAccess.Mapping.YunShanOADataContext dc = new DataAccess.Mapping.YunShanOADataContext();
            MeetingApplyForm query = (from p in dc.MeetingApplyForm where p.WFID == UpdateApplyInfo.Get(context).WFID select p).FirstOrDefault();
            MeetingApplyForm info  = query;

            info.MeetingStatus = resultState;
            dc.SubmitChanges();
            int meetingApplyFormID = ((from p in dc.MeetingApplyForm where p.WFID == UpdateApplyInfo.Get(context).WFID select p).FirstOrDefault()).MeetingApplyFormID;

            //如果审核通过,将会议申请所选的设备持久化到数据库
            if (resultState == 1)
            {
                YunShanOA.DataAccess.Mapping.MeetingAndEquipment mae = null;
                //提交会议申请中的所填写的会议设备申请
                if (null != MeetingEquipmentNameAndCount.Get(context))
                {
                    foreach (var item in MeetingEquipmentNameAndCount.Get(context))
                    {
                        mae = new MeetingAndEquipment();
                        mae.MeetingApplyFormID    = meetingApplyFormID;
                        mae.MeetingEquipmentID    = item.Key;
                        mae.MeetingEquipmentCount = item.Value;
                        dc.MeetingAndEquipment.InsertOnSubmit(mae);
                        dc.SubmitChanges();
                    }
                }

                ////提交会议申请中所选择的会议室
                //if (null != MeetingRoomIDAndName.Get(context))
                //{
                //    YunShanOA.DataAccess.Mapping.MeetingAndRoom mr = new MeetingAndRoom();
                //    mr.MeetingApplyFormID = meetingApplyFormID;
                //    mr.MeetingRoomID = MeetingRoomIDAndName.Get(context).MeetingRoomID;
                //    mr.Status = 2;
                //    dc.MeetingAndRoom.InsertOnSubmit(mr);
                //    dc.SubmitChanges();

                //}
                //提交会议申请中选择的用户名
                if (null != MeetingUserNameAndEmail.Get(context))
                {
                    YunShanOA.DataAccess.Mapping.MeetingAndUser mau = null;
                    foreach (var item in MeetingUserNameAndEmail.Get(context))
                    {
                        mau = new MeetingAndUser();
                        mau.MeetingApplyFormID = meetingApplyFormID;
                        mau.UserName           = item.Value;
                        dc.MeetingAndUser.InsertOnSubmit(mau);
                        dc.SubmitChanges();
                    }
                }
            }
        }
        protected override void Execute(CodeActivityContext context)
        {
            YunShanOA.BusinessLogic.UseCar.UsecarApplyformManager ApplyformManager = new BusinessLogic.UseCar.UsecarApplyformManager();
            usecarapplyform myform = UpdateApplyInfo.Get(context);

            myform.EndTime     = RenewForm.Get(context).RenewCarTime;
            myform.ApplyStatus = 6;
            ApplyformManager.Sava(myform);
            OUTApplyForm.Set(context, myform);
        }
Esempio n. 3
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);
        }
Esempio n. 4
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);
        }