Beispiel #1
0
        public OffersAdd(Offers owner)
        {
            InitializeComponent();
            _offers            = owner;
            FormClosing       += OffersAdd_FormClosing;
            _offersApiClient   = new OffersApiClient();
            _clientApiClient   = new ClientApiClient();
            _realtorApiClient  = new RealtorApiClient();
            _realtiesApiClient = new RealtiesApiClient();

            List <ClientEntity> clientEntities = _clientApiClient.GetClients();

            client.DataSource    = clientEntities;
            client.DisplayMember = "GetInitials";
            client.ValueMember   = "id";

            List <RealtorEntity> realtorEntities = _realtorApiClient.GetRealtors();

            realtor.DataSource    = realtorEntities;
            realtor.DisplayMember = "GetInitials";
            realtor.ValueMember   = "id";


            List <RealtyTypeEntity> realtyTypeEntities = _realtiesApiClient.GetTypes();

            type.DataSource    = realtyTypeEntities;
            type.DisplayMember = "Name";
            type.ValueMember   = "Id";
        }
Beispiel #2
0
        public Needs()
        {
            InitializeComponent();
            _needsApiClient = new NeedsApiClient();
            dt = new DataTable();
            AddColumns();
            _clientApiClient   = new ClientApiClient();
            _realtorApiClient  = new RealtorApiClient();
            _realtiesApiClient = new RealtiesApiClient();

            InitCombos();
        }
Beispiel #3
0
        public RealtiesAdd(Realties owner)
        {
            InitializeComponent();
            _realties          = owner;
            FormClosing       += RealtiesAdd_FormClosing;
            _realtiesApiClient = new RealtiesApiClient();

            List <RealtyTypeEntity> realtyTypeEntities = _realtiesApiClient.GetTypes();

            type_id.DataSource    = realtyTypeEntities;
            type_id.DisplayMember = "Name";
            type_id.ValueMember   = "Id";
        }
Beispiel #4
0
        public Offers()
        {
            InitializeComponent();
            _offersApiClient = new OffersApiClient();
            dt = new DataTable();
            AddColumns();
            _clientApiClient   = new ClientApiClient();
            _realtorApiClient  = new RealtorApiClient();
            _realtiesApiClient = new RealtiesApiClient();

            List <ClientEntity> clientEntities = _clientApiClient.GetClients();

            client.DataSource    = clientEntities;
            client.DisplayMember = "GetInitials";
            client.ValueMember   = "id";

            List <RealtorEntity> realtorEntities = _realtorApiClient.GetRealtors();

            realtor.DataSource    = realtorEntities;
            realtor.DisplayMember = "GetInitials";
            realtor.ValueMember   = "id";

            List <RealtyTypeEntity> realtyTypeEntities = _realtiesApiClient.GetTypes();

            realtyTypeEntities.Remove(realtyTypeEntities.Find(x => x.Id == 4));
            type.DataSource    = realtyTypeEntities;
            type.DisplayMember = "Name";
            type.ValueMember   = "Id";


            List <ClientEntity> comboClientEntities = _clientApiClient.GetClients();

            comboClientEntities.Add(new ClientEntity
            {
                name = " ", id = 0, patronymic = " ", surname = "Любой", phone = " ", email = " "
            });
            comboClient.DataSource    = comboClientEntities;
            comboClient.DisplayMember = "GetInitials";
            comboClient.ValueMember   = "id";

            var comboRealtorEntities = _realtorApiClient.GetRealtors();

            comboRealtorEntities.Add(new RealtorEntity
            {
                name = " ", id = 0, part_percentage = 0, patronymic = " ", surname = "Любой"
            });
            rieltor.DataSource    = comboRealtorEntities;
            rieltor.DisplayMember = "GetInitials";
            rieltor.ValueMember   = "id";
        }
Beispiel #5
0
 public Realties()
 {
     InitializeComponent();
     _realtiesApiClient = new RealtiesApiClient();
 }