update 20250111

This commit is contained in:
Stefan Hutter
2025-01-11 18:28:18 +01:00
parent bd4598e4a8
commit 11b4f840f0
150 changed files with 3091 additions and 390 deletions

View File

@@ -38,6 +38,12 @@ namespace OnDoc.UIControls.Administrator
private void AdminDokTypGenerierung_Load(object sender, EventArgs e)
{
DB db = new DB(AppParams.connectionstring);
db.Get_Tabledata("select distinct fachverantwortung from dbo.view_dokumenttypen_relaunch order by fachverantwortung asc", false, true);
foreach (System.Data.DataRow dr in db.dsdaten.Tables[0].Rows)
{
cbboxfachverantwortung.Items.Add(dr[0].ToString());
}
update_tree();
return;
@@ -49,20 +55,29 @@ namespace OnDoc.UIControls.Administrator
TreeDokumenttyp.Nodes.Clear();
string sql = "";
sql = "Select dokumenttypnr as ID, Bezeichnung, Aktiv from dokumenttyp";
string sql = " Select dokumenttypnr as ID, Bezeichnung from view_dokumenttypen_relaunch ";
string where = "";
//sql = "Select dokumenttypnr as ID, Bezeichnung, Aktiv from dokumenttyp";
if (txtFilter.Text.Trim().Length > 0)
{
sql = sql + " where bezeichnung like '%" + txtFilter.Text.Replace(" ", "%") + "%'";
if (where.Length > 0) { where = where + " and "; } else { where = "where "; }
where = where + " bezeichnung like '%" + txtFilter.Text.Replace(" ", "%") + "%'";
}
else
if (cbboxfachverantwortung.Text != "")
{
sql = sql + " where dokumenttypnr > 0";
if (where.Length > 0) { where = where + " and "; } else { where = "where "; }
where = where + " fachverantwortung ='"+cbboxfachverantwortung.Text+"'" ;
}
if (chkboxaktive.Checked) { sql = sql + " and aktiv=1"; }
if (where.Trim().Length > 0) { sql = sql + where; }
//else
//{
// sql = sql + " where dokumenttypnr > 0";
//}
// if (chkboxaktive.Checked) { sql = sql + " and aktiv=1"; }
if (rbNr.Checked)
{
sql = sql + " order by id";
sql = sql + " order by dokumenttypnr";
}
else
{
@@ -78,10 +93,10 @@ namespace OnDoc.UIControls.Administrator
TreeNodeAdv nodeAdv = new TreeNodeAdv();
nodeAdv.Text = r["id"].ToString() + " " + r["Bezeichnung"].ToString();
nodeAdv.Tag = r["id"].ToString();
if (Convert.ToBoolean(r["aktiv"]) == false)
{
nodeAdv.Font = new System.Drawing.Font(nodeAdv.Font, FontStyle.Strikeout);
}
//if (Convert.ToBoolean(r["aktiv"]) == false)
//{
// nodeAdv.Font = new System.Drawing.Font(nodeAdv.Font, FontStyle.Strikeout);
//}
TreeDokumenttyp.Nodes.Add(nodeAdv);
}
}
@@ -158,6 +173,40 @@ namespace OnDoc.UIControls.Administrator
{
}
private void chkboxInOffice_CheckedChanged(object sender, EventArgs e)
{
if (chkboxInOffice.Checked) {
chkbearbeitungdirekt.Checked = false;
chkfilloffice.Checked = true;
}
}
private void chkbearbeitungdirekt_CheckedChanged(object sender, EventArgs e)
{
if (chkbearbeitungdirekt.Checked)
{
chkboxInOffice.Checked = false;
chkfilloffice.Checked = false;
}
}
private void toolstripCombobox_Fachverantwortung_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void cbboxfachverantwortung_SelectedIndexChanged(object sender, EventArgs e)
{
update_tree();
}
private void btnFilterDelete_Click(object sender, EventArgs e)
{
cbboxfachverantwortung.Text = "";
txtFilter.Text = "";
update_tree();
}
}
}