コード例 #1
0
        private void CreateTableRow(ReportMasterModel report)
        {
            HtmlTableRow tableRow = new HtmlTableRow();

            tableRow.Cells.Add(this.CreateTableDataCell(report.ReportName, report.MasterReport_Id));

            tableRow.Cells.Add(this.CreateTableDataCell(report.ReportXMLVersion.ParseToString(), report.MasterReport_Id));

            tableRow.Cells.Add(this.CreateTableDataCell(report.ProjectName, report.MasterReport_Id));

            this.uxReportsTable.Rows.Add(tableRow);
        }
コード例 #2
0
        public void UpdateReportMaster(ReportMasterModel model)
        {
            ReportMaster existing = this.dataContext
                                    .ReportsMaster
                                    .Where(rx => rx.MasterReport_Id == model.MasterReport_Id)
                                    .FirstOrDefault();

            if (existing == null)
            {
                existing = model.CopyToObject(new ReportMaster()) as ReportMaster;

                this.dataContext.ReportsMaster.Add(existing);
            }
            else
            {
                existing = model.CopyToObject(existing) as ReportMaster;
            }

            this.dataContext.SaveChanges();

            model = existing.CopyToObject(model) as ReportMasterModel;
        }