private void tabContract_Enter(object sender, EventArgs e) { refreshContracts(); contractTypes = ContractType.Select(); serviceLevels = ServiceLevel.Select(); contractEdit = false; bindContractFields(currentContract); dgvContracts.DataSource = (currentPerson as Client).Contracts; setEnableContractFields(false); }
private void initialise(ContractType contractType, bool insert) { InitializeComponent(); CenterToScreen(); this.contractType = contractType; contractType.DeepCopyInto(ref oldCopy); bindedContractType = new BindingSource(); bindedContractType.DataSource = contractType; this.insert = insert; setFieldsEnable(insert); serviceLevels = ServiceLevel.Select(); bindFields(); cmbID.SelectedIndex = -1; }