Exemplo n.º 1
0
        public bool UserProfileInsert(StripeEntities context, User_Profile refProfile)
        {
            try
            {
                context.SP_USER_PROFILE_INSERT(refProfile.userProfile_ID,
                        refProfile.userProfile_First_Name,
                        refProfile.userProfile_Last_Name,
                        refProfile.userProfile_Email,
                        refProfile.userProfile_Phone,
                        refProfile.userProfile_Street,
                        refProfile.userProfile_City,
                        refProfile.userProfile_State,
                        refProfile.userProfile_Zip,
                        refProfile.userProfile_Photo,
                        refProfile.userProfile_Background_Description,
                        refProfile.userProfile_ID);

                context.SaveChanges();
                return true;
            }
            catch (Exception exception)
            {
                return false;
            }
        }
Exemplo n.º 2
0
        public bool UserProfileInsert(StripeEntities context, User_Profile refProfile)
        {
            try
            {
                context.SP_USER_PROFILE_INSERT(refProfile.userProfile_ID,
                                               refProfile.userProfile_First_Name,
                                               refProfile.userProfile_Last_Name,
                                               refProfile.userProfile_Email,
                                               refProfile.userProfile_Phone,
                                               refProfile.userProfile_Street,
                                               refProfile.userProfile_City,
                                               refProfile.userProfile_State,
                                               refProfile.userProfile_Zip,
                                               refProfile.userProfile_Photo,
                                               refProfile.userProfile_Background_Description,
                                               refProfile.userProfile_ID);

                context.SaveChanges();
                return(true);
            }
            catch (Exception exception)
            {
                return(false);
            }
        }
Exemplo n.º 3
0
        public ActionResult Profile(User_Profile refProfile)
        {
            using (var context = new StripeEntities())
            {
                UserProfileExistCheck profileCheck = new UserProfileExistCheck();
                UserProfile userProfile = new UserProfile();
                if (profileCheck.UserProfileExistence(refProfile.userProfile_ID, context))
                {
                    userProfile.UserProfileUpdate(context, refProfile);
                }
                else
                {
                    //Inserting Profile
                    userProfile.UserProfileInsert(context, refProfile);
                }

                return RedirectToAction("Profile");
            }
        }
Exemplo n.º 4
0
        public ActionResult Profile(User_Profile refProfile)
        {
            using (var context = new StripeEntities())
            {
                UserProfileExistCheck profileCheck = new UserProfileExistCheck();
                UserProfile userProfile = new UserProfile();
                if (profileCheck.UserProfileExistence(refProfile.userProfile_ID, context))
                {

                    userProfile.UserProfileUpdate(context, refProfile);

                    context.SP_USER_PROFILE_REFEREE_UPDATE(refProfile.ref_Game_Specialization_Type,
                        refProfile.userProfile_ID,
                        refProfile.Sport_Name_spt_Sport_Name_ID);
                    context.SaveChanges();

                }
                else
                {
                    //Inserting Profile
                    userProfile.UserProfileInsert(context, refProfile);

                    context.SP_USER_PROFILE_REFEREE_INSERT(refProfile.ref_Game_Specialization_Type,
                        refProfile.userProfile_ID,
                        refProfile.Sport_Name_spt_Sport_Name_ID);
                    context.SaveChanges();
                }

                return RedirectToAction("Profile");
            }
        }