public void LoadSmartContract(long id = 0, string title = null)
        {
            var contracts = SmartContractController.GetSmartContracts(id, title);

            if (contracts != null && contracts.Count() > 0)
            {
                smartContractGridView.AutoGenerateColumns = false;
                smartContractGridView.DataSource          = contracts;
            }
            else
            {
                smartContractGridView.DataSource = null;
            }
        }
Beispiel #2
0
        private void ListSmartContractsForm_Load(object sender, EventArgs e)
        {
            var contracts = contractController.GetSmartContracts(SelectedCompany.Id);

            if (contracts != null)
            {
                smartContractsDataGridView.AutoGenerateColumns = false;
                smartContractsDataGridView.DataSource          = contracts;
            }
            else
            {
                smartContractsDataGridView.DataSource = null;
            }
            companyContractTextBox.Text = SelectedCompany.Name;
        }
Beispiel #3
0
        private void LabelChart(long id = 0, string title = null)
        {
            var company  = CompanyController.GetCompanies();
            var contract = SmartContractController.GetSmartContracts(id, title);
            var costomer = CostomerController.GetCustomer(id, title);



            int quantityCompany  = company.Count();
            int quantityContract = contract.Count();
            int quantityCostomer = costomer.Count();


            companiLabel.Text = Convert.ToString(quantityCompany);



            contractLabel.Text = "6";



            costomerLabel.Text = Convert.ToString(quantityCostomer);
        }
Beispiel #4
0
        private void ConsultContractForm_Load(object sender, EventArgs e)
        {
            if (ContractViews == null)
            {
                MessageBox.Show("Empresa Não Tem Contratos Ativos!!");
                return;
            }
            var contracts = SmartContractController.GetSmartContracts(ContractViews.Id);

            if (contracts != null)
            {
                ClearFields();
                titleRichTextBox.Text                = ContractViews.Title;
                descriptionRichTextBox.Text          = ContractViews.Description;
                terminationConditionRichTextBox.Text = ContractViews.TerminationCondition;
                conclusionConditionRichTextBox.Text  = ContractViews.ConclusionCondition;
                valueRichTextBox.Text                = Convert.ToString(ContractViews.Value);
            }
            else
            {
                MessageBox.Show("É nulo");
            }
        }