From b679d8da4ec10d8cb19d6f1db315454283b99daf Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 24 Jun 2024 19:40:21 +0200 Subject: [PATCH] Aggiunto cloning gruppi dipendenti --- GPW_Admin/Content/Site.css | 3 + GPW_Admin/Content/Site.less | 15 ++-- GPW_Admin/Content/Site.min.css | 2 +- GPW_Admin/GPW_Admin.csproj | 8 ++ GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx | 20 ++++- .../WebUserControls/cmp_dip2gruppi.ascx.cs | 75 +++++++++++++--- .../cmp_dip2gruppi.ascx.designer.cs | 9 ++ .../WebUserControls/cmp_groupAssignClone.ascx | 21 +++++ .../cmp_groupAssignClone.ascx.cs | 59 ++++++++++++ .../cmp_groupAssignClone.ascx.designer.cs | 89 +++++++++++++++++++ GPW_Admin/compilerconfig.json | 8 +- GPW_Admin/gruppi.aspx | 13 ++- GPW_Admin/gruppi.aspx.cs | 20 ++++- GPW_Admin/gruppi.aspx.designer.cs | 9 ++ GPW_Data/DS_Applicazione.Designer.cs | 57 ++++++++++-- GPW_Data/DS_Applicazione.xsd | 76 +++++++++------- GPW_Data/DS_Applicazione.xss | 4 +- 17 files changed, 412 insertions(+), 76 deletions(-) create mode 100644 GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx create mode 100644 GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx.cs create mode 100644 GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx.designer.cs diff --git a/GPW_Admin/Content/Site.css b/GPW_Admin/Content/Site.css index 1b3df2a..96ea00e 100644 --- a/GPW_Admin/Content/Site.css +++ b/GPW_Admin/Content/Site.css @@ -20,6 +20,9 @@ body { .textBig { font-size: 1.5em; } +.text-strike { + text-decoration: line-through; +} .table-sm th, .table-sm td { padding: 0.2rem; diff --git a/GPW_Admin/Content/Site.less b/GPW_Admin/Content/Site.less index 46c7b78..d3364e3 100644 --- a/GPW_Admin/Content/Site.less +++ b/GPW_Admin/Content/Site.less @@ -25,6 +25,10 @@ body { font-size: 1.5em; } +.text-strike { + text-decoration: line-through; +} + .table-sm th, .table-sm td { padding: .2rem; } @@ -38,6 +42,7 @@ body { background-color: #AAFFCD; color: #000000; } + .gPerConf { background-color: #9966DE; color: #DEDEDE; @@ -47,6 +52,7 @@ body { background-color: #CDAAFF; color: #000000; } + .g104Conf { background-color: #DE00AB; color: #DEDEDE; @@ -56,7 +62,6 @@ body { background-color: #FFAACD; color: #000000; } - /*------------------------------------------------------------------ [ Shortcuts / .shortcuts ] */ @@ -188,7 +193,6 @@ textarea { .body-content { padding: 0; } - /* Set widths on the form inputs since otherwise they're 100% wide */ input, select, @@ -229,9 +233,6 @@ textarea { border-bottom: 1px solid #3AC0F2;*/ font-weight: bold; } - - - /* calendar white */ .calendar_white_main { @@ -350,7 +351,7 @@ textarea { .calendar_white_event_inner { color: @calGray1; background: @calGray2; -/* background: -moz-linear-gradient( top, #ffffff 0%, #eee); + /* background: -moz-linear-gradient( top, #ffffff 0%, #eee); background: -webkit-gradient( linear, left top, left bottom, from(#ffffff), to(#eee)); filter: progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffffff", endColorStr="#eeeeee");*/ border: 1px solid #999; @@ -406,4 +407,4 @@ textarea { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; -} \ No newline at end of file +} diff --git a/GPW_Admin/Content/Site.min.css b/GPW_Admin/Content/Site.min.css index b303e4c..4539474 100644 --- a/GPW_Admin/Content/Site.min.css +++ b/GPW_Admin/Content/Site.min.css @@ -1 +1 @@ -body{font:'Roboto',sans-serif;}.body-content{font:'Roboto',sans-serif;}.textCondens{font-family:'Roboto Condensed',sans-serif;}.textNormal{font-family:'Roboto',sans-serif;}.textBig{font-size:1.5em;}.table-sm th,.table-sm td{padding:.2rem;}.gFerConf{background-color:#11cd44;color:#fff;}.gFerNC{background-color:#aaffcd;color:#000;}.gPerConf{background-color:#9966de;color:#dedede;}.gPerNC{background-color:#cdaaff;color:#000;}.g104Conf{background-color:#de00ab;color:#dedede;}.g104NC{background-color:#ffaacd;color:#000;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:9.9rem;min-height:5.5rem;display:inline-block;padding:.77rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:.55rem;}.shortcuts .shortcut-sm{min-width:4.95rem;min-height:3.3rem;display:inline-block;padding:.275rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1.1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2.2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2.2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:992px){.shortcuts .shortcut{min-width:8.8rem;min-height:4.4rem;}}@media screen and (min-width:768px){.jumbotron{margin-top:20px;}.body-content{padding:0;}input,select,textarea{max-width:100%;}}.elTimbSmart{padding:.2em;font-size:1.1em;line-height:1.3em;}.ui-input-btn input{opacity:.5;}.GridPager a,.GridPager span{display:block;height:1.5em;min-width:1.1em;text-align:center;text-decoration:none;}.GridPager a{background-color:#f5f5f5;color:#969696;}.GridPager span{background-color:#a1dcf2;color:#000;font-weight:bold;}.calendar_white_main{border:1px solid #999;}.calendar_white_scroll_up{background:url(calendar_white/up.png);}.calendar_white_scroll_down{background:url(calendar_white/down.png);}.calendar_white_rowheader_inner,.calendar_white_cornerright_inner,.calendar_white_corner_inner,.calendar_white_colheader_inner,.calendar_white_alldayheader_inner{color:#666;background:#eee;background:-moz-linear-gradient(top,#eee 0%,#ddd);background:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#ddd));filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr="#eeeeee",endColorStr="#dddddd");}.calendar_white_cornerright_inner{position:absolute;top:0;left:0;bottom:0;right:0;border-bottom:1px solid #999;}.calendar_white_rowheader_inner{font-size:16pt;text-align:right;position:absolute;top:0;left:0;bottom:0;right:0;border-right:1px solid #999;border-bottom:1px solid #999;}.calendar_white_corner_inner{position:absolute;top:0;left:0;bottom:0;right:0;border-right:1px solid #999;border-bottom:1px solid #999;}.calendar_white_rowheader_minutes{font-size:10px;vertical-align:super;padding-left:2px;padding-right:2px;}.calendar_white_colheader_inner{text-align:center;position:absolute;top:0;left:0;bottom:0;right:0;border-right:1px solid #999;border-bottom:1px solid #999;}.calendar_white_cell_inner{position:absolute;top:0;left:0;bottom:0;right:0;border-right:1px solid #ddd;border-bottom:1px solid #ddd;background-color:#fff;}.calendar_white_alldayheader_inner{text-align:center;position:absolute;top:0;left:0;bottom:0;right:0;border-right:1px solid #999;border-bottom:1px solid #999;}.calendar_white_message{opacity:.7;filter:alpha(opacity=70);padding:10px;color:#fff;background:#ffa216;background:-moz-linear-gradient(top,#ffa216 0%,#ff8400);background:-webkit-gradient(linear,left top,left bottom,from(#ffa216),to(#ff8400));filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffa216",endColorStr="#ff8400");}.calendar_white_alldayevent_inner,.calendar_white_event_inner{color:rgba(102,102,102,.5);background:rgba(238,238,238,.5);border:1px solid #999;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:0 2px 3px rgba(0,0,0,.3),inset 0 0 2px rgba(255,255,255,.8);-webkit-box-shadow:0 2px 3px rgba(0,0,0,.3),inset 0 0 2px rgba(255,255,255,.8);box-shadow:0 2px 3px rgba(0,0,0,.3),inset 0 0 2px rgba(255,255,255,.8);}.calendar_white_selected .calendar_white_event_inner{background:#ddd;}.calendar_white_alldayevent_inner{position:absolute;top:2px;bottom:2px;left:2px;right:1px;padding:2px;margin-right:1px;font-size:12px;}.calendar_white_event_withheader .calendar_white_event_inner{padding-top:15px;}.calendar_white_event{cursor:default;}.calendar_white_event_inner{position:absolute;overflow:hidden;top:0;bottom:2px;left:2px;right:0;padding:2px;font-size:10px;font-weight:bold;color:#000;}.calendar_white_shadow_inner{background-color:#666;opacity:.5;filter:alpha(opacity=70);height:100%;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;} \ No newline at end of file +body{font:'Roboto',sans-serif;}.body-content{font:'Roboto',sans-serif;}.textCondens{font-family:'Roboto Condensed',sans-serif;}.textNormal{font-family:'Roboto',sans-serif;}.textBig{font-size:1.5em;}.text-strike{text-decoration:line-through;}.table-sm th,.table-sm td{padding:.2rem;}.gFerConf{background-color:#11cd44;color:#fff;}.gFerNC{background-color:#aaffcd;color:#000;}.gPerConf{background-color:#9966de;color:#dedede;}.gPerNC{background-color:#cdaaff;color:#000;}.g104Conf{background-color:#de00ab;color:#dedede;}.g104NC{background-color:#ffaacd;color:#000;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:9.9rem;min-height:5.5rem;display:inline-block;padding:.77rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:.55rem;}.shortcuts .shortcut-sm{min-width:4.95rem;min-height:3.3rem;display:inline-block;padding:.275rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1.1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2.2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2.2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:992px){.shortcuts .shortcut{min-width:8.8rem;min-height:4.4rem;}}@media screen and (min-width:768px){.jumbotron{margin-top:20px;}.body-content{padding:0;}input,select,textarea{max-width:100%;}}.elTimbSmart{padding:.2em;font-size:1.1em;line-height:1.3em;}.ui-input-btn input{opacity:.5;}.GridPager a,.GridPager span{display:block;height:1.5em;min-width:1.1em;text-align:center;text-decoration:none;}.GridPager a{background-color:#f5f5f5;color:#969696;}.GridPager span{background-color:#a1dcf2;color:#000;font-weight:bold;}.calendar_white_main{border:1px solid #999;}.calendar_white_scroll_up{background:url(calendar_white/up.png);}.calendar_white_scroll_down{background:url(calendar_white/down.png);}.calendar_white_rowheader_inner,.calendar_white_cornerright_inner,.calendar_white_corner_inner,.calendar_white_colheader_inner,.calendar_white_alldayheader_inner{color:#666;background:#eee;background:-moz-linear-gradient(top,#eee 0%,#ddd);background:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#ddd));filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr="#eeeeee",endColorStr="#dddddd");}.calendar_white_cornerright_inner{position:absolute;top:0;left:0;bottom:0;right:0;border-bottom:1px solid #999;}.calendar_white_rowheader_inner{font-size:16pt;text-align:right;position:absolute;top:0;left:0;bottom:0;right:0;border-right:1px solid #999;border-bottom:1px solid #999;}.calendar_white_corner_inner{position:absolute;top:0;left:0;bottom:0;right:0;border-right:1px solid #999;border-bottom:1px solid #999;}.calendar_white_rowheader_minutes{font-size:10px;vertical-align:super;padding-left:2px;padding-right:2px;}.calendar_white_colheader_inner{text-align:center;position:absolute;top:0;left:0;bottom:0;right:0;border-right:1px solid #999;border-bottom:1px solid #999;}.calendar_white_cell_inner{position:absolute;top:0;left:0;bottom:0;right:0;border-right:1px solid #ddd;border-bottom:1px solid #ddd;background-color:#fff;}.calendar_white_alldayheader_inner{text-align:center;position:absolute;top:0;left:0;bottom:0;right:0;border-right:1px solid #999;border-bottom:1px solid #999;}.calendar_white_message{opacity:.7;filter:alpha(opacity=70);padding:10px;color:#fff;background:#ffa216;background:-moz-linear-gradient(top,#ffa216 0%,#ff8400);background:-webkit-gradient(linear,left top,left bottom,from(#ffa216),to(#ff8400));filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr="#ffa216",endColorStr="#ff8400");}.calendar_white_alldayevent_inner,.calendar_white_event_inner{color:rgba(102,102,102,.5);background:rgba(238,238,238,.5);border:1px solid #999;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:0 2px 3px rgba(0,0,0,.3),inset 0 0 2px rgba(255,255,255,.8);-webkit-box-shadow:0 2px 3px rgba(0,0,0,.3),inset 0 0 2px rgba(255,255,255,.8);box-shadow:0 2px 3px rgba(0,0,0,.3),inset 0 0 2px rgba(255,255,255,.8);}.calendar_white_selected .calendar_white_event_inner{background:#ddd;}.calendar_white_alldayevent_inner{position:absolute;top:2px;bottom:2px;left:2px;right:1px;padding:2px;margin-right:1px;font-size:12px;}.calendar_white_event_withheader .calendar_white_event_inner{padding-top:15px;}.calendar_white_event{cursor:default;}.calendar_white_event_inner{position:absolute;overflow:hidden;top:0;bottom:2px;left:2px;right:0;padding:2px;font-size:10px;font-weight:bold;color:#000;}.calendar_white_shadow_inner{background-color:#666;opacity:.5;filter:alpha(opacity=70);height:100%;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;} \ No newline at end of file diff --git a/GPW_Admin/GPW_Admin.csproj b/GPW_Admin/GPW_Admin.csproj index 1008494..d6df7ae 100644 --- a/GPW_Admin/GPW_Admin.csproj +++ b/GPW_Admin/GPW_Admin.csproj @@ -705,6 +705,7 @@ + @@ -1137,6 +1138,13 @@ cmp_gestTagFasi.ascx + + cmp_groupAssignClone.ascx + ASPXCodeBehind + + + cmp_groupAssignClone.ascx + cmp_homeButtons.ascx ASPXCodeBehind diff --git a/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx b/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx index e038d34..9cdbef9 100644 --- a/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx +++ b/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx @@ -2,6 +2,7 @@ <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+ Aggiungi @@ -17,18 +18,29 @@ No record - + + + Dipendente + + + + + + + + + - + - - + + diff --git a/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx.cs b/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx.cs index 9fa9cc4..4dfcf26 100644 --- a/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx.cs +++ b/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx.cs @@ -1,24 +1,14 @@ using GPW_data; +using GPW_data.DS_UtilityTableAdapters; using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; namespace GPW_Admin.WebUserControls { public partial class cmp_dip2gruppi : BaseUserControl { - #region Protected Properties - - protected int idxDipSel - { - get - { - int answ = 0; - int.TryParse(ddlDip.SelectedValue, out answ); - return answ; - } - } - - #endregion Protected Properties - #region Public Properties public string gruppoSel @@ -33,8 +23,55 @@ namespace GPW_Admin.WebUserControls #endregion Public Properties + #region Public Methods + + public string cssByDip(object idxDip) + { + int IdxDip = 0; + int.TryParse($"{idxDip}", out IdxDip); + bool attivo = false; + if (listActive == null || listActive.Count == 0) + { + reloadDip(); + } + if (IdxDip > 0) + { + attivo = listActive.Where(x => x.value == IdxDip).Count() > 0; + } + // colore da stato attivo + string answ = attivo ? "text-dark" : "text-secondary text-strike"; + return answ; + } + + #endregion Public Methods + + #region Protected Fields + + protected List listActive = new List(); + + #endregion Protected Fields + + #region Protected Properties + + protected int idxDipSel + { + get + { + int answ = 0; + int.TryParse(ddlDip.SelectedValue, out answ); + return answ; + } + } + + #endregion Protected Properties + #region Protected Methods + /// + /// aggiunge dipendente al gruppo selezionato + /// + /// + /// protected void lbtAdd_Click(object sender, EventArgs e) { // eseguo inserimento valore in schema @@ -46,6 +83,16 @@ namespace GPW_Admin.WebUserControls protected void Page_Load(object sender, EventArgs e) { + if (!Page.IsPostBack) + { + reloadDip(); + } + } + + protected void reloadDip() + { + var rawTab = DataProxy.DP.taVSD.getByConditio(true).OfType().ToList(); + listActive = rawTab.Where(x => x.conditio == 1).ToList(); } #endregion Protected Methods diff --git a/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx.designer.cs b/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx.designer.cs index 78df69d..b505f05 100644 --- a/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/cmp_dip2gruppi.ascx.designer.cs @@ -23,6 +23,15 @@ namespace GPW_Admin.WebUserControls /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAddNew; + /// + /// lblAdd control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblAdd; + /// /// ddlDip control. /// diff --git a/GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx b/GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx new file mode 100644 index 0000000..1af131c --- /dev/null +++ b/GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx @@ -0,0 +1,21 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_groupAssignClone.ascx.cs" Inherits="GPW_Admin.WebUserControls.cmp_groupAssignClone" %> +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + +
+ Clona + + + + + + + + + + + + + + + +
diff --git a/GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx.cs b/GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx.cs new file mode 100644 index 0000000..a9a22a1 --- /dev/null +++ b/GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx.cs @@ -0,0 +1,59 @@ +using GPW_data; +using System; + +namespace GPW_Admin.WebUserControls +{ + public partial class cmp_groupAssignClone : BaseUserControl + { + #region Protected Properties + + protected int idxDipFrom + { + get + { + int answ = 0; + int.TryParse(ddlFrom.SelectedValue, out answ); + return answ; + } + } + + protected int idxDipTo + { + get + { + int answ = 0; + int.TryParse(ddlTo.SelectedValue, out answ); + return answ; + } + } + + #endregion Protected Properties + + #region Protected Methods + + /// + /// Clona assegnazioni dip FROM a dipendente TO + /// + /// + /// + protected void lbtClona_Click(object sender, EventArgs e) + { + // eseguo cloning assegnazioni dip a nuovo (deve essere attivo) + if (idxDipFrom > 0 && idxDipTo > 0) + { + DataProxy.DP.taDip2Gruppi.cloneDip(idxDipFrom, idxDipTo); + } + raiseAddNew(); + } + + protected void Page_Load(object sender, EventArgs e) + { + if(!Page.IsPostBack) + { + cbeClone.DataBind(); + } + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx.designer.cs b/GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx.designer.cs new file mode 100644 index 0000000..efe92d1 --- /dev/null +++ b/GPW_Admin/WebUserControls/cmp_groupAssignClone.ascx.designer.cs @@ -0,0 +1,89 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GPW_Admin.WebUserControls +{ + + + public partial class cmp_groupAssignClone + { + + /// + /// divClone control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divClone; + + /// + /// lblClona control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblClona; + + /// + /// ddlFrom control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlFrom; + + /// + /// odsFrom control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsFrom; + + /// + /// lbtClona control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtClona; + + /// + /// cbeClone control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::AjaxControlToolkit.ConfirmButtonExtender cbeClone; + + /// + /// ddlTo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlTo; + + /// + /// odsTo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsTo; + } +} diff --git a/GPW_Admin/compilerconfig.json b/GPW_Admin/compilerconfig.json index a501e28..5a6726c 100644 --- a/GPW_Admin/compilerconfig.json +++ b/GPW_Admin/compilerconfig.json @@ -7,12 +7,12 @@ "outputFile": "Content/StyleCustom.css", "inputFile": "Content/StyleCustom.less" }, - { - "outputFile": "Content/Site.css", - "inputFile": "Content/Site.less" - }, { "outputFile": "Content/font.css", "inputFile": "Content/font.less" + }, + { + "outputFile": "Content/Site.css", + "inputFile": "Content/Site.less" } ] \ No newline at end of file diff --git a/GPW_Admin/gruppi.aspx b/GPW_Admin/gruppi.aspx index 0eedaae..1a45377 100644 --- a/GPW_Admin/gruppi.aspx +++ b/GPW_Admin/gruppi.aspx @@ -3,12 +3,19 @@ <%@ Register Src="~/WebUserControls/cmp_elencoGruppi.ascx" TagPrefix="uc1" TagName="cmp_elencoGruppi" %> <%@ Register Src="~/WebUserControls/mod_pageSize.ascx" TagPrefix="uc1" TagName="mod_pageSize" %> <%@ Register Src="~/WebUserControls/cmp_dip2gruppi.ascx" TagPrefix="uc1" TagName="cmp_dip2gruppi" %> +<%@ Register Src="~/WebUserControls/cmp_groupAssignClone.ascx" TagPrefix="uc1" TagName="cmp_groupAssignClone" %> +
-
- <%: traduci(titolo) %> +
+
+ <%: traduci(titolo) %> +
+
+ +
@@ -16,7 +23,7 @@
- +
diff --git a/GPW_Admin/gruppi.aspx.cs b/GPW_Admin/gruppi.aspx.cs index 6daaa33..fdefdae 100644 --- a/GPW_Admin/gruppi.aspx.cs +++ b/GPW_Admin/gruppi.aspx.cs @@ -3,8 +3,19 @@ using System; namespace GPW_Admin { - public partial class gruppi : BasePage + public partial class gruppi : BasePage, IDisposable { + + public override void Dispose() + { + mod_pageSize.eh_nuovaSize -= Mod_pageSize_eh_nuovaSize; + cmp_elencoGruppi.eh_doRefresh -= Cmp_elencoGruppi_eh_doRefresh; + cmp_elencoGruppi.eh_doReset -= Cmp_elencoGruppi_eh_doReset; + cmp_dip2gruppi.eh_addNew -= Cmp_dip2gruppi_eh_addNew; + cmp_groupAssignClone.eh_addNew -= Cmp_groupAssignClone_eh_addNew; + base.Dispose(); + } + #region Private Methods private void checkVisib() @@ -57,6 +68,13 @@ namespace GPW_Admin cmp_elencoGruppi.eh_doRefresh += Cmp_elencoGruppi_eh_doRefresh; cmp_elencoGruppi.eh_doReset += Cmp_elencoGruppi_eh_doReset; cmp_dip2gruppi.eh_addNew += Cmp_dip2gruppi_eh_addNew; + cmp_groupAssignClone.eh_addNew += Cmp_groupAssignClone_eh_addNew; + } + + private void Cmp_groupAssignClone_eh_addNew(object sender, EventArgs e) + { + cmp_elencoGruppi.doUpdate(); + checkVisib(); } #endregion Protected Methods diff --git a/GPW_Admin/gruppi.aspx.designer.cs b/GPW_Admin/gruppi.aspx.designer.cs index f61a3f3..c4d38c3 100644 --- a/GPW_Admin/gruppi.aspx.designer.cs +++ b/GPW_Admin/gruppi.aspx.designer.cs @@ -14,6 +14,15 @@ namespace GPW_Admin public partial class gruppi { + /// + /// cmp_groupAssignClone control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::GPW_Admin.WebUserControls.cmp_groupAssignClone cmp_groupAssignClone; + /// /// cmp_elencoGruppi control. /// diff --git a/GPW_Data/DS_Applicazione.Designer.cs b/GPW_Data/DS_Applicazione.Designer.cs index 03af03a..336db21 100644 --- a/GPW_Data/DS_Applicazione.Designer.cs +++ b/GPW_Data/DS_Applicazione.Designer.cs @@ -37726,25 +37726,32 @@ SELECT idxDipendente, gruppo FROM Dipendenti2Gruppi WHERE (gruppo = @gruppo) AND [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM Dipendenti2Gruppi\r\n"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_Dip2Gruppi_delete"; + this._commandCollection[1].CommandText = "dbo.stp_Dip2Gruppi_clone"; this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_value", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxDipFrom", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxDipTo", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_Dip2Gruppi_insert"; + this._commandCollection[2].CommandText = "dbo.stp_Dip2Gruppi_delete"; this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxDip", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_value", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_Dip2Gruppi_insert"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxDip", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -37803,8 +37810,42 @@ SELECT idxDipendente, gruppo FROM Dipendenti2Gruppi WHERE (gruppo = @gruppo) AND [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int delete(string gruppo, global::System.Nullable Original_value) { + public virtual int cloneDip(global::System.Nullable idxDipFrom, global::System.Nullable idxDipTo) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((idxDipFrom.HasValue == true)) { + command.Parameters[1].Value = ((int)(idxDipFrom.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((idxDipTo.HasValue == true)) { + command.Parameters[2].Value = ((int)(idxDipTo.Value)); + } + else { + command.Parameters[2].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int delete(string gruppo, global::System.Nullable Original_value) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; if ((gruppo == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -37838,7 +37879,7 @@ SELECT idxDipendente, gruppo FROM Dipendenti2Gruppi WHERE (gruppo = @gruppo) AND [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int insertQuery(string gruppo, global::System.Nullable idxDip) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; if ((gruppo == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } diff --git a/GPW_Data/DS_Applicazione.xsd b/GPW_Data/DS_Applicazione.xsd index a2e7c3e..88802b9 100644 --- a/GPW_Data/DS_Applicazione.xsd +++ b/GPW_Data/DS_Applicazione.xsd @@ -3233,6 +3233,18 @@ SELECT idxDipendente, gruppo FROM Dipendenti2Gruppi WHERE (gruppo = @gruppo) AND + + + + dbo.stp_Dip2Gruppi_clone + + + + + + + + @@ -3796,135 +3808,135 @@ FROM v_AnagTagFasi - + - + - + - + - - + + - + - + - + - + - - - - - + + + + + - + - - + + - + - + - + - + - - - - + + + + - + @@ -4880,11 +4892,11 @@ FROM v_AnagTagFasi - - - - - + + + + + \ No newline at end of file diff --git a/GPW_Data/DS_Applicazione.xss b/GPW_Data/DS_Applicazione.xss index 746cb1a..98237bd 100644 --- a/GPW_Data/DS_Applicazione.xss +++ b/GPW_Data/DS_Applicazione.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -29,7 +29,7 @@ - +