Ejemplo n.º 1
0
        public ModelResponse SignUp(ref OrgVm vm, string password, string fileFolder)
        {
            try
            {
                //Validations
                var ret = ValidateOrgProfile(vm, fileFolder);
                if (ret != null)
                {
                    return(ret);
                }

                //Verify Auth Letter File Path
                if (!File.Exists(Path.Combine(fileFolder, vm.AuthLetterFileName)))
                {
                    return(new ModelResponse(102));
                }

                //Save to DB
                vm.Approval = Approval.Pending;
                Repo.SignUp(ref vm);
            }
            catch (Exception ex)
            {
                return(new ModelResponse(ex));
            }

            return(new ModelResponse(0, vm.PortalUserId));
        }