public DocumentUI GetDocument([FromUri] DocumentsFilter filter) { ProfileCommon profile = APIhelper.GetProfileCommon(Request); int companyId = DB.GetBorrowerClientCompanyId(profile, filter.BorrowerId); return(DocumentUI.GetDocument(companyId, filter.DocumentId)); }
public bool ShowGenerateDecoysDlg(IWin32Window owner = null) { using (var decoysDlg = new GenerateDecoysDlg(DocumentUI)) { if (decoysDlg.ShowDialog(owner ?? SkylineWindow) == DialogResult.OK) { var refinementSettings = new RefinementSettings { NumberOfDecoys = decoysDlg.NumDecoys, DecoysMethod = decoysDlg.DecoysMethod }; ModifyDocument(Resources.SkylineWindow_ShowGenerateDecoysDlg_Generate_Decoys, refinementSettings.GenerateDecoys, docPair => { var plural = refinementSettings.NumberOfDecoys > 1; return(AuditLogEntry.CreateSingleMessageEntry(new MessageInfo( plural ? MessageType.added_peptide_decoys : MessageType.added_peptide_decoy, DocumentUI.DocumentType, refinementSettings.NumberOfDecoys, refinementSettings.DecoysMethod))); }); var nodePepGroup = DocumentUI.PeptideGroups.First(nodePeptideGroup => nodePeptideGroup.IsDecoy); SelectedPath = DocumentUI.GetPathTo((int)SrmDocument.Level.MoleculeGroups, DocumentUI.FindNodeIndex(nodePepGroup.Id)); return(true); } } return(false); }
private IEnumerable <DocumentUI> GetDocumentsByCompany(DocumentsFilter filter) { ProfileCommon profile = APIhelper.GetProfileCommon(Request); web_Company wc = DB.GetCompanyByID(profile.CompanyID); return(DocumentUI.GetDocumentsByCompanyUI(profile, wc, filter.BorrowerId, filter.FileType)); }
public DocumentUI ConvertDocToDocUi(Document doc, string thumbPath) { var tUiOther = new DocumentUI { Id = doc.Id, TrainTaskCommentId = doc.TrainTaskCommentId, ThumbPath = thumbPath, Path = doc.Name, Name = doc.Description, DocumentType = (int)doc.DocumentType }; return(tUiOther); }