コード例 #1
0
ファイル: ClientAdd.cs プロジェクト: TheEvilFace/vippoks
 public ClientAdd(Client owner)
 {
     InitializeComponent();
     clientForm       = owner;
     FormClosing     += client_add_FormClosing;
     _clientApiClient = new ClientApiClient();
 }
コード例 #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";
        }
コード例 #3
0
ファイル: Needs.cs プロジェクト: TheEvilFace/vippoks
        public Needs()
        {
            InitializeComponent();
            _needsApiClient = new NeedsApiClient();
            dt = new DataTable();
            AddColumns();
            _clientApiClient   = new ClientApiClient();
            _realtorApiClient  = new RealtorApiClient();
            _realtiesApiClient = new RealtiesApiClient();

            InitCombos();
        }
コード例 #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";
        }
コード例 #5
0
ファイル: Client.cs プロジェクト: TheEvilFace/vippoks
 public Client()
 {
     InitializeComponent();
     _clientApiClient = new ClientApiClient();
 }