update 20241201
This commit is contained in:
84
Client - Kopie/Backup/DocMgmt/Vorlagenauswahl.cs
Normal file
84
Client - Kopie/Backup/DocMgmt/Vorlagenauswahl.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
using OnDoc.Klassen;
|
||||
using Database;
|
||||
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.Web.UI.WebControls;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OnDoc.UICintrols
|
||||
{
|
||||
public partial class Vorlagenauswahl : UserControl
|
||||
{
|
||||
|
||||
public int dokumenttypnr { get; set; } = 0;
|
||||
|
||||
public Vorlagenauswahl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void txtSearch_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Vorlagenauswahl_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void load_standard(string filter)
|
||||
{
|
||||
string where = "";
|
||||
if (filter != "")
|
||||
{
|
||||
where = "and bezeichnung like '%" + filter.Replace(" ", "%") + "%'";
|
||||
}
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Get_Tabledata("Select dokumenttypnr as id, bezeichnung from dokumenttyp where aktiv=1 "+where+" order by bezeichnung",false,true);
|
||||
sfListView1.DataSource = db.dsdaten.Tables[0];
|
||||
sfListView1.DisplayMember = "bezeichnung";
|
||||
sfListView1.ValueMember = "id";
|
||||
}
|
||||
|
||||
private void ribbonButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
dokumenttypnr = 0;
|
||||
this.ParentForm.Close();
|
||||
}
|
||||
|
||||
private void RibbonTextSearch_TextBoxKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter) {
|
||||
load_standard(RibbonTextSearch.TextBoxText);
|
||||
}
|
||||
}
|
||||
|
||||
private void RibbonButtonSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (RibbonTextSearch.TextBoxText.Trim().Length > 0) {
|
||||
load_standard(RibbonTextSearch.TextBoxText);
|
||||
}
|
||||
}
|
||||
|
||||
private void sfListView1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
foreach (DataRowView item in sfListView1.SelectedItems)
|
||||
{
|
||||
dokumenttypnr = Convert.ToInt32(item.Row[0].ToString());
|
||||
this.ParentForm.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user