Beispiel #1
0
 public ClientAdd(Client owner)
 {
     InitializeComponent();
     clientForm       = owner;
     FormClosing     += client_add_FormClosing;
     _clientApiClient = new ClientApiClient();
 }
Beispiel #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";
        }
Beispiel #3
0
        public Needs()
        {
            InitializeComponent();
            _needsApiClient = new NeedsApiClient();
            dt = new DataTable();
            AddColumns();
            _clientApiClient   = new ClientApiClient();
            _realtorApiClient  = new RealtorApiClient();
            _realtiesApiClient = new RealtiesApiClient();

            InitCombos();
        }
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 Client()
 {
     InitializeComponent();
     _clientApiClient = new ClientApiClient();
 }