Exemplo n.º 1
0
 /// <summary>
 /// Получить класс с ответственным лицом и подписью на основании полей Word для штампа согласования
 /// </summary>
 private static IStampApprovalChange GetStampApprovalChangeFromFields(IRowElementWord approvalChangeRow, ISignatureLibraryApp approvalChangeSignature,
                                                                      StampIdentifier stampIdentifier) =>
 new ApprovalChangeSignatureWord(approvalChangeSignature, stampIdentifier,
                                 new StampFieldWord(approvalChangeRow.CellsElement[ApprovalChangeRowIndexes.SIGNATURE], StampFieldType.ApprovalChangeSignature),
                                 new StampTextFieldWord(approvalChangeRow.CellsElement[ApprovalChangeRowIndexes.ACTION_TYPE], StampFieldType.ApprovalChangeSignature),
                                 new StampTextFieldWord(approvalChangeRow.CellsElement[ApprovalChangeRowIndexes.RESPONSIBLE_PERSON], StampFieldType.ApprovalChangeSignature),
                                 new StampTextFieldWord(approvalChangeRow.CellsElement[ApprovalChangeRowIndexes.DATE], StampFieldType.ApprovalChangeSignature));
 /// <summary>
 /// Получить класс с ответственным лицом и подписью на основании полей Word
 /// </summary>
 private static IStampPerson GetStampPersonFromFields(IRowElementWord personRow, ISignatureLibraryApp personSignature,
                                                      StampIdentifier stampIdentifier) =>
 new PersonSignatureWord(personSignature, stampIdentifier,
                         new StampFieldWord(personRow.CellsElement[PersonRowIndexes.SIGNATURE], StampFieldType.PersonSignature),
                         new StampTextFieldWord(personRow.CellsElement[PersonRowIndexes.ACTION_TYPE], StampFieldType.PersonSignature),
                         new StampTextFieldWord(personRow.CellsElement[PersonRowIndexes.RESPONSIBLE_PERSON], StampFieldType.PersonSignature),
                         new StampTextFieldWord(personRow.CellsElement[PersonRowIndexes.DATE], StampFieldType.PersonSignature));
 /// <summary>
 /// Получить класс с изменениями и подписью на основании полей Word
 /// </summary>
 private static IStampChange GetStampChangeFromFields(IRowElementWord changeRow, ISignatureLibraryApp personSignature,
                                                      StampIdentifier stampIdentifier) =>
 new ChangeSignatureWord(personSignature, stampIdentifier,
                         new StampFieldWord(changeRow.CellsElement[ChangeRowIndexes.SIGNATURE], StampFieldType.ChangeSignature),
                         new StampTextFieldWord(changeRow.CellsElement[ChangeRowIndexes.NUMBER_CHANGE], StampFieldType.ChangeSignature),
                         new StampTextFieldWord(changeRow.CellsElement[ChangeRowIndexes.NUMBER_PLOTS], StampFieldType.ChangeSignature),
                         new StampTextFieldWord(changeRow.CellsElement[ChangeRowIndexes.TYPE_OF_CHANGE], StampFieldType.ChangeSignature),
                         new StampTextFieldWord(changeRow.CellsElement[ChangeRowIndexes.DOCUMENT_CHANGE], StampFieldType.ChangeSignature),
                         new StampTextFieldWord(changeRow.CellsElement[ChangeRowIndexes.DATE_CHANGE], StampFieldType.ChangeSignature));
 /// <summary>
 /// Получить класс с изменениями и подписью по строке Word
 /// </summary>
 private static IResultAppValue <IStampChange> GetStampChangeFromRow(IRowElementWord changeRow, ISignatureLibraryApp signatureLibrary,
                                                                     StampIdentifier stampIdentifier) =>
 new ResultAppValue <ISignatureLibraryApp>(signatureLibrary, new ErrorApplication(ErrorApplicationType.SignatureNotFound,
                                                                                  "Не найден идентификатор основной подписи")).
 ResultValueOk(signature => GetStampChangeFromFields(changeRow, signature, stampIdentifier));
Exemplo n.º 5
0
 /// <summary>
 /// Получить класс с ответственным лицом и подписью по строке Word для штампа согласования
 /// </summary>
 private IResultAppValue <IStampApprovalChange> GetStampApprovalChangeFromRow(IRowElementWord approvalChangeRow) =>
 CheckFieldType.GetDepartmentType(approvalChangeRow.CellsElement[ApprovalChangeRowIndexes.ACTION_TYPE].MaxLengthWord).
 Map(departmentType => GetSignatureInformation(approvalChangeRow.CellsElement[ApprovalChangeRowIndexes.RESPONSIBLE_PERSON].MaxLengthWord,
                                               PersonId, departmentType,
                                               approvalChangeRow.CellsElement[ApprovalChangeRowIndexes.ACTION_TYPE].MaxLengthWord)).
 ResultValueOk(signature => GetStampApprovalChangeFromFields(approvalChangeRow, signature, _stampIdentifier));
Exemplo n.º 6
0
 /// <summary>
 /// Получить класс с ответственным лицом и подписью на основании полей Word для строк согласования тех требований с директорами
 /// </summary>
 private static IStampApprovalChief GetStampApprovalChiefFromFields(IRowElementWord approvalChiefRow, ISignatureLibraryApp approvalChiefSignature,
                                                                    StampIdentifier stampIdentifier) =>
 new ApprovalChiefSignatureWord(approvalChiefSignature, stampIdentifier,
                                new StampFieldWord(approvalChiefRow.CellsElement[ApprovalChiefRowIndexes.SIGNATURE], StampFieldType.ApprovalChiefSignature),
                                new StampTextFieldWord(approvalChiefRow.CellsElement[ApprovalChiefRowIndexes.RESPONSIBLE_PERSON], StampFieldType.ApprovalChiefSignature),
                                new StampTextFieldWord(approvalChiefRow.CellsElement[ApprovalChiefRowIndexes.DEPARTMENT], StampFieldType.ApprovalChiefSignature));
Exemplo n.º 7
0
 /// <summary>
 /// Получить класс с ответственным лицом и подписью по строке Word для строк согласования тех требований с директорами
 /// </summary>
 private IResultAppValue <IStampApprovalChief> GetStampApprovalChiefFromRow(IRowElementWord approvalChiefRow) =>
 ConverterDepartmentTypeApp.DepartmentParsing(approvalChiefRow.CellsElement[ApprovalChiefRowIndexes.DEPARTMENT].Text).
 Map(departmentType => SignaturesSearching.FindByFullNameOrRandom(approvalChiefRow.CellsElement[ApprovalChiefRowIndexes.RESPONSIBLE_PERSON].MaxLengthWord,
                                                                  departmentType)).
 ResultValueOk(signature => GetStampApprovalChiefFromFields(approvalChiefRow, signature, _stampIdentifier));