private void AddMarketSector(MarketSectorContract sector)
        {
            string query = string.Format("INSERT INTO MarketSector (MarketSectorID,MarketSectorName) VALUES ({0},'{1}');",
                sector.Key, sector.Name);
            this.database.ExecuteNonQuery(
                    this.database.GetSqlStringCommand(query));

        }
 public MarketSegmentContract()
 {
     this.parentSector = null;
     this.name = string.Empty;
     this.code = string.Empty;
 }
Beispiel #3
0
 public static MarketSector ToMarketSector(MarketSectorContract contract)
 {
     MarketSector sector = null;
     if (contract != null)
     {
         sector = new MarketSector(contract.Key, contract.Name);
         foreach (MarketSegmentContract segment in contract.Segments)
         {
             sector.Segments.Add(Converter.ToMarketSegment(segment));
         }
     }
     return sector;
 }
Beispiel #4
0
 public static MarketSectorContract ToMarketSectorContract(MarketSector sector)
 {
     MarketSectorContract contract = null;
     if (sector != null)
     {
         contract = new MarketSectorContract();
         contract.Key = sector.Key;
         contract.Name = sector.Name;
         foreach (MarketSegment segment in sector.Segments)
         {
             contract.Segments.Add(Converter.ToMarketSegmentContract(segment));
         }
     }
     return contract;
 }
 public MarketSegmentContract()
 {
     this.parentSector = null;
     this.name         = string.Empty;
     this.code         = string.Empty;
 }