예제 #1
0
        /// <summary>
        /// DBに存在するかチェック
        /// </summary>
        public override DataRow[] GetExistsDataRow(string directoryName,
                                                   Text.TextData textData,
                                                   Translate.TranslateText translateText)
        {
            Text.TextDataParts tData = (Text.TextDataParts)textData;

            var where = new System.Text.StringBuilder();
            where.Clear();

            if (directoryName != null)
            {
                where.Append(String.Format("{0}='{1}'",
                                           ColumnNameDirName,
                                           this.DoubleSiglQrt(directoryName)));

                where.Append(" AND ");
            }

            where.Append(String.Format("{0}='{1}'",
                                       ColumnNameName,
                                       this.DoubleSiglQrt(tData.Name)));


            return(this.Select(where.ToString()));
        }
        /// <summary>
        /// タイトル等データをセット
        /// </summary>
        public override void SetTitleData(DataRow row,
                                          Text.TextData textData,
                                          Translate.TranslateText translateText)
        {
            Text.TextDataDepartments tData = (Text.TextDataDepartments)textData;

            if (row.RowState == DataRowState.Added || row.RowState == DataRowState.Detached)
            {
                // パーツ名
                this.SetDataValue(row, ColumnNameName, tData.Name);
            }
        }
        /// <summary>
        /// タイトル等データをセット
        /// </summary>
        public override void SetTitleData(DataRow row,
                                          Text.TextData textData,
                                          Translate.TranslateText translateText)
        {
            Text.TextDataTechTree tData = (Text.TextDataTechTree)textData;


            if (row.RowState == DataRowState.Added || row.RowState == DataRowState.Detached)
            {
                // ID
                this.SetDataValue(row, ColumnNameID, tData.ID);
            }

            // タイトル
            this.SetDataValue(row, ColumnNameTitle, tData.Title);
        }
        /// <summary>
        /// タイトル等データをセット
        /// </summary>
        public override void SetTitleData(DataRow row,
                                          Text.TextData textData,
                                          Translate.TranslateText translateText)
        {
            Text.TextDataStoryDefs           tData = (Text.TextDataStoryDefs)textData;
            Translate.TranslateTextStoryDefs tText = (Translate.TranslateTextStoryDefs)translateText;


            if (row.RowState == DataRowState.Added || row.RowState == DataRowState.Detached)
            {
                // サイエンスレポートID
                this.SetDataValue(row, ColumnNameTitle, tData.Title);

                // サイエンスレポートResultText
                this.SetDataValue(row, ColumnNameNoteText, tText.TextNode.TextTitle);

                // サイエンスレポートResultIndex
                this.SetDataValue(row, ColumnNameNoteIndex, tText.TextNode.TextIndex);
            }
        }
예제 #5
0
        /// <summary>
        /// タイトル等データをセット
        /// </summary>
        public override void SetTitleData(DataRow row,
                                          Text.TextData textData,
                                          Translate.TranslateText translateText)
        {
            Text.TextDataScienceDefs           tData = (Text.TextDataScienceDefs)textData;
            Translate.TranslateTextScienceDefs tText = (Translate.TranslateTextScienceDefs)translateText;


            if (row.RowState == DataRowState.Added || row.RowState == DataRowState.Detached)
            {
                // サイエンスレポートID
                this.SetDataValue(row, ColumnNameID, tData.ID);

                // サイエンスレポートResultText
                this.SetDataValue(row, ColumnNameResultText, tText.Result.ResultText);

                // サイエンスレポートResultIndex
                this.SetDataValue(row, ColumnNameResultIndex, tText.Result.ResultIndex);
            }

            // サイエンスレポートタイトル
            this.SetDataValue(row, ColumnNameTitle, tData.Title);
        }
        /// <summary>
        /// DBに存在するかチェック
        /// </summary>
        public override DataRow[] GetExistsDataRow(string directoryName,
                                                   Text.TextData textData,
                                                   Translate.TranslateText translateText)
        {
            Text.TextDataStoryDefs           tData = (Text.TextDataStoryDefs)textData;
            Translate.TranslateTextStoryDefs tText = (Translate.TranslateTextStoryDefs)translateText;

            var where = new System.Text.StringBuilder();
            where.Clear();

            if (directoryName != null)
            {
                where.Append(String.Format("{0}='{1}'",
                                           ColumnNameDirName,
                                           this.DoubleSiglQrt(directoryName)));
                where.Append(" AND ");
            }


            where.Append(String.Format("{0}='{1}'",
                                       ColumnNameTitle,
                                       this.DoubleSiglQrt(tData.Title)));

            where.Append(" AND ");
            where.Append(String.Format("{0}='{1}'",
                                       ColumnNameNoteText,
                                       this.DoubleSiglQrt(tText.TextNode.TextTitle)));

            where.Append(" AND ");
            where.Append(String.Format("{0}='{1}'",
                                       ColumnNameNoteIndex,
                                       tText.TextNode.TextIndex.ToString()));


            return(this.Select(where.ToString()));
        }
예제 #7
0
 /// <summary>
 /// タイトル等データをセット
 /// </summary>
 public abstract void SetTitleData(DataRow row,
                                   Text.TextData textData,
                                   Translate.TranslateText translateText);
예제 #8
0
 /// <summary>
 /// DBに存在するかチェック
 /// </summary>
 public abstract DataRow[] GetExistsDataRow(string directoryName,
                                            Text.TextData textData,
                                            Translate.TranslateText translateText);