New function add / change accountrecord
This commit is contained in:
@ -8,5 +8,6 @@ namespace WinFormDiApp.BLI
|
|||||||
bool DeleteAccountRecord(AccountRecord record);
|
bool DeleteAccountRecord(AccountRecord record);
|
||||||
IEnumerable<AccountRecord> GetAllAccBetweenDates(DateTime dateFrom, DateTime dateTo);
|
IEnumerable<AccountRecord> GetAllAccBetweenDates(DateTime dateFrom, DateTime dateTo);
|
||||||
IEnumerable<AccountRecord> GetAllAccounts();
|
IEnumerable<AccountRecord> GetAllAccounts();
|
||||||
|
AccountRecord GetAccount(int id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -74,4 +74,10 @@ public class AccountRecordRepository : IAccountRecordRepository
|
|||||||
return _dataContext.AccountRecords;
|
return _dataContext.AccountRecords;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AccountRecord GetAccount(int id)
|
||||||
|
{
|
||||||
|
var accountRec = _dataContext.AccountRecords.FirstOrDefault(a => a.Id == id);
|
||||||
|
return accountRec;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,7 @@ using WinFormDiApp.DAL;
|
|||||||
using WinFormDiApp.BL;
|
using WinFormDiApp.BL;
|
||||||
using WinFormDiApp.BLI;
|
using WinFormDiApp.BLI;
|
||||||
using WinFormDiApp.BLR;
|
using WinFormDiApp.BLR;
|
||||||
|
using WinFormDi;
|
||||||
|
|
||||||
namespace WinFormDiApp
|
namespace WinFormDiApp
|
||||||
{
|
{
|
||||||
@ -44,7 +45,8 @@ namespace WinFormDiApp
|
|||||||
.AddTransient<MainWindow>()
|
.AddTransient<MainWindow>()
|
||||||
.AddTransient<frmReadPayments>()
|
.AddTransient<frmReadPayments>()
|
||||||
.AddTransient<frmPayments>()
|
.AddTransient<frmPayments>()
|
||||||
.AddTransient<frmSearchData>();
|
.AddTransient<frmSearchData>()
|
||||||
|
.AddTransient<frmEditPayment>();
|
||||||
});
|
});
|
||||||
return builder.Build();
|
return builder.Build();
|
||||||
}
|
}
|
||||||
|
|||||||
13
WinFormDi/MainWindow.Designer.cs
generated
13
WinFormDi/MainWindow.Designer.cs
generated
@ -34,6 +34,7 @@
|
|||||||
btnLoadPayments = new Button();
|
btnLoadPayments = new Button();
|
||||||
btnSearchPayments = new Button();
|
btnSearchPayments = new Button();
|
||||||
btnClose = new Button();
|
btnClose = new Button();
|
||||||
|
btnEdit = new Button();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// helloText
|
// helloText
|
||||||
@ -96,11 +97,22 @@
|
|||||||
btnClose.UseVisualStyleBackColor = true;
|
btnClose.UseVisualStyleBackColor = true;
|
||||||
btnClose.Click += btnClose_Click;
|
btnClose.Click += btnClose_Click;
|
||||||
//
|
//
|
||||||
|
// btnEdit
|
||||||
|
//
|
||||||
|
btnEdit.Location = new Point(75, 128);
|
||||||
|
btnEdit.Name = "btnEdit";
|
||||||
|
btnEdit.Size = new Size(156, 23);
|
||||||
|
btnEdit.TabIndex = 6;
|
||||||
|
btnEdit.Text = "Justera/Addera betalning";
|
||||||
|
btnEdit.UseVisualStyleBackColor = true;
|
||||||
|
btnEdit.Click += btnEdit_Click;
|
||||||
|
//
|
||||||
// MainWindow
|
// MainWindow
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
ClientSize = new Size(800, 450);
|
ClientSize = new Size(800, 450);
|
||||||
|
Controls.Add(btnEdit);
|
||||||
Controls.Add(btnClose);
|
Controls.Add(btnClose);
|
||||||
Controls.Add(btnSearchPayments);
|
Controls.Add(btnSearchPayments);
|
||||||
Controls.Add(btnLoadPayments);
|
Controls.Add(btnLoadPayments);
|
||||||
@ -124,5 +136,6 @@
|
|||||||
private Button btnLoadPayments;
|
private Button btnLoadPayments;
|
||||||
private Button btnSearchPayments;
|
private Button btnSearchPayments;
|
||||||
private Button btnClose;
|
private Button btnClose;
|
||||||
|
private Button btnEdit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8,6 +8,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using WinFormDi;
|
||||||
|
|
||||||
namespace WinFormDiApp
|
namespace WinFormDiApp
|
||||||
{
|
{
|
||||||
@ -17,12 +18,14 @@ namespace WinFormDiApp
|
|||||||
private readonly frmPayments _payments;
|
private readonly frmPayments _payments;
|
||||||
private readonly frmReadPayments _readPayments;
|
private readonly frmReadPayments _readPayments;
|
||||||
private readonly frmSearchData _searchData;
|
private readonly frmSearchData _searchData;
|
||||||
|
private readonly frmEditPayment _editPayment;
|
||||||
|
|
||||||
public MainWindow(
|
public MainWindow(
|
||||||
IMessages messages,
|
IMessages messages,
|
||||||
frmPayments payments,
|
frmPayments payments,
|
||||||
frmReadPayments readPayments,
|
frmReadPayments readPayments,
|
||||||
frmSearchData searchData
|
frmSearchData searchData,
|
||||||
|
frmEditPayment editPayment
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -30,6 +33,7 @@ namespace WinFormDiApp
|
|||||||
_payments = payments;
|
_payments = payments;
|
||||||
_readPayments = readPayments;
|
_readPayments = readPayments;
|
||||||
_searchData = searchData;
|
_searchData = searchData;
|
||||||
|
_editPayment = editPayment;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MainWindow_Load(object sender, EventArgs e)
|
private void MainWindow_Load(object sender, EventArgs e)
|
||||||
@ -62,5 +66,10 @@ namespace WinFormDiApp
|
|||||||
{
|
{
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnEdit_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_editPayment.ShowDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
288
WinFormDi/frmEditPayment.Designer.cs
generated
Normal file
288
WinFormDi/frmEditPayment.Designer.cs
generated
Normal file
@ -0,0 +1,288 @@
|
|||||||
|
namespace WinFormDiApp
|
||||||
|
{
|
||||||
|
partial class frmEditPayment
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
lblHeader = new Label();
|
||||||
|
rbNew = new RadioButton();
|
||||||
|
rbEdit = new RadioButton();
|
||||||
|
lblIdHeader = new Label();
|
||||||
|
txtId = new TextBox();
|
||||||
|
txtAccount = new TextBox();
|
||||||
|
lblKonto = new Label();
|
||||||
|
txtReceiver = new TextBox();
|
||||||
|
lblReceiver = new Label();
|
||||||
|
txtAmount = new TextBox();
|
||||||
|
lblAmount = new Label();
|
||||||
|
lblPayDate = new Label();
|
||||||
|
txtPayInfo = new TextBox();
|
||||||
|
lblBetInfo = new Label();
|
||||||
|
tblChangeRegTime = new Label();
|
||||||
|
dtpPayDate = new DateTimePicker();
|
||||||
|
btnSave = new Button();
|
||||||
|
btnClose = new Button();
|
||||||
|
btnSearch = new Button();
|
||||||
|
txtSaved = new TextBox();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// lblHeader
|
||||||
|
//
|
||||||
|
lblHeader.AutoSize = true;
|
||||||
|
lblHeader.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||||
|
lblHeader.Location = new Point(30, 29);
|
||||||
|
lblHeader.Name = "lblHeader";
|
||||||
|
lblHeader.Size = new Size(216, 21);
|
||||||
|
lblHeader.TabIndex = 0;
|
||||||
|
lblHeader.Text = "Manuell inmatning / justering";
|
||||||
|
//
|
||||||
|
// rbNew
|
||||||
|
//
|
||||||
|
rbNew.AutoSize = true;
|
||||||
|
rbNew.Checked = true;
|
||||||
|
rbNew.Location = new Point(33, 75);
|
||||||
|
rbNew.Name = "rbNew";
|
||||||
|
rbNew.Size = new Size(103, 19);
|
||||||
|
rbNew.TabIndex = 2;
|
||||||
|
rbNew.TabStop = true;
|
||||||
|
rbNew.Text = "Ny registrering";
|
||||||
|
rbNew.UseVisualStyleBackColor = true;
|
||||||
|
rbNew.CheckedChanged += rbNew_CheckedChanged;
|
||||||
|
//
|
||||||
|
// rbEdit
|
||||||
|
//
|
||||||
|
rbEdit.AutoSize = true;
|
||||||
|
rbEdit.Location = new Point(33, 100);
|
||||||
|
rbEdit.Name = "rbEdit";
|
||||||
|
rbEdit.Size = new Size(68, 19);
|
||||||
|
rbEdit.TabIndex = 3;
|
||||||
|
rbEdit.Text = "Ändring";
|
||||||
|
rbEdit.UseVisualStyleBackColor = true;
|
||||||
|
rbEdit.CheckedChanged += rbEdit_CheckedChanged;
|
||||||
|
//
|
||||||
|
// lblIdHeader
|
||||||
|
//
|
||||||
|
lblIdHeader.AutoSize = true;
|
||||||
|
lblIdHeader.Location = new Point(33, 134);
|
||||||
|
lblIdHeader.Name = "lblIdHeader";
|
||||||
|
lblIdHeader.Size = new Size(51, 15);
|
||||||
|
lblIdHeader.TabIndex = 4;
|
||||||
|
lblIdHeader.Text = "Identitet";
|
||||||
|
//
|
||||||
|
// txtId
|
||||||
|
//
|
||||||
|
txtId.Enabled = false;
|
||||||
|
txtId.Location = new Point(133, 131);
|
||||||
|
txtId.Name = "txtId";
|
||||||
|
txtId.Size = new Size(139, 23);
|
||||||
|
txtId.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// txtAccount
|
||||||
|
//
|
||||||
|
txtAccount.Location = new Point(133, 163);
|
||||||
|
txtAccount.Name = "txtAccount";
|
||||||
|
txtAccount.Size = new Size(139, 23);
|
||||||
|
txtAccount.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// lblKonto
|
||||||
|
//
|
||||||
|
lblKonto.AutoSize = true;
|
||||||
|
lblKonto.Location = new Point(33, 166);
|
||||||
|
lblKonto.Name = "lblKonto";
|
||||||
|
lblKonto.Size = new Size(39, 15);
|
||||||
|
lblKonto.TabIndex = 6;
|
||||||
|
lblKonto.Text = "Konto";
|
||||||
|
//
|
||||||
|
// txtReceiver
|
||||||
|
//
|
||||||
|
txtReceiver.Location = new Point(133, 201);
|
||||||
|
txtReceiver.Name = "txtReceiver";
|
||||||
|
txtReceiver.Size = new Size(353, 23);
|
||||||
|
txtReceiver.TabIndex = 9;
|
||||||
|
//
|
||||||
|
// lblReceiver
|
||||||
|
//
|
||||||
|
lblReceiver.AutoSize = true;
|
||||||
|
lblReceiver.Location = new Point(33, 204);
|
||||||
|
lblReceiver.Name = "lblReceiver";
|
||||||
|
lblReceiver.Size = new Size(62, 15);
|
||||||
|
lblReceiver.TabIndex = 8;
|
||||||
|
lblReceiver.Text = "Mottagare";
|
||||||
|
//
|
||||||
|
// txtAmount
|
||||||
|
//
|
||||||
|
txtAmount.Location = new Point(133, 239);
|
||||||
|
txtAmount.Name = "txtAmount";
|
||||||
|
txtAmount.Size = new Size(139, 23);
|
||||||
|
txtAmount.TabIndex = 11;
|
||||||
|
//
|
||||||
|
// lblAmount
|
||||||
|
//
|
||||||
|
lblAmount.AutoSize = true;
|
||||||
|
lblAmount.Location = new Point(33, 242);
|
||||||
|
lblAmount.Name = "lblAmount";
|
||||||
|
lblAmount.Size = new Size(44, 15);
|
||||||
|
lblAmount.TabIndex = 10;
|
||||||
|
lblAmount.Text = "Belopp";
|
||||||
|
//
|
||||||
|
// lblPayDate
|
||||||
|
//
|
||||||
|
lblPayDate.AutoSize = true;
|
||||||
|
lblPayDate.Location = new Point(33, 280);
|
||||||
|
lblPayDate.Name = "lblPayDate";
|
||||||
|
lblPayDate.Size = new Size(67, 15);
|
||||||
|
lblPayDate.TabIndex = 12;
|
||||||
|
lblPayDate.Text = "Förfallodag";
|
||||||
|
//
|
||||||
|
// txtPayInfo
|
||||||
|
//
|
||||||
|
txtPayInfo.Location = new Point(133, 315);
|
||||||
|
txtPayInfo.Name = "txtPayInfo";
|
||||||
|
txtPayInfo.Size = new Size(139, 23);
|
||||||
|
txtPayInfo.TabIndex = 15;
|
||||||
|
//
|
||||||
|
// lblBetInfo
|
||||||
|
//
|
||||||
|
lblBetInfo.AutoSize = true;
|
||||||
|
lblBetInfo.Location = new Point(30, 318);
|
||||||
|
lblBetInfo.Name = "lblBetInfo";
|
||||||
|
lblBetInfo.Size = new Size(56, 15);
|
||||||
|
lblBetInfo.TabIndex = 14;
|
||||||
|
lblBetInfo.Text = "Avisering";
|
||||||
|
//
|
||||||
|
// tblChangeRegTime
|
||||||
|
//
|
||||||
|
tblChangeRegTime.AutoSize = true;
|
||||||
|
tblChangeRegTime.Location = new Point(33, 356);
|
||||||
|
tblChangeRegTime.Name = "tblChangeRegTime";
|
||||||
|
tblChangeRegTime.Size = new Size(89, 15);
|
||||||
|
tblChangeRegTime.TabIndex = 16;
|
||||||
|
tblChangeRegTime.Text = "Ändring Sparad";
|
||||||
|
//
|
||||||
|
// dtpPayDate
|
||||||
|
//
|
||||||
|
dtpPayDate.Format = DateTimePickerFormat.Short;
|
||||||
|
dtpPayDate.Location = new Point(133, 274);
|
||||||
|
dtpPayDate.Name = "dtpPayDate";
|
||||||
|
dtpPayDate.Size = new Size(139, 23);
|
||||||
|
dtpPayDate.TabIndex = 18;
|
||||||
|
//
|
||||||
|
// btnSave
|
||||||
|
//
|
||||||
|
btnSave.Location = new Point(330, 464);
|
||||||
|
btnSave.Name = "btnSave";
|
||||||
|
btnSave.Size = new Size(75, 23);
|
||||||
|
btnSave.TabIndex = 19;
|
||||||
|
btnSave.Text = "Spara";
|
||||||
|
btnSave.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// btnClose
|
||||||
|
//
|
||||||
|
btnClose.Location = new Point(411, 464);
|
||||||
|
btnClose.Name = "btnClose";
|
||||||
|
btnClose.Size = new Size(75, 23);
|
||||||
|
btnClose.TabIndex = 20;
|
||||||
|
btnClose.Text = "Avbryt";
|
||||||
|
btnClose.UseVisualStyleBackColor = true;
|
||||||
|
btnClose.Click += btnClose_Click;
|
||||||
|
//
|
||||||
|
// btnSearch
|
||||||
|
//
|
||||||
|
btnSearch.Location = new Point(278, 130);
|
||||||
|
btnSearch.Name = "btnSearch";
|
||||||
|
btnSearch.Size = new Size(75, 23);
|
||||||
|
btnSearch.TabIndex = 21;
|
||||||
|
btnSearch.Text = "Sök post";
|
||||||
|
btnSearch.UseVisualStyleBackColor = true;
|
||||||
|
btnSearch.Visible = false;
|
||||||
|
btnSearch.Click += btnSearch_Click;
|
||||||
|
//
|
||||||
|
// txtSaved
|
||||||
|
//
|
||||||
|
txtSaved.Enabled = false;
|
||||||
|
txtSaved.Location = new Point(133, 353);
|
||||||
|
txtSaved.Name = "txtSaved";
|
||||||
|
txtSaved.Size = new Size(139, 23);
|
||||||
|
txtSaved.TabIndex = 17;
|
||||||
|
//
|
||||||
|
// frmEditPayment
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(527, 509);
|
||||||
|
Controls.Add(btnSearch);
|
||||||
|
Controls.Add(btnClose);
|
||||||
|
Controls.Add(btnSave);
|
||||||
|
Controls.Add(dtpPayDate);
|
||||||
|
Controls.Add(txtSaved);
|
||||||
|
Controls.Add(tblChangeRegTime);
|
||||||
|
Controls.Add(txtPayInfo);
|
||||||
|
Controls.Add(lblBetInfo);
|
||||||
|
Controls.Add(lblPayDate);
|
||||||
|
Controls.Add(txtAmount);
|
||||||
|
Controls.Add(lblAmount);
|
||||||
|
Controls.Add(txtReceiver);
|
||||||
|
Controls.Add(lblReceiver);
|
||||||
|
Controls.Add(txtAccount);
|
||||||
|
Controls.Add(lblKonto);
|
||||||
|
Controls.Add(txtId);
|
||||||
|
Controls.Add(lblIdHeader);
|
||||||
|
Controls.Add(rbEdit);
|
||||||
|
Controls.Add(rbNew);
|
||||||
|
Controls.Add(lblHeader);
|
||||||
|
Name = "frmEditPayment";
|
||||||
|
StartPosition = FormStartPosition.CenterScreen;
|
||||||
|
Text = "frmEditPayment";
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Label lblHeader;
|
||||||
|
private RadioButton rbNew;
|
||||||
|
private RadioButton rbEdit;
|
||||||
|
private Label lblIdHeader;
|
||||||
|
private TextBox txtId;
|
||||||
|
private TextBox txtAccount;
|
||||||
|
private Label lblKonto;
|
||||||
|
private TextBox txtReceiver;
|
||||||
|
private Label lblReceiver;
|
||||||
|
private TextBox txtAmount;
|
||||||
|
private Label lblAmount;
|
||||||
|
private TextBox txtLastPaydate;
|
||||||
|
private Label lblPayDate;
|
||||||
|
private TextBox txtPayInfo;
|
||||||
|
private Label lblBetInfo;
|
||||||
|
private Label tblChangeRegTime;
|
||||||
|
private DateTimePicker dtpPayDate;
|
||||||
|
private Button btnSave;
|
||||||
|
private Button btnClose;
|
||||||
|
private Button btnSearch;
|
||||||
|
private TextBox txtSaved;
|
||||||
|
}
|
||||||
|
}
|
||||||
69
WinFormDi/frmEditPayment.cs
Normal file
69
WinFormDi/frmEditPayment.cs
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using WinFormDiApp.BL.Helpers;
|
||||||
|
using WinFormDiApp.BLI;
|
||||||
|
|
||||||
|
namespace WinFormDiApp
|
||||||
|
{
|
||||||
|
public partial class frmEditPayment : Form
|
||||||
|
{
|
||||||
|
private readonly IAccountRecordRepository _recordRepository;
|
||||||
|
|
||||||
|
public frmEditPayment(IAccountRecordRepository recordRepository)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_recordRepository = recordRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void rbNew_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (rbNew.Checked)
|
||||||
|
{
|
||||||
|
txtId.Enabled = false;
|
||||||
|
btnSearch.Enabled = false;
|
||||||
|
btnSearch.Visible = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void rbEdit_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (rbEdit.Checked)
|
||||||
|
{
|
||||||
|
txtId.Enabled = true;
|
||||||
|
btnSearch.Enabled = true;
|
||||||
|
btnSearch.Visible = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnClose_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnSearch_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (txtId.Text.IsNumeric())
|
||||||
|
{
|
||||||
|
var editRecord = _recordRepository.GetAccount(int.Parse(txtId.Text));
|
||||||
|
if (editRecord != null)
|
||||||
|
{
|
||||||
|
txtAccount.Text = editRecord.Konto.ToString();
|
||||||
|
txtAmount.Text = editRecord.Belopp.ToString();
|
||||||
|
txtPayInfo.Text = editRecord.Avisering.ToString();
|
||||||
|
txtReceiver.Text = editRecord.Mottagare.ToString();
|
||||||
|
dtpPayDate.Value = editRecord.BetalDatum;
|
||||||
|
txtSaved.Text = editRecord.Stored.ToLongDateString();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
WinFormDi/frmEditPayment.resx
Normal file
120
WinFormDi/frmEditPayment.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
Reference in New Issue
Block a user