update 20240927

This commit is contained in:
Stefan Hutter
2024-09-27 18:41:27 +02:00
parent 9fcecb2c35
commit bbace0411f
172 changed files with 3073 additions and 1413076 deletions

View File

@@ -28,43 +28,45 @@
/// </summary>
private void InitializeComponent()
{
this.GridDokumenttyp = new Syncfusion.WinForms.DataGrid.SfDataGrid();
((System.ComponentModel.ISupportInitialize)(this.GridDokumenttyp)).BeginInit();
this.GridData = new Syncfusion.WinForms.DataGrid.SfDataGrid();
((System.ComponentModel.ISupportInitialize)(this.GridData)).BeginInit();
this.SuspendLayout();
//
// GridDokumenttyp
// GridData
//
this.GridDokumenttyp.AccessibleName = "Table";
this.GridDokumenttyp.AllowEditing = false;
this.GridDokumenttyp.AllowFiltering = true;
this.GridDokumenttyp.AllowResizingColumns = true;
this.GridDokumenttyp.AllowSelectionOnMouseDown = true;
this.GridDokumenttyp.Dock = System.Windows.Forms.DockStyle.Fill;
this.GridDokumenttyp.Location = new System.Drawing.Point(2, 2);
this.GridDokumenttyp.Name = "GridDokumenttyp";
this.GridDokumenttyp.Size = new System.Drawing.Size(796, 446);
this.GridDokumenttyp.Style.HeaderStyle.FilterIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(29)))), ((int)(((byte)(29)))), ((int)(((byte)(29)))));
this.GridDokumenttyp.TabIndex = 1;
this.GridDokumenttyp.Text = "sfDataGrid1";
this.GridData.AccessibleName = "Table";
this.GridData.AllowEditing = false;
this.GridData.AllowFiltering = true;
this.GridData.AllowResizingColumns = true;
this.GridData.AllowSelectionOnMouseDown = true;
this.GridData.Dock = System.Windows.Forms.DockStyle.Fill;
this.GridData.Location = new System.Drawing.Point(2, 2);
this.GridData.Name = "GridData";
this.GridData.Size = new System.Drawing.Size(369, 446);
this.GridData.Style.HeaderStyle.FilterIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(29)))), ((int)(((byte)(29)))), ((int)(((byte)(29)))));
this.GridData.TabIndex = 1;
this.GridData.Text = "sfDataGrid1";
this.GridData.CellClick += new Syncfusion.WinForms.DataGrid.Events.CellClickEventHandler(this.GridData_CellClick);
this.GridData.CellDoubleClick += new Syncfusion.WinForms.DataGrid.Events.CellClickEventHandler(this.GridData_CellDoubleClick);
//
// valueselector
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.GridDokumenttyp);
this.ClientSize = new System.Drawing.Size(373, 450);
this.Controls.Add(this.GridData);
this.Name = "valueselector";
this.Style.MdiChild.IconHorizontalAlignment = System.Windows.Forms.HorizontalAlignment.Center;
this.Style.MdiChild.IconVerticalAlignment = System.Windows.Forms.VisualStyles.VerticalAlignment.Center;
this.Text = "Werte-Auwahl";
this.Load += new System.EventHandler(this.valueselector_Load);
((System.ComponentModel.ISupportInitialize)(this.GridDokumenttyp)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.GridData)).EndInit();
this.ResumeLayout(false);
}
#endregion
private Syncfusion.WinForms.DataGrid.SfDataGrid GridDokumenttyp;
private Syncfusion.WinForms.DataGrid.SfDataGrid GridData;
}
}

View File

@@ -7,7 +7,9 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using OnDoc.Klassen;
using Syncfusion.WinForms.Controls;
using Windows.UI.Xaml.Controls;
namespace OnDoc.Diverses
{
@@ -15,6 +17,8 @@ namespace OnDoc.Diverses
{
public string partnernr { get; set; } = "";
public string datenherkunft { get; set; } = "";
public string selected_value { get; set; }
public valueselector()
{
InitializeComponent();
@@ -22,11 +26,46 @@ namespace OnDoc.Diverses
private void valueselector_Load(object sender, EventArgs e)
{
this.SetDesktopLocation(Cursor.Position.X, Cursor.Position.Y);
}
public void load_data() {
public void load_data()
{
Database.DB dB = new Database.DB(AppParams.connectionstring);
dB.clear_parameter();
dB.add_parameter("@nrpar00",partnernr);
dB.add_parameter("@regel", datenherkunft);
dB.Get_Tabledata("dbo.SP_Dokumentbearbeitung_DokWertList", true, false);
this.GridData.DataSource = dB.dsdaten.Tables[0];
GridData.AutoSizeColumnsMode = Syncfusion.WinForms.DataGrid.Enums.AutoSizeColumnsMode.AllCells;
}
private void GridData_CellClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e)
{
string value = "";
try
{
var selectedItem = e.DataRow;
var dataRow = (e.DataRow.RowData as DataRowView).Row;
value = dataRow[0].ToString();
selected_value = value;
}
catch { selected_value = ""; }
}
private void GridData_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e)
{
string value = "";
try
{
var selectedItem = e.DataRow;
var dataRow = (e.DataRow.RowData as DataRowView).Row;
value = dataRow[0].ToString();
selected_value = value;
}
catch { selected_value = ""; }
DialogResult = DialogResult.OK;
this.Close();
}
}
}