コード例 #1
0
        public int AddNewOrganisation(string firstName, string LastName, string email, string username, string password, string gender, string address, string bloodGroup, string organisationName, int govtLicenseNo, int userType)
        {
            OrganisationService organisationService = new OrganisationService();
            int result = organisationService.GovtLicenseValidation(govtLicenseNo, organisationName);

            organisationService = new OrganisationService();
            if (result == 1)
            {
                User volunteerOrganisation = new User()
                {
                    FirstName        = firstName,
                    LastName         = LastName,
                    Email            = email,
                    Username         = username,
                    Password         = password,
                    Gender           = gender,
                    Address          = address,
                    BloodGroup       = bloodGroup,
                    OrganisationName = organisationName,
                    GovtLicenseNo    = govtLicenseNo,
                    UserType         = userType
                };
                //this.adminDataAccess = new AdminDataAccess();
                return(adminDataAccess.AddUser(volunteerOrganisation));
            }
            return(-1);
        }
コード例 #2
0
        public int AddNewUser(string firstName, string LastName, string email, string username, string password, string gender, string address, string bloodGroup, string organisationName, int govtLicenseNo, int userType)
        {
            User donor = new User()
            {
                FirstName        = firstName,
                LastName         = LastName,
                Email            = email,
                Username         = username,
                Password         = password,
                Gender           = gender,
                Address          = address,
                BloodGroup       = bloodGroup,
                OrganisationName = organisationName,
                GovtLicenseNo    = govtLicenseNo,
                UserType         = userType
            };
            OrganisationService organisationService = new OrganisationService();

            return(userDataAccess.AddUser(donor));
        }