update 20241008
This commit is contained in:
@@ -74,6 +74,8 @@ namespace OnDoc.UIControls.Administrator
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
private void Update_Details(int id) {
|
||||
db.Get_Tabledata("Select office_vorlagenr, bezeichnung from office_vorlage", false, true);
|
||||
cbboxofficevorlage.DataSource = db.dsdaten.Tables[0];
|
||||
|
||||
3
Client/UIControls/Approval.Designer.cs
generated
3
Client/UIControls/Approval.Designer.cs
generated
@@ -459,7 +459,8 @@
|
||||
this.ribbonButtonApproved.LargeImage = global::OnDoc.Properties.Resources.Approval_OK_32x32_32;
|
||||
this.ribbonButtonApproved.Name = "ribbonButtonApproved";
|
||||
this.ribbonButtonApproved.SmallImage = global::OnDoc.Properties.Resources.Approval_OK_24x24_32;
|
||||
this.ribbonButtonApproved.Text = "Bewilligt";
|
||||
this.ribbonButtonApproved.Text = "Geprüft";
|
||||
this.ribbonButtonApproved.Click += new System.EventHandler(this.ribbonButtonApproved_Click);
|
||||
//
|
||||
// ribbonButtonNotApproved
|
||||
//
|
||||
|
||||
@@ -104,8 +104,8 @@ namespace OnDoc.UIControls
|
||||
TreeNodeAdv tn2 = new TreeNodeAdv();
|
||||
TreeNodeAdv tnpartner = null;
|
||||
|
||||
tn1.Text = "Dokument-Inhalt";
|
||||
tn2.Text = "Unterschriften";
|
||||
tn1.Text = "Unterschfit links";
|
||||
tn2.Text = "Unterschrift rechts";
|
||||
int tmppartner = 0;
|
||||
foreach (DataRow dr in db.dsdaten.Tables[0].Rows)
|
||||
{
|
||||
@@ -137,17 +137,47 @@ namespace OnDoc.UIControls
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
string sql = "update dokument_bewilligung set abgelehnt=1, abgelehnt_am = '" + DateTime.Now.ToString() + "' where id=" + dr["id"].ToString();
|
||||
db.Exec_SQL(sql);
|
||||
db = null;
|
||||
|
||||
treeViewAdv1.Nodes.Remove(treeViewAdv1.SelectedNode);
|
||||
TreeNodeAdv tp = treeViewAdv1.SelectedNode.Parent;
|
||||
treeViewAdv1.SelectedNode.Parent.Nodes.Remove(treeViewAdv1.SelectedNode);
|
||||
if (dr["Bewilligungstyp"].ToString() == "2")
|
||||
{
|
||||
db.Exec_SQL("Update dokument set approved=0, approval2=0 where dokumentid='" + dr["dokumentid"].ToString()+"'");
|
||||
}
|
||||
else
|
||||
{
|
||||
db.Exec_SQL("Update dokument set approved=0, approval1=0 where dokumentid='" + dr["dokumentid"].ToString());
|
||||
}
|
||||
if (tp.Nodes.Count < 1)
|
||||
{
|
||||
tp.Parent.Nodes.Remove(tp);
|
||||
}
|
||||
|
||||
db = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void ribbonButtonApproved_Click(object sender, EventArgs e)
|
||||
{
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
DataRow dr = treeViewAdv1.SelectedNode.TagObject as DataRow;
|
||||
string sql = "update dokument_bewilligung set bewilligt=1, bewilligt_am = '" + DateTime.Now.ToString() + "' where id=" + dr["id"].ToString();
|
||||
db.Exec_SQL(sql);
|
||||
treeViewAdv1.Nodes.Remove(treeViewAdv1.SelectedNode);
|
||||
TreeNodeAdv tp = treeViewAdv1.SelectedNode.Parent;
|
||||
treeViewAdv1.SelectedNode.Parent.Nodes.Remove(treeViewAdv1.SelectedNode);
|
||||
|
||||
|
||||
if (dr["Bewilligungstyp"].ToString() == "2")
|
||||
{
|
||||
db.Exec_SQL("Update dokument set approval2=1 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||
}
|
||||
else
|
||||
{
|
||||
db.Exec_SQL("Update dokument set approval1=1 where dokumentid='" + dr["dokumentid"].ToString());
|
||||
}
|
||||
db = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
3
Client/UIControls/DokList.Designer.cs
generated
3
Client/UIControls/DokList.Designer.cs
generated
@@ -864,9 +864,8 @@ namespace OnDoc.UICintrols
|
||||
this.lblToApprove.ForeColor = System.Drawing.Color.Red;
|
||||
this.lblToApprove.Location = new System.Drawing.Point(407, 88);
|
||||
this.lblToApprove.Name = "lblToApprove";
|
||||
this.lblToApprove.Size = new System.Drawing.Size(26, 18);
|
||||
this.lblToApprove.Size = new System.Drawing.Size(0, 18);
|
||||
this.lblToApprove.TabIndex = 6;
|
||||
this.lblToApprove.Text = "12";
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
|
||||
@@ -456,6 +456,11 @@ namespace OnDoc.UICintrols
|
||||
{
|
||||
createnewdoc(0, 0);
|
||||
}
|
||||
|
||||
public void StartPruefung()
|
||||
{
|
||||
ribbonButtonApproval_Click(null, null);
|
||||
}
|
||||
public void createnewdoc(int partnernr, int dokumenttypnr, bool Favoriten = false, string interaktion = "Yes", string showdoc = "Yes")
|
||||
{
|
||||
|
||||
@@ -593,6 +598,11 @@ namespace OnDoc.UICintrols
|
||||
|
||||
public void hide_panels()
|
||||
{
|
||||
this.RibbonButtonFavoriten.Visible = false;
|
||||
this.RibbonPanelSuche.Visible = false;
|
||||
this.RibbonPannelAproval.Visible = false;
|
||||
this.lblToApprove.Visible = false;
|
||||
this.cbboxMitarbeiter.Visible = false;
|
||||
this.RibbonPanelExit.Visible = false;
|
||||
this.RibbonPanelProfil.Visible = false;
|
||||
this.RibbonPanelCreate.Visible = false;
|
||||
@@ -621,9 +631,25 @@ namespace OnDoc.UICintrols
|
||||
var dataRow = (e.DataRow.RowData as DataRowView).Row;
|
||||
if (dataRow[0].ToString().Substring(0, 1).ToUpper() == "D")
|
||||
{
|
||||
//word
|
||||
if (dataRow[11].ToString() != "1")
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Word_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
if (Convert.ToBoolean(dataRow[16]) == true)
|
||||
{
|
||||
if (Convert.ToBoolean(dataRow[17]) == true)
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Word_approved_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Word_ToApprove_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Word_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -633,9 +659,21 @@ namespace OnDoc.UICintrols
|
||||
if (dataRow[0].ToString().Substring(0, 1).ToUpper() == "X")
|
||||
{
|
||||
if (dataRow[11].ToString() != "1")
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Excel_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
if (Convert.ToBoolean(dataRow[16]) == true)
|
||||
{
|
||||
if (Convert.ToBoolean(dataRow[17]) == true)
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Excel_approved_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Excel_ToApprove_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Excel_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Excel_Edit_24x24_32, e.Bounds.X + 20, e.Bounds.Y);
|
||||
@@ -806,7 +844,7 @@ namespace OnDoc.UICintrols
|
||||
|
||||
private void ribbonButtonApproval_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.lblToApprove.Text == "") { MessageBox.Show("Es sind keine Bewilligungen ausstehend.", "Bewilligung", MessageBoxButtons.OK, MessageBoxIcon.Information); return; }
|
||||
if (this.lblToApprove.Text == "") { MessageBox.Show("Es stehen keine Dokumente zur Unterschriftenprüfung an.", "Unterschriftenprüfung", MessageBoxButtons.OK, MessageBoxIcon.Information); return; }
|
||||
frmBewilligung bw = new frmBewilligung();
|
||||
bw.Show();
|
||||
}
|
||||
@@ -821,7 +859,7 @@ namespace OnDoc.UICintrols
|
||||
private void Refresh_Bewilligungen()
|
||||
{
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Get_Tabledata("Select count(*) from view_relaunch_offene_Bewilligungen where mitarbeiter_bewilligung=" + AppParams.CurrentMitarbieter.ToString(), false, true);
|
||||
db.Get_Tabledata("Select count(*) from view_relaunch_approval where bewilligt=0 and abgelehnt = 0 and mitarbeiter_bewilligung=" + AppParams.CurrentMitarbieter.ToString(), false, true);
|
||||
if (Convert.ToInt32(db.dsdaten.Tables[0].Rows[0][0]) == 0)
|
||||
{
|
||||
this.lblToApprove.Text = "";
|
||||
|
||||
@@ -16,6 +16,11 @@ using Syncfusion.Pdf.Graphics;
|
||||
using Windows.UI.WebUI;
|
||||
using OnDoc.Diverses;
|
||||
using System.Web.Security;
|
||||
using System.Drawing.Text;
|
||||
using BroadcastListener.Classes;
|
||||
using static BroadcastListener.Classes.Factory;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
|
||||
namespace OnDoc.UIControls
|
||||
{
|
||||
@@ -32,6 +37,11 @@ namespace OnDoc.UIControls
|
||||
|
||||
public string check_error { get; set; } = "";
|
||||
public clsdocgendata docgendata { get; set; }
|
||||
private bool bpperson_error { get; set; }=false;
|
||||
public int bpperson_error_type { get; set; } = 0;
|
||||
public bool personendokument { get; set; } = false;
|
||||
public string uniqid { get; set; } = Guid.NewGuid().ToString();
|
||||
public bool ausDokumentpaket { get; set; } = false;
|
||||
|
||||
|
||||
public UCAllgemeineDokumentParam()
|
||||
@@ -83,6 +93,7 @@ namespace OnDoc.UIControls
|
||||
|
||||
if (dokumenttypnr != 0)
|
||||
{
|
||||
set_personendokument();
|
||||
db.Get_Tabledata("Select * from dokumenttyp where dokumenttypnr=" + dokumenttypnr, false, true);
|
||||
System.Data.DataRow dr = db.dsdaten.Tables[0].Rows[0];
|
||||
this.txtbezeichnung.Text = dr["Bezeichnung"].ToString();
|
||||
@@ -110,6 +121,7 @@ namespace OnDoc.UIControls
|
||||
}
|
||||
catch { interop = false; }
|
||||
barcode = Convert.ToBoolean(dr["Vertrag"])== true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -158,11 +170,64 @@ namespace OnDoc.UIControls
|
||||
gridDokwertlist.Columns.Add(new GridImageColumn() { MappingName = "S", ImageLayout = ImageLayout.Center });
|
||||
gridDokwertlist.Columns["S"].Width = 25;
|
||||
gridDokwertlist.QueryImageCellStyle += gridDokwertlist_QueryImageCellStyle;
|
||||
gridDokwertlist.Columns["userinterface"].FilterPredicates.Add(new Syncfusion.Data.FilterPredicate() { FilterType=Syncfusion.Data.FilterType.Equals,FilterValue=true });
|
||||
|
||||
db = null;
|
||||
Refresh_Team();
|
||||
this.cbboxteam.SelectedIndex = 0;
|
||||
}
|
||||
public bool FilterRecords(object o)
|
||||
{
|
||||
string filterText = "FRANS";
|
||||
var item = o as DataRowView;
|
||||
if (item != null)
|
||||
{
|
||||
//if (item.CustomerID.Equals(filterText))
|
||||
// return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool set_personendokument()
|
||||
{
|
||||
DB db1 = new DB(AppParams.connectionstring);
|
||||
db1.Get_Tabledata("select * from Dokumenttyp_BP_Person_Erstellung where dokumenttypnr=" + this.dokumenttypnr.ToString(), false, true);
|
||||
if (db1.dsdaten.Tables[0].Rows.Count == 0) {
|
||||
personendokument = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (db1.dsdaten.Tables[0].Rows[0][1].ToString() == "2") personendokument=true;
|
||||
if (db1.dsdaten.Tables[0].Rows[0][1].ToString() == "1") personendokument = false;
|
||||
}
|
||||
return personendokument;
|
||||
}
|
||||
public bool check_bp_person()
|
||||
{
|
||||
DB db1 = new DB(AppParams.connectionstring);
|
||||
db1.Get_Tabledata("select * from Dokumenttyp_BP_Person_Erstellung where dokumenttypnr=" + this.dokumenttypnr.ToString(), false, true);
|
||||
bpperson_error_type = 0;
|
||||
if (db1.dsdaten.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
if (db1.dsdaten.Tables[0].Rows[0][1].ToString() == "2" && this.partnernr.ToString().Length < 9)
|
||||
{
|
||||
bpperson_error = true;
|
||||
bpperson_error_type = 1;
|
||||
if (!ausDokumentpaket) MessageBox.Show("Das gewöhlte Dokument muss für eine Person erstellt werden", "BP/Person", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return false;
|
||||
|
||||
}
|
||||
if (db1.dsdaten.Tables[0].Rows[0][1].ToString() == "1" && this.partnernr.ToString().Length > 8)
|
||||
{
|
||||
bpperson_error = true;
|
||||
bpperson_error_type = 2;
|
||||
if(!ausDokumentpaket) MessageBox.Show("Das gewöhlte Dokument muss für ein BP erstellt werden", "BP/Person", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
public void update_partner()
|
||||
{
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
@@ -192,7 +257,17 @@ namespace OnDoc.UIControls
|
||||
|
||||
|
||||
db = null;
|
||||
if (check_bp_person() == true)
|
||||
{
|
||||
if (!ausDokumentpaket) Broadcaster().Broadcast("BtnErstellung", new SenderInfo("UIGenDoc", "Enable", uniqid));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ausDokumentpaket) Broadcaster().Broadcast("BtnErstellung", new SenderInfo("UIGenDoc", "Disable", uniqid));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void gridDokwertlist_QueryImageCellStyle(object sender, Syncfusion.WinForms.DataGrid.Events.QueryImageCellStyleEventArgs e)
|
||||
{
|
||||
var rowdata = (DataRowView)e.Record;
|
||||
@@ -210,7 +285,7 @@ namespace OnDoc.UIControls
|
||||
|
||||
try
|
||||
{
|
||||
if (datenherkunft.ToString().Trim() != "")
|
||||
if (datenherkunft.ToString().Trim() != "" && datenherkunft.ToString().Trim()!="&Freitext&")
|
||||
{
|
||||
e.Image = (System.Drawing.Image.FromFile(System.Windows.Forms.Application.StartupPath + @"\images\Search.png"));
|
||||
|
||||
@@ -255,7 +330,9 @@ namespace OnDoc.UIControls
|
||||
var feldwert = dataRowView.Row["feldwert"].ToString().Trim();
|
||||
var bezeichnung = dataRowView.Row["bezeichnung"];
|
||||
if (zwingend==true && feldwert=="")
|
||||
{ check_error = check_error + "- " + bezeichnung + " Feldwert ist zwingend" + "//"; }
|
||||
{
|
||||
if (check_error != "") { check_error=check_error+Environment.NewLine; }
|
||||
check_error = check_error + "- " + bezeichnung + " Feldwert ist zwingend" ; }
|
||||
}
|
||||
}
|
||||
if (check_error == "") { return true; } else { return false; }
|
||||
@@ -282,7 +359,7 @@ namespace OnDoc.UIControls
|
||||
{
|
||||
docgendata.zustaendigmitarbeiter = cbboxzustaendigmitarbeiter.SelectedValue.ToString();
|
||||
}
|
||||
docgendata.status = "-1";
|
||||
docgendata.status = " - 1";
|
||||
docgendata.ersteller = AppParams.CurrentMitarbieter.ToString();
|
||||
docgendata.dokumentdatum = DateDokumentDatum.DateTimeText.ToString();
|
||||
docgendata.bezeichnung = txtbezeichnung.Text;
|
||||
@@ -351,6 +428,7 @@ namespace OnDoc.UIControls
|
||||
|
||||
private string data_select(string datenherkunft, string feldtyp)
|
||||
{
|
||||
if (datenherkunft=="" || datenherkunft=="&Freitext&") { return ""; }
|
||||
switch (feldtyp.ToUpper())
|
||||
{
|
||||
case "DATUMSHORT":
|
||||
@@ -381,7 +459,7 @@ namespace OnDoc.UIControls
|
||||
break;
|
||||
case "TEXT":
|
||||
if (datenherkunft.Substring(0, 1) != "&") { return ""; }
|
||||
if (datenherkunft.Substring(0, 8).ToUpper() == "&PARTNER")
|
||||
if (datenherkunft.Length >= 8 && datenherkunft.Substring(0, 8).ToUpper() == "&PARTNER")
|
||||
{
|
||||
Partnersuche p = new Partnersuche();
|
||||
p.ShowDialog();
|
||||
@@ -455,6 +533,9 @@ namespace OnDoc.UIControls
|
||||
|
||||
private void gridDokwertlist_CellClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
if (e.DataColumn.Index == 15)
|
||||
{
|
||||
var selectedItem = e.DataRow;
|
||||
@@ -466,6 +547,9 @@ namespace OnDoc.UIControls
|
||||
dataRow["feldwert"] = data_select(datenherkunft, feldtyp);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user