public void Add(PartAST part) { if (part == null) { return; } if (part is ImportPackageAST) { ImportPackage = (part as ImportPackageAST); } else if (part is PropertyAST) { PropertyList.Add(part as PropertyAST); } else if (part is MethodAST) { MethodList.Add(part as MethodAST); } else if (part is AgreementAST) { AgreementList.Add(part as AgreementAST); } else if (part is SimpleUseAST) { SimpleUse = (part as SimpleUseAST); } else { throw new CompileException("错误不能识别PartAST"); } }
public void DeleteAgreement() { Agreement selectedAgreement = AgreementList.ElementAt(SelectedIndex); AgreementMethods.DeleteAgreement(selectedAgreement); AgreementList = AgreementMethods.ListAgreements(); MessageBox.Show("Aftale slettet!"); }
public async Task <List <AgreementDto> > Handle(AgreementList request, CancellationToken cancellationToken) { var agreements = await _context.Agreement.ToListAsync(); //Se hace el mapeo de agrements a AgreementDto var AgreementsDto = _mapper.Map <List <Agreement>, List <AgreementDto> >(agreements); return(AgreementsDto); }
private void BindAgreements() { IList <LicenseAgreement> agreements = LicenseAgreementDataSource.LoadAll("DisplayName"); int index = agreements.IndexOf(_AgreementId); if (index > -1) { agreements.RemoveAt(index); } AgreementList.DataSource = agreements; AgreementList.DataBind(); }
public void AgreementEditWindowOpen() { AgreementEditWindow agreementEditWindow = new AgreementEditWindow(AgreementList.ElementAt(SelectedIndex)); agreementEditWindow.Show(); }