コード例 #1
0
ファイル: UserPostViewModel.cs プロジェクト: jagudits/fua
        public UserPostViewModel()
        {
            obj = new user_post();

            // TODO trick?
            //obj.created_at = DateTime.Now;
        }
コード例 #2
0
ファイル: UserPostViewModel.cs プロジェクト: jagudits/fua
        public UserPostViewModel(user_post obj)
        {
            this.obj = obj;

            this.id = obj.id;
            this.user_id = obj.user_id;
            this.parent_post_id = obj.parent_post_id;
            this.title = obj.title;
            this.content = obj.content;
            this.ranking_points = obj.ranking_points;
            this.num_views = obj.num_views;
            this.is_accepted_answer = obj.is_accepted_answer;
            this.created_at = obj.created_at;
        }
コード例 #3
0
ファイル: DataClasses1.designer.cs プロジェクト: jagudits/fua
		private void detach_user_posts(user_post entity)
		{
			this.SendPropertyChanging();
			entity.user = null;
		}
コード例 #4
0
ファイル: DataClasses1.designer.cs プロジェクト: jagudits/fua
		private void attach_user_posts(user_post entity)
		{
			this.SendPropertyChanging();
			entity.user = this;
		}
コード例 #5
0
ファイル: DataClasses1.designer.cs プロジェクト: jagudits/fua
 partial void Deleteuser_post(user_post instance);
コード例 #6
0
ファイル: DataClasses1.designer.cs プロジェクト: jagudits/fua
 partial void Updateuser_post(user_post instance);
コード例 #7
0
ファイル: DataClasses1.designer.cs プロジェクト: jagudits/fua
 partial void Insertuser_post(user_post instance);
コード例 #8
0
ファイル: UserPostRepository.cs プロジェクト: jagudits/fua
 public void Delete(user_post user_post)
 {
     db.user_posts.DeleteOnSubmit(user_post);
 }
コード例 #9
0
ファイル: UserPostRepository.cs プロジェクト: jagudits/fua
 // Insert/Delete
 public void Add(user_post user_post)
 {
     db.user_posts.InsertOnSubmit(user_post);
 }
コード例 #10
0
ファイル: UserPostViewModel.cs プロジェクト: jagudits/fua
 public void ApplyChanges(user_post toEdit)
 {
     // TODO should we set user_id here and this way?
     toEdit.user_id = this.user_id;
     toEdit.parent_post_id = this.parent_post_id;
     toEdit.title = this.title;
     toEdit.content = this.content;
     toEdit.ranking_points = this.ranking_points;
     toEdit.num_views = this.num_views;
     toEdit.is_accepted_answer = this.is_accepted_answer;
 }