コード例 #1
0
ファイル: ProfileRepository.cs プロジェクト: ck3g/sc_news
        public void CreateProfile( Guid userId )
        {
            var profile = new UsersProfile();
            profile.user_id = userId;
            profile.country_id = 0;
            profile.bnet_name = "";
            profile.experience = 0;
            profile.first_name = "";
            profile.last_name = "";

            db.UsersProfiles.InsertOnSubmit( profile );
            db.SubmitChanges();
        }
コード例 #2
0
ファイル: ProfileRepository.cs プロジェクト: ck3g/sc_news
 public String GetCountryName( UsersProfile profile )
 {
     switch (profile.country_id)
     {
         case 1:
             return "Молдова";
         case 2:
             return "Украина";
         case 3:
             return "Россия";
         default:
             return "";
     }
 }
コード例 #3
0
ファイル: News.designer.cs プロジェクト: ck3g/sc_news
 partial void UpdateUsersProfile(UsersProfile instance);
コード例 #4
0
ファイル: News.designer.cs プロジェクト: ck3g/sc_news
 partial void DeleteUsersProfile(UsersProfile instance);
コード例 #5
0
ファイル: News.designer.cs プロジェクト: ck3g/sc_news
 partial void InsertUsersProfile(UsersProfile instance);