Skip to content

Commit

Permalink
Merge pull request #705 from diadoc/add-boxidguid
Browse files Browse the repository at this point in the history
Add BoxIdGuid in Box.proto
  • Loading branch information
Vladislav Skukov authored Jul 15, 2020
2 parents cc1fcdd + c0ec8f8 commit 63c32d1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
1 change: 1 addition & 0 deletions proto/Organization.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
27 changes: 14 additions & 13 deletions src/Proto/Organization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public interface IOrganization
bool IsTest { get; }
bool IsRoaming { get; }
string LiquidationDate { get; }
}
}

[ComVisible(true)]
[Guid("CD9F454E-4A6A-4DE3-8B99-F9E89AE36F0F")]
Expand All @@ -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);
}
}

Expand All @@ -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; }
Expand All @@ -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);
}
}

Expand All @@ -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);
}
}
}
7 changes: 7 additions & 0 deletions src/Proto/Organization.proto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 63c32d1

Please sign in to comment.