-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloan2ndCaseCompanyRPreview.cs
102 lines (84 loc) · 3.61 KB
/
loan2ndCaseCompanyRPreview.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Bank_System.viewmodel
{
public partial class loan2ndCaseCompanyRPreview : Form
{
public loan2ndCaseCompanyRPreview()
{
InitializeComponent();
}
model.LoanClasses.companyWithoutAccountLoan loan;
public loan2ndCaseCompanyRPreview(model.LoanClasses.companyWithoutAccountLoan companyLoan)
{
InitializeComponent();
loan = companyLoan;
name.Text = loan.tempcompany.name;
feildPreviewNotes.Text = loan.fieldPreviewNote;
crruncy.Text = loan.tempcompany.crruncy;
bankAccountiD.Text = loan.tempcompany.accountNumber;
loanID.Text = loan.loanID;
loanValue.Text = loan.loanValue.ToString();
arabicLoanValue.Text = new model.ToWord(loan.loanValue, loan.tempcompany.crruncy)
.ConvertToArabic();
installmentsNumber.Text = loan.installmentsNumber.ToString();
installmentSystem.Text = loan.installmentsSystem;
installmentValue.Text = loan.installmentValue.ToString();
installmentValue_in_arabic.Text = new model.ToWord(loan.installmentValue, loan.tempcompany.crruncy).ConvertToArabic();
binfetPrecentage.Text = loan.benfitPrecent.ToString();
loanValueWithBinfets.Text = loan.loanValueWithBinfets.ToString();
loanValue_in_arabic.Text = new model.ToWord(loan.loanValueWithBinfets, loan.tempcompany.crruncy).ConvertToArabic();
installmentWithBinfet.Text = loan.installmentValueWithBinfets.ToString();
inValue_with_in_arabic.Text = new model.ToWord(loan.installmentValueWithBinfets, loan.tempcompany.crruncy).ConvertToArabic();
loanEndDate.Text = model.calcLoanEndDate.endDateString(loan.loanEndDate);
if (loan.haveBankAccount)
{
this.ishaveanotherbank.Text = "نعم";
this.ishaveanotherbank.BackColor = Color.SpringGreen;
this.ishaveanotherbank.ForeColor = Color.Maroon;
morebankinfo.Visible = true;
bankName.Text = loan.bankName;
accountNumberINBank.Text = loan.bankNumber;
}
else
{
this.ishaveanotherbank.Text = "لا";
this.ishaveanotherbank.BackColor = Color.Maroon;
this.ishaveanotherbank.ForeColor = Color.SpringGreen;
}
}
private void panel2_Paint(object sender, PaintEventArgs e)
{
}
private void loanReportPreview_Load(object sender, EventArgs e)
{
dayDate.Text = DateTime.Now.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(" تمت طباعة التقارير جري الحفظ");
if (db.companyLoanDB.addLoanWithoutAccount(loan))
{
model.systemData.navigator.formStore.Pop().Visible = true;
this.Close();
MessageBox.Show("تم الحفظ");
}
else
{
MessageBox.Show("لم يتم الحفظ بشكل سليم");
}
}
private void loanID_TextChanged(object sender, EventArgs e)
{
}
private void ishaveanotherbank_TextChanged(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
model.systemData.navigator.formStore.Pop().Visible = true;
}
}
}