コード例 #1
0
ファイル: Records.cs プロジェクト: ketsakda/pcmsofcc
        public static void AddRecord(DateTime _date, Guid _userId, int _siteId, int _chartId)
        {
            PCMSofCCDataContext db = new PCMSofCCDataContext();
            var newRecord = new Record
            {
                Date = _date.Date,
                UserId = _userId,
                SiteId = _siteId,
                ChartId = _chartId
            };
            db.Record.InsertOnSubmit(newRecord);

            var entries =
                from belong in db.EntryBelongToChart
                where belong.ChartId == _chartId
                select belong.ScoreEntry;
            foreach (var entry in entries)
            {
                var newRecordEntry = new RecordEntry
                {
                    Record = newRecord,
                    ScoreEntry = entry,
                };
                db.RecordEntry.InsertOnSubmit(newRecordEntry);
            }
            db.SubmitChanges();
        }
コード例 #2
0
		private void detach_Record(Record entity)
		{
			this.SendPropertyChanging();
			entity.aspnet_Users = null;
		}
コード例 #3
0
 partial void DeleteRecord(Record instance);
コード例 #4
0
 partial void UpdateRecord(Record instance);
コード例 #5
0
 partial void InsertRecord(Record instance);
コード例 #6
0
		private void detach_Record(Record entity)
		{
			this.SendPropertyChanging();
			entity.Site = null;
		}
コード例 #7
0
		private void attach_Record(Record entity)
		{
			this.SendPropertyChanging();
			entity.Site = this;
		}