예제 #1
0
파일: Main.cs 프로젝트: hacpatb/BikeStreet
        listHire contractList         = new listHire();       //список взятого оборудования для клиента

        public Main()
        {
            InitializeComponent();

            #region Client Grid View
            bindsrcClient.DataSource      = clientList.clients;
            clientDGV.AutoGenerateColumns = false;
            clientDGV.AutoSizeRowsMode    = DataGridViewAutoSizeRowsMode.AllCells;
            dgvDescription[] clientDGVdsc = new dgvDescription[] {
                new dgvDescription(0, "fio", "fio", "ФИО", 150),
                new dgvDescription(0, "phone", "phone", "Телефон", 120),
                new dgvDescription(0, "address", "address", "Адрес", 200),
                new dgvDescription(0, "passport", "passport", "Паспортные данные", 180),
            };
            trash.makeDataGridColumns(clientDGV, clientDGVdsc);
            clientDGV.DataSource = bindsrcClient;
            // viewClient();
            #endregion

            #region Equipment Grid View

            bindsrcEquipment.DataSource      = equipmentList.equipments;
            equipmentDGV.AutoGenerateColumns = false;
            equipmentDGV.AutoSizeRowsMode    = DataGridViewAutoSizeRowsMode.AllCells;
            dgvDescription[] equipmentDGVdsc = new dgvDescription[] {
                new dgvDescription(0, "brand", "brand", "Марка", 130),
                new dgvDescription(0, "model", "model", "Модель", 140),
                new dgvDescription(0, "color", "color", "Цвет", 140),
                new dgvDescription(0, "size", "size", "Размер", 40),
                new dgvDescription(0, "number", "number", "Сер №", 140),
                new dgvDescription(0, "in_stock", "in_stock", "Остаток", 45)
            };
            trash.makeDataGridColumns(equipmentDGV, equipmentDGVdsc, true);
            equipmentDGV.DataSource = bindsrcEquipment;
            viewEquipment();

            #endregion

            #region Contract Grid View
            // contractList.getList(-1);
            bindsrcContract.DataSource      = contractList.viewHireList;
            contractDGV.AutoGenerateColumns = false;
            contractDGV.AutoSizeRowsMode    = DataGridViewAutoSizeRowsMode.AllCells;
            dgvDescription[] contractDGVdsc = new dgvDescription[] {
                new dgvDescription(0, "fio", "fio", "Клиент", 2),
                new dgvDescription(0, "phone", "phone", "Тельчик", 2),
                new dgvDescription(0, "all_equip", "all_equip", "Что взял", 6),
                new dgvDescription(0, "megaDATE", "megaDATE", "С/По", 2)
            };
            trash.makeDataGridColumns(contractDGV, contractDGVdsc, true);
            contractDGV.DataSource = bindsrcContract;
            viewContract();
            periodDateTimePicker.Value = DateTime.Now.Date;
            #endregion

            // mainTab.TabPages.Remove(editClientTab);
            ListTab.TabPages.Remove(clientListTab);
        }
예제 #2
0
        listHire hireList         = new listHire();        //список взятого оборудования для клиента

        public clientControl()
        {
            InitializeComponent();
            currentClient = new cClient();
            // initClient(); //Включить эту херню перед релизом и офнуть в клике по форме

            #region Rental Grid View

            bindsrcHire.DataSource        = hireList.viewHireList;///список чего взял чел
            rentalDGV.AutoGenerateColumns = false;
            rentalDGV.AutoSizeRowsMode    = DataGridViewAutoSizeRowsMode.AllCells;
            dgvDescription[] hireDGVdsc = new dgvDescription[] {
                new dgvDescription(0, "all_equip", "all_equip", "Что взял", 4),
                new dgvDescription(0, "megaDATE", "megaDATE", "С/По", 1),
            };
            trash.makeDataGridColumns(rentalDGV, hireDGVdsc, true);
            rentalDGV.DataSource = bindsrcHire;
            //viewHire();
            #endregion
        }
예제 #3
0
 public winterRentalForm(cClient Client)
 {
     InitializeComponent();
     currentClient = Client;
     #region Equipment Grid View
     equipmentList.getEquipmentList(currentHire.equipment_in_contract);
     bindsrcEquipment.DataSource      = equipmentList.equipments;
     equipmentDGV.AutoGenerateColumns = false;
     equipmentDGV.AutoSizeRowsMode    = DataGridViewAutoSizeRowsMode.AllCells;
     dgvDescription[] equipmentDGVdsc = new dgvDescription[] {
         new dgvDescription(0, "brand", "brand", "Марка", 130),
         new dgvDescription(0, "model", "model", "Модель", 130),
         new dgvDescription(0, "color", "color", "Цвет", 140),
         new dgvDescription(0, "size", "size", "Размер", 140),
         new dgvDescription(0, "number", "number", "Сер №", 140),
         new dgvDescription(0, "cost", "cost", "Стоимость", 140),
     };
     trash.makeDataGridColumns(equipmentDGV, equipmentDGVdsc, true);
     equipmentDGV.DataSource = bindsrcEquipment;
     #endregion
 }
예제 #4
0
        public equipmentsListForm(int equioment_in_contract)
        {
            InitializeComponent();
            currentEquiomentInContract = equioment_in_contract;
            #region Equipment Grid View
            equipmentList.getEquipmentList(inStock: 1);
            bindsrcEquipment.DataSource      = equipmentList.equipments;
            equipmentDGV.AutoGenerateColumns = false;
            equipmentDGV.AutoSizeRowsMode    = DataGridViewAutoSizeRowsMode.AllCells;
            dgvDescription[] equipmentDGVdsc = new dgvDescription[] {
                new dgvDescription(0, "brand", "brand", "Марка", 2),
                new dgvDescription(0, "model", "model", "Модель", 2),
                new dgvDescription(0, "color", "color", "Цвет", 2),
                new dgvDescription(0, "size", "size", "Размер", 1),
                new dgvDescription(0, "number", "number", "Сер №", 2),
                new dgvDescription(0, "in_stock", "in_stock", "Остаток", 1),
            };
            trash.makeDataGridColumns(equipmentDGV, equipmentDGVdsc, true);
            equipmentDGV.DataSource = bindsrcEquipment;
            #endregion

            initType();
        }