コード例 #1
0
ファイル: Converter.cs プロジェクト: pachinko/NDDDCS
 public static MarketSegmentContract ToMarketSegmentContract(MarketSegment segment)
 {
     MarketSegmentContract contract = null;
     if (segment != null)
     {
         contract = new MarketSegmentContract();
         contract.Key = segment.Key;
         contract.Code = segment.Code;
         contract.Name = segment.Name;
         contract.ParentSector = Converter.ToMarketSectorContract(segment.ParentSector);
     }
     return contract;
 }
コード例 #2
0
ファイル: Converter.cs プロジェクト: pachinko/NDDDCS
 public static MarketSegment ToMarketSegment(MarketSegmentContract contract)
 {
     return (contract != null ? new MarketSegment(contract.Key, 
            Converter.ToMarketSector(contract.ParentSector), 
            contract.Name, contract.Code) : null);
 }
コード例 #3
0
        private void AddMarketSegment(MarketSegmentContract segment)
        {
            string query = string.Format("INSERT INTO MarketSegment (MarketSegmentID,MarketSectorID,Code,MarketSegmentName) VALUES ({0},{1},'{2}','{3}');",
                segment.Key, segment.ParentSector.Key, segment.Code, segment.Name);
            this.database.ExecuteNonQuery(
                    this.database.GetSqlStringCommand(query));

        }