public bool AddDonar(UserInfo uinfo, DonarDetails dd)
 {
     throw new NotImplementedException();
 }
 private static void fillGender(UserInfo userInfo, DataAccess.UserInformation uinfo)
 {
     switch (userInfo.Gender)
     {
         case Gender.Male:
             uinfo.Gender = 'M';
             break;
         case Gender.Female:
             uinfo.Gender = 'F';
             break;
         case Gender.Transgender:
             uinfo.Gender = 'T';
             break;
         case Gender.None:
             uinfo.Gender = 'N';
             break;
     }
 }
        private bool registerUser(UserInfo userInfo)
        {
            Login login = new DataAccess.Login();
            login.UserName = userInfo.UserName;
            login.Password = userInfo.Password;
            login.UserID = Guid.NewGuid().ToString();
            UserInformation uinfo = new DataAccess.UserInformation();
            context.Logins.InsertOnSubmit(login);
            uinfo.UserId = login.UserID;
            fillGender(userInfo, uinfo);
            uinfo.Address = userInfo.Address;
            uinfo.Contact = userInfo.Contact;
            uinfo.Contact1 = userInfo.Contact1;
            uinfo.Country = userInfo.Country;
            uinfo.DOB = DateTime.Parse(userInfo.Dob);
            uinfo.FirstName = userInfo.FirstName;
            uinfo.id = Guid.NewGuid().ToString();
            uinfo.Initials = userInfo.Intials;
            uinfo.LastName = userInfo.LastName;
            uinfo.MiddleName = userInfo.MiddleName;
            context.UserInformations.InsertOnSubmit(uinfo);
            try
            {
                context.SubmitChanges();

                return true;
            }
            catch (Exception ex)
            {
                return false;
            }
        }
 public bool Register(UserInfo userInfo)
 {
     return registerUser(userInfo);
 }