update 20250209
This commit is contained in:
61
Client/Diverses/ApprovalNotes.cs
Normal file
61
Client/Diverses/ApprovalNotes.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
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 Database;
|
||||
using OnDoc.Klassen;
|
||||
using Syncfusion.Windows.Forms.Grid;
|
||||
using Syncfusion.Windows.Forms.Tools;
|
||||
using Syncfusion.WinForms.Controls;
|
||||
using Syncfusion.WinForms.DataGrid;
|
||||
using Syncfusion.WinForms.DataGrid.Events;
|
||||
|
||||
namespace OnDoc.Diverses
|
||||
{
|
||||
public partial class ApprovalNotes : SfForm
|
||||
{
|
||||
public string dokumentid { get; set; } = "";
|
||||
public ApprovalNotes()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.sfdatagridpruefung.QueryRowHeight += sfDataGrid_QueryRowHeight;
|
||||
}
|
||||
|
||||
public ApprovalNotes(string dokumentid)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.sfdatagridpruefung.QueryRowHeight += sfDataGrid_QueryRowHeight;
|
||||
this.dokumentid = dokumentid;
|
||||
}
|
||||
|
||||
private void ApprovalNotes_Load(object sender, EventArgs e)
|
||||
{
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.clear_parameter();
|
||||
db.add_parameter("@dokumentid", this.dokumentid);
|
||||
db.Get_Tabledata("get_dokument_notes", true,false);
|
||||
this.sfdatagridpruefung.DataSource = db.dsdaten.Tables[0];
|
||||
this.sfdatagridpruefung.Columns["dokumentid"].Visible = false;
|
||||
|
||||
db = null;
|
||||
}
|
||||
|
||||
RowAutoFitOptions autoFitOptions = new RowAutoFitOptions();
|
||||
int autoHeight;
|
||||
void sfDataGrid_QueryRowHeight(object sender, QueryRowHeightEventArgs e)
|
||||
{
|
||||
if (this.sfdatagridpruefung.AutoSizeController.GetAutoRowHeight(e.RowIndex, autoFitOptions, out autoHeight))
|
||||
{
|
||||
|
||||
e.Height = autoHeight;
|
||||
e.Handled = true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user