Exemple #1
0
        private void Realties_Load(object sender, EventArgs e)
        {
            table();
            change_lock();
            List <RealtyTypeEntity> TypeEntities       = _realtiesApiClient.GetTypes();
            List <RealtyTypeEntity> realtyTypeEntities = _realtiesApiClient.GetTypes();

            type.DataSource    = TypeEntities;
            type.DisplayMember = "Name";
            type.ValueMember   = "Id";

            realtyTypeEntities.Remove(realtyTypeEntities.Find(x => x.Id == 4));
            type_id.DataSource    = realtyTypeEntities;
            type_id.DisplayMember = "Name";
            type_id.ValueMember   = "Id";
        }
Exemple #2
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";
        }
Exemple #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";
        }
Exemple #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";
        }
Exemple #5
0
        private void InitCombos()
        {
            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";

            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";

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

            comboRealtorEntities.Add(new RealtorEntity
            {
                name = " ", id = 0, part_percentage = 0, patronymic = " ", surname = "Любой"
            });
            rieltor.DataSource    = comboRealtorEntities;
            rieltor.DisplayMember = "GetInitials";
            rieltor.ValueMember   = "id";
        }