public LawyerEdit(DomainModel.Lawyer lawyer) { _repository = RepositoryFactory.Create(); InitializeComponent(); Load += LawyerEdit_Load; LawyerId.Text = lawyer.Id.ToString(); FirstNameEditTxt.Text = lawyer.FirstName; LastNameEditTxt.Text = lawyer.LastName; }
public LawyerForm(DomainModel.Lawyer lawyer) { _repository = RepositoryFactory.Create(); InitializeComponent(); Load += LawyerForm_Load; LawyerIdTxt.Text = lawyer.Id.ToString(); LawyerNameLabel.Text = lawyer.FirstName; LawyerLastNameLabel.Text = lawyer.LastName; }
public CaseInfo(DomainModel.Lawyer lawyer, DomainModel.Case @case) { _repository = RepositoryFactory.Create(); InitializeComponent(); Load += CaseInfo_Load; var lawyerCase = _repository.Of <Lawyer>() .Search(x => x.Cases.Any(y => y.Id == @case.Id)) .ToArray(); CaseTitleLbl.Text = @case.Title; CaseDescTxt.Text = @case.Description; LawyerId.Text = lawyer.Id.ToString(); CaseId.Text = @case.Id.ToString(); if (lawyerCase.Count() > 0) { foreach (var lawyers in lawyerCase) { LawyersList.Items.Add(lawyers.FirstName); } } else { LawyersList.Visible = false; LawyerEmpty.Visible = true; } var documents = _repository.Of <Document>() .Search(x => x.CaseId == @case.Id) .ToArray(); if (documents.Count() > 0) { DocumentGrid.Visible = true; DocumentGrid.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; foreach (var document in documents) { DocumentGrid.Rows.Add(document.Id, Bitmap.FromFile(document.PathToImage)); } } else { NoEvidence.Visible = true; } }