From c0ec8f83701d5df0d2d51a322d5eb8b62b130acf Mon Sep 17 00:00:00 2001 From: Vladislav Skukov Date: Tue, 14 Jul 2020 13:36:27 +0500 Subject: [PATCH] Add BoxIdGuid in Box.proto --- proto/Organization.proto | 1 + src/Proto/Organization.cs | 27 ++++++++++++++------------- src/Proto/Organization.proto.cs | 7 +++++++ 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/proto/Organization.proto b/proto/Organization.proto index 7f312e9e..59a72792 100644 --- a/proto/Organization.proto +++ b/proto/Organization.proto @@ -51,6 +51,7 @@ enum OrganizationInvoiceFormatVersion { message Box { required string BoxId = 1; + required string BoxIdGuid = 6; required string Title = 2; optional Organization Organization = 3; optional OrganizationInvoiceFormatVersion InvoiceFormatVersion = 4 [default = v5_02]; diff --git a/src/Proto/Organization.cs b/src/Proto/Organization.cs index 789d7cdd..ac250e26 100644 --- a/src/Proto/Organization.cs +++ b/src/Proto/Organization.cs @@ -48,7 +48,7 @@ public interface IOrganization bool IsTest { get; } bool IsRoaming { get; } string LiquidationDate { get; } - } + } [ComVisible(true)] [Guid("CD9F454E-4A6A-4DE3-8B99-F9E89AE36F0F")] @@ -71,13 +71,13 @@ public override string ToString() { var boxes = string.Join("\r\n", Boxes.Select(b => b.ToString()).ToArray()); return string.Format("OrgId: {0}, Inn: {1}, Kpp: {2}, FullName: {3}, ShortName: {4}, Boxes:\r\n {5}, " + - "Ogrn: {6}, FnsParticipantId: {7}, Address: {8}, FnsRegistrationDate: {9}, " + - "Departments: {10}, IfnsCode: {11}, IsPilot: {12}, IsActive: {13}, IsTest: {14}, " + - "IsBranch: {15}, IsRoaming: {16}, IsEmployee: {17}, InvitationCount: {18}, " + - "SearchCount: {19}, Sociability: {20}, LiquidationDate: {21}, CertificateOfRegistryInfo: {22}", - OrgId, Inn, Kpp, FullName, ShortName, boxes, Ogrn, FnsParticipantId, Address, FnsRegistrationDate, - Departments, IfnsCode, IsPilot, IsActive, IsTest, IsBranch, IsRoaming, IsEmployee, InvitationCount, - SearchCount, Sociability, LiquidationDate, CertificateOfRegistryInfo); + "Ogrn: {6}, FnsParticipantId: {7}, Address: {8}, FnsRegistrationDate: {9}, " + + "Departments: {10}, IfnsCode: {11}, IsPilot: {12}, IsActive: {13}, IsTest: {14}, " + + "IsBranch: {15}, IsRoaming: {16}, IsEmployee: {17}, InvitationCount: {18}, " + + "SearchCount: {19}, Sociability: {20}, LiquidationDate: {21}, CertificateOfRegistryInfo: {22}", + OrgId, Inn, Kpp, FullName, ShortName, boxes, Ogrn, FnsParticipantId, Address, FnsRegistrationDate, + Departments, IfnsCode, IsPilot, IsActive, IsTest, IsBranch, IsRoaming, IsEmployee, InvitationCount, + SearchCount, Sociability, LiquidationDate, CertificateOfRegistryInfo); } } @@ -86,6 +86,7 @@ public override string ToString() public interface IBox { string BoxId { get; } + string BoxIdGuid { get; } string Title { get; } Organization Organization { get; } Com.OrganizationInvoiceFormatVersion InvoiceFormatVersionValue { get; } @@ -103,12 +104,12 @@ public Com.OrganizationInvoiceFormatVersion InvoiceFormatVersionValue get { return (Com.OrganizationInvoiceFormatVersion) InvoiceFormatVersion; } set { InvoiceFormatVersion = (OrganizationInvoiceFormatVersion) value; } } - + public override string ToString() { return string.Format("BoxId: {0}, Title: {1}, Organization: {2}, " + - "InvoiceFormatVersion: {3}, EncryptedDocumentsAllowed: {4}", - BoxId, Title, Organization, InvoiceFormatVersion, EncryptedDocumentsAllowed); + "InvoiceFormatVersion: {3}, EncryptedDocumentsAllowed: {4}", + BoxId, Title, Organization, InvoiceFormatVersion, EncryptedDocumentsAllowed); } } @@ -133,8 +134,8 @@ public partial class Department : SafeComObject, IDepartment public override string ToString() { return string.Format("DepartmentId: {0}, Name: {1}, ParentDepartmentId: {2}, " + - "Abbreviation: {3}, Kpp: {4}, Address: {5}, IsDisabled: {6}", - DepartmentId, Name, ParentDepartmentId, Abbreviation, Kpp, Address, IsDisabled); + "Abbreviation: {3}, Kpp: {4}, Address: {5}, IsDisabled: {6}", + DepartmentId, Name, ParentDepartmentId, Abbreviation, Kpp, Address, IsDisabled); } } } \ No newline at end of file diff --git a/src/Proto/Organization.proto.cs b/src/Proto/Organization.proto.cs index 07043d4e..b2e9f420 100644 --- a/src/Proto/Organization.proto.cs +++ b/src/Proto/Organization.proto.cs @@ -330,6 +330,13 @@ public string BoxId get { return _BoxId; } set { _BoxId = value; } } + private string _BoxIdGuid; + [global::ProtoBuf.ProtoMember(6, IsRequired = true, Name=@"BoxIdGuid", DataFormat = global::ProtoBuf.DataFormat.Default)] + public string BoxIdGuid + { + get { return _BoxIdGuid; } + set { _BoxIdGuid = value; } + } private string _Title; [global::ProtoBuf.ProtoMember(2, IsRequired = true, Name=@"Title", DataFormat = global::ProtoBuf.DataFormat.Default)] public string Title