Esempio n. 1
0
        public override void Save()
        {
            BLL.RegistrationBiz biz = new BLL.RegistrationBiz();



            using (RegistrationService.RegistrationServiceClient svc = new RegistrationService.RegistrationServiceClient())
            {
                DTO.ResponseService <DTO.Registration> res = new DTO.ResponseService <DTO.Registration>();
                switch (StateStatus)
                {
                case IAS.BLL.RegistrationIAS.States.RegistrationStatus.NewRegisteration:
                    if (this.StateStatus == States.RegistrationStatus.NewRegisteration)
                    {
                        UploadAttachFiles();
                        res = svc.InsertWithAttatchFile(DTO.RegistrationType.General,
                                                        this.ConvertToDTORegisteration(),
                                                        this.AttachFiles.ConvertToRegistrationAttachFiles().ToArray());
                    }
                    break;

                case IAS.BLL.RegistrationIAS.States.RegistrationStatus.WaitForApprove:
                    break;

                case IAS.BLL.RegistrationIAS.States.RegistrationStatus.Approve:
                    break;

                case IAS.BLL.RegistrationIAS.States.RegistrationStatus.Disapprove:
                    break;

                case IAS.BLL.RegistrationIAS.States.RegistrationStatus.WaitForApproveEdit:
                    break;

                case IAS.BLL.RegistrationIAS.States.RegistrationStatus.ApproveEdit:
                    break;

                case IAS.BLL.RegistrationIAS.States.RegistrationStatus.DisapproveEdit:
                    break;

                case IAS.BLL.RegistrationIAS.States.RegistrationStatus.Cancel:
                    break;

                default:
                    break;
                }



                if (res.IsError)
                {
                    throw new RegistrationException(res.ErrorMsg);
                }
            }
        }
Esempio n. 2
0
        public override void Save()
        {
            BLL.RegistrationBiz biz = new BLL.RegistrationBiz();

            UploadAttachFiles();

            using (RegistrationService.RegistrationServiceClient svc = new RegistrationService.RegistrationServiceClient())
            {
                DTO.ResponseService <DTO.Registration> res = svc.InsertWithAttatchFile(DTO.RegistrationType.General,
                                                                                       this.ConvertToDTORegisteration(),
                                                                                       this.AttachFiles.ConvertToRegistrationAttachFiles().ToArray());
                if (res.IsError)
                {
                    throw new RegistrationException(res.ErrorMsg);
                }
            }
        }