You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.9 KiB

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;
}
}
}
}