Пример #1
0
        public DealsAdd(Deals owner)
        {
            InitializeComponent();
            _dealsApiClient = new DealsApiClient();
            _dealsForm      = owner;
            FormClosing    += DealsAdd_FormClosing;

            _offerApiClient = new OffersApiClient();
            _needApiClient  = new NeedsApiClient();

            offersEntities      = _offerApiClient.GetOffers();
            offer.DataSource    = offersEntities;
            offer.DisplayMember = "GetOffer";
            offer.ValueMember   = "id";

            needsEntities      = _needApiClient.GetNeeds();
            need.DataSource    = needsEntities;
            need.DisplayMember = "GetNeed";
            need.ValueMember   = "id";
        }
Пример #2
0
        public Deals()
        {
            InitializeComponent();
            _dealsApiClient = new DealsApiClient();
            dt = new DataTable();
            AddColumns();
            _offerApiClient = new OffersApiClient();
            _needApiClient  = new NeedsApiClient();

            List <OfferEntity> offersEntities = _offerApiClient.GetOffers();

            offer.DataSource    = offersEntities;
            offer.DisplayMember = "GetOffer";
            offer.ValueMember   = "id";

            List <NeedsEntity> needsEntities = _needApiClient.GetNeeds();

            need.DataSource    = needsEntities;
            need.DisplayMember = "GetNeed";
            need.ValueMember   = "id";
        }