Esempio n. 1
0
        private void btnContractTypes_Click(object sender, EventArgs e)
        {
            ContractType        ct = new ContractType();
            List <ContractType> readContractTypeData = new List <ContractType>();

            readContractTypeData = ct.GetBLContractType();

            btnUpdateContract.Visible = false;


            btnAddContractType.Visible = true;

            dgvContracts.DataSource = readContractTypeData;
        }
Esempio n. 2
0
        private void Refresh()
        {
            Service      s  = new Service();
            Client       c  = new Client();
            Product      p  = new Product();
            ContractType ct = new ContractType();

            List <Service>      serviceData      = new List <Service>();
            List <Client>       clientData       = new List <Client>();
            List <Product>      productData      = new List <Product>();
            List <ContractType> contractTypeData = new List <ContractType>();

            serviceData      = s.GetBLService();
            clientData       = c.GetCustomer();
            productData      = p.GetBLProduct();
            contractTypeData = ct.GetBLContractType();

            dgvServices.DataSource      = serviceData;
            dgvClients.DataSource       = clientData;
            dgvProducts.DataSource      = productData;
            dgvContractTypes.DataSource = contractTypeData;

            dgvServices.Columns[0].Visible = false;
            dgvServices.Columns[4].Visible = false;
            dgvServices.Columns[5].Visible = false;
            dgvServices.ClearSelection();


            dgvClients.Columns[0].Visible = false;
            dgvClients.ClearSelection();

            dgvProducts.Columns[0].Visible = false;
            dgvProducts.Columns[2].Visible = false;
            dgvProducts.Columns[3].Visible = false;
            dgvProducts.ClearSelection();

            dgvContractTypes.Columns[0].Visible = false;
            dgvContractTypes.Columns[5].Visible = false;
            dgvContractTypes.ClearSelection();
        }