Skip to content

Commit

Permalink
Add pre-defined documents
Browse files Browse the repository at this point in the history
  • Loading branch information
woin2ee committed Aug 19, 2024
1 parent f97b9c1 commit 336e17e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MemoGenerator/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@
IsChecked="{Binding ChecksCertificateOfInsurancePayment, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
<CheckBox Margin="10,0,0,0" Click="updateDocumentsDeliveryRouteComponent" Content="카드영수증"
IsChecked="{Binding ChecksReceiptOfCard, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
<CheckBox Margin="10,0,0,0" Click="updateDocumentsDeliveryRouteComponent" Content="계약 서류"
IsChecked="{Binding ChecksContractDocuments, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
<CheckBox Margin="10,0,0,0" Click="updateDocumentsDeliveryRouteComponent" Content="대금 지급 서류"
IsChecked="{Binding ChecksPaymentDocuments, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
</StackPanel>
</StackPanel>
</StackPanel>
Expand Down
47 changes: 47 additions & 0 deletions MemoGenerator/Model/MemoGenerating/ProofDocumentModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ enum PreDefinedDocument
{
certificateOfInsurancePayment, // 4대보험완납증명서
receiptOfCard, // 카드 영수증
contractDocuments, // 계약 서류
paymentDocuments, // 대금 지급 서류
}

static class PreDefinedDocumentExtensions
Expand All @@ -31,6 +33,10 @@ internal static string name(this PreDefinedDocument document)
return "4대보험완납증명서";
case PreDefinedDocument.receiptOfCard:
return "카드영수증";
case PreDefinedDocument.contractDocuments:
return "계약 서류";
case PreDefinedDocument.paymentDocuments:
return "대금 지급 서류";
default:
return ""; // 바인딩 과정에서 -1값이 들어오는 현상이 있음
}
Expand Down Expand Up @@ -150,6 +156,8 @@ public string DetailedDocumentList

propertyChanged("ChecksCertificateOfInsurancePayment");
propertyChanged("ChecksReceiptOfCard");
propertyChanged("ChecksContractDocuments");
propertyChanged("ChecksPaymentDocuments");
}
}

Expand All @@ -163,7 +171,10 @@ public bool ChecksCertificateOfInsurancePayment
detailedDocumentList = null;

propertyChanged("DetailedDocumentList");
propertyChanged("ChecksCertificateOfInsurancePayment");
propertyChanged("ChecksReceiptOfCard");
propertyChanged("ChecksContractDocuments");
propertyChanged("ChecksPaymentDocuments");
}
}

Expand All @@ -178,6 +189,42 @@ public bool ChecksReceiptOfCard

propertyChanged("DetailedDocumentList");
propertyChanged("ChecksCertificateOfInsurancePayment");
propertyChanged("ChecksReceiptOfCard");
propertyChanged("ChecksContractDocuments");
propertyChanged("ChecksPaymentDocuments");
}
}
public bool ChecksContractDocuments
{
get => preDefinedDocumentSelections[PreDefinedDocument.contractDocuments];
set
{
disableAllPreDefinedDocumentSelections();
preDefinedDocumentSelections[PreDefinedDocument.contractDocuments] = value;
detailedDocumentList = null;

propertyChanged("DetailedDocumentList");
propertyChanged("ChecksCertificateOfInsurancePayment");
propertyChanged("ChecksReceiptOfCard");
propertyChanged("ChecksContractDocuments");
propertyChanged("ChecksPaymentDocuments");
}
}

public bool ChecksPaymentDocuments
{
get => preDefinedDocumentSelections[PreDefinedDocument.paymentDocuments];
set
{
disableAllPreDefinedDocumentSelections();
preDefinedDocumentSelections[PreDefinedDocument.paymentDocuments] = value;
detailedDocumentList = null;

propertyChanged("DetailedDocumentList");
propertyChanged("ChecksCertificateOfInsurancePayment");
propertyChanged("ChecksReceiptOfCard");
propertyChanged("ChecksContractDocuments");
propertyChanged("ChecksPaymentDocuments");
}
}

Expand Down

0 comments on commit 336e17e

Please sign in to comment.