Merge branch 'develop'
This commit is contained in:
@@ -13,18 +13,47 @@ namespace GPW_Admin.WebUserControls
|
||||
{
|
||||
public partial class mod_commAttivitaDesk : System.Web.UI.UserControl
|
||||
{
|
||||
#region Public Events
|
||||
|
||||
#region area protected / private
|
||||
/// <summary>
|
||||
/// evento update valori
|
||||
/// </summary>
|
||||
public event EventHandler eh_nuovoValore;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
#endregion Public Events
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// fase selezionata
|
||||
/// </summary>
|
||||
protected int idxFaseSel
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
get
|
||||
{
|
||||
refreshControlli();
|
||||
pnlHeader.Visible = enableFull;
|
||||
lblTitle.Text = string.Format("{0:dddd dd/MM/yyyy}", valoreDateTime);
|
||||
return memLayer.ML.IntSessionObj("idxFaseSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxFaseSel", value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// progetto selezionato
|
||||
/// </summary>
|
||||
protected int idxProjSel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxProjSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxProjSel", value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// minuti selezionati nel controllo radio in testa
|
||||
/// </summary>
|
||||
@@ -39,6 +68,108 @@ namespace GPW_Admin.WebUserControls
|
||||
memLayer.ML.setSessionVal("stdMinDurata", value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// abilitato editing + nuovo + delete + clona
|
||||
/// </summary>
|
||||
public bool enableFull
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.BoolSessionObj("enableEditComm");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("enableEditComm", value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// idxDipendente selezionato (0=tutti)
|
||||
/// </summary>
|
||||
public int idxDipCurr
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxDipCurr");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxDipCurr", value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// progetto selezionato..
|
||||
/// </summary>
|
||||
public string idxProgetto
|
||||
{
|
||||
get
|
||||
{
|
||||
return idxProjSel.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// stato attuale del controllo
|
||||
/// </summary>
|
||||
public statoControllo stato
|
||||
{
|
||||
get
|
||||
{
|
||||
statoControllo answ = statoControllo.item;
|
||||
try
|
||||
{
|
||||
answ = (statoControllo)memLayer.ML.objSessionObj("statoControlloRA");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("statoControlloRA", value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// valore datetime selezionato!
|
||||
/// </summary>
|
||||
public DateTime valoreDateTime
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Now;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif"));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("dataRif", value);
|
||||
lblTitle.Text = string.Format("{0:dddd dd/MM/yyyy}", value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// refresh dei controlli
|
||||
/// </summary>
|
||||
@@ -56,6 +187,7 @@ namespace GPW_Admin.WebUserControls
|
||||
//idxFaseSel = DataProxy.DP.taRA.getByKey(idxRASel)[0].idxFase;
|
||||
//idxProjSel = idxPrjByFase(idxFaseSel);
|
||||
break;
|
||||
|
||||
case statoControllo.insert:
|
||||
grView.ShowFooter = true;
|
||||
grView.DataBind();
|
||||
@@ -86,6 +218,7 @@ namespace GPW_Admin.WebUserControls
|
||||
{ }
|
||||
doDataBound = false;
|
||||
break;
|
||||
|
||||
case statoControllo.item:
|
||||
grView.ShowFooter = false;
|
||||
// cerco di impostare inizio/fine
|
||||
@@ -111,6 +244,7 @@ namespace GPW_Admin.WebUserControls
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -119,28 +253,7 @@ namespace GPW_Admin.WebUserControls
|
||||
grView.DataBind();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è clonare...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgClona_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
if (sender != null)
|
||||
{
|
||||
ImageButton lbtn = (ImageButton)sender;
|
||||
int idxRa = 0;
|
||||
try
|
||||
{
|
||||
idxRa = Convert.ToInt32(lbtn.CommandArgument);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// chiamo clona!
|
||||
DataProxy.DP.taRA.clonaRecord(idxRa);
|
||||
updateControl();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// fa update del controllo e chiama evento update esterno
|
||||
/// </summary>
|
||||
@@ -154,120 +267,84 @@ namespace GPW_Admin.WebUserControls
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// completato insert! aggiorno!
|
||||
/// richiesta creazioen nuovo record
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void odsRA_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
stato = statoControllo.item;
|
||||
refreshControlli();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettuato update
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
|
||||
{
|
||||
updateControl();
|
||||
}
|
||||
/// <summary>
|
||||
/// riga eliminata
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
|
||||
{
|
||||
updateControl();
|
||||
}
|
||||
/// <summary>
|
||||
/// recupera i dati di un nuovo record contenuti nel footer di un gridView;
|
||||
/// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void doInsert()
|
||||
{
|
||||
//recupero la riga footer...
|
||||
int idxDip = DataProxy.idxDipendente;
|
||||
int idxFase = 0;
|
||||
DateTime inizio = DateTime.Now;
|
||||
DateTime fine = DateTime.Now;
|
||||
string descr = "";
|
||||
try
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
idxFase = Convert.ToInt32(((DropDownList)grView.FooterRow.FindControl("ddlFase")).SelectedValue);
|
||||
inizio = ((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime;
|
||||
fine = ((mod_dateTime)grView.FooterRow.FindControl("dtFine")).valoreDateTime;
|
||||
descr = ((TextBox)grView.FooterRow.FindControl("txtDescrizione")).Text;
|
||||
// controllo: se ho righe mostro il footer...
|
||||
stato = statoControllo.insert;
|
||||
refreshControlli();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
DataProxy.DP.taRA.Insert(idxDip, idxFase, inizio, fine, descr, 0);
|
||||
}
|
||||
/// <summary>
|
||||
/// riga in edit
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
|
||||
{
|
||||
if (e != null)
|
||||
else
|
||||
{
|
||||
grView.SelectedIndex = e.NewEditIndex;
|
||||
int idxRASel = Convert.ToInt32(grView.SelectedDataKey["idxRA"]);
|
||||
// salvo in sessione valori selezionati
|
||||
idxFaseSel = DataProxy.DP.taRA.getByKey(idxRASel)[0].idxFase;
|
||||
idxProjSel = idxPrjByFase(idxFaseSel);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// riga popolata
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e != null)
|
||||
{
|
||||
// controllo la riga
|
||||
GridViewRow riga = e.Row;
|
||||
if (grView.EditIndex >= 0 || grView.ShowFooter)
|
||||
// default: inizia ora la dichiarazione
|
||||
double oraStart = DateTime.Now.Hour;
|
||||
int durataMinuti = memLayer.ML.IntSessionObj("stdMinDurata");
|
||||
// se c'è timbratura ingresso prendo quella come ora inizio...
|
||||
try
|
||||
{
|
||||
// recupero tab timbrature delal giornata...
|
||||
DS_Applicazione.TimbratureDataTable tabTimbrature = DataProxy.DP.taTimb.getByIdxDipPeriodo(DataProxy.idxDipendente, valoreDateTime, valoreDateTime.AddDays(1));
|
||||
// sono ordinate DEC x cui prendo l'ultima...
|
||||
int numRow = tabTimbrature.Rows.Count;
|
||||
if (numRow > 0)
|
||||
{
|
||||
DS_Applicazione.TimbratureRow riga = tabTimbrature[numRow - 1];
|
||||
oraStart = Convert.ToDouble(riga.dataOra.Hour + (double)riga.dataOra.Minute / 60);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// altrimenti duplico ultima entry utente..
|
||||
DataProxy.DP.taRA.clonaLastRA_Utente(DataProxy.idxDipendente, valoreDateTime.AddHours(oraStart), durataMinuti);
|
||||
updateControl();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sistemo eventuali "headers"
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlFase_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (sender != null)
|
||||
{
|
||||
// cerco eventuali controlli tipo "ancestor" e li disattivo!
|
||||
DropDownList ddlFase_int = (DropDownList)sender;
|
||||
ListItem li = new ListItem();
|
||||
while (li != null)
|
||||
{
|
||||
li = ddlFase_int.Items.FindByValue("0");
|
||||
try
|
||||
{
|
||||
//pre-seleziono idx progetto x ods fase...
|
||||
DropDownList ddlProj_int = (DropDownList)riga.FindControl("ddlProgetto");
|
||||
if (idxProjSel >= 0 && (ddlProj_int != null))
|
||||
{
|
||||
ddlProj_int.SelectedValue = idxProjSel.ToString();
|
||||
}
|
||||
DropDownList ddlFase_int = (DropDownList)riga.FindControl("ddlFase");
|
||||
if (idxFaseSel >= 0 && (ddlFase_int != null))
|
||||
{
|
||||
ddlFase_int.SelectedValue = idxFaseSel.ToString();
|
||||
}
|
||||
li.Attributes.Add("style", "color:gray;");
|
||||
li.Attributes.Add("disabled", "true");
|
||||
li.Value = "-1";
|
||||
li.Text = string.Format("[ {0} ]", li.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
try
|
||||
{
|
||||
ddlFase_int.SelectedIndex = 1;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// intercetto update!
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void odsRA_Updating(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
if (e != null)
|
||||
{
|
||||
DropDownList ddlfase_int = (DropDownList)grView.Rows[grView.EditIndex].FindControl("ddlFase");
|
||||
e.InputParameters["idxFase"] = ddlfase_int.SelectedValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorno ods fasi...
|
||||
/// </summary>
|
||||
@@ -332,34 +409,33 @@ namespace GPW_Admin.WebUserControls
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// progetto selezionato
|
||||
/// recupera i dati di un nuovo record contenuti nel footer di un gridView;
|
||||
/// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
|
||||
/// </summary>
|
||||
protected int idxProjSel
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void doInsert()
|
||||
{
|
||||
get
|
||||
//recupero la riga footer...
|
||||
int idxDip = DataProxy.idxDipendente;
|
||||
int idxFase = 0;
|
||||
DateTime inizio = DateTime.Now;
|
||||
DateTime fine = DateTime.Now;
|
||||
string descr = "";
|
||||
try
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxProjSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxProjSel", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// fase selezionata
|
||||
/// </summary>
|
||||
protected int idxFaseSel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxFaseSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxFaseSel", value);
|
||||
idxFase = Convert.ToInt32(((DropDownList)grView.FooterRow.FindControl("ddlFase")).SelectedValue);
|
||||
inizio = ((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime;
|
||||
fine = ((mod_dateTime)grView.FooterRow.FindControl("dtFine")).valoreDateTime;
|
||||
descr = ((TextBox)grView.FooterRow.FindControl("txtDescrizione")).Text;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
DataProxy.DP.taRA.Insert(idxDip, idxFase, inizio, fine, descr, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// generico comando riga
|
||||
/// </summary>
|
||||
@@ -375,211 +451,147 @@ namespace GPW_Admin.WebUserControls
|
||||
stato = statoControllo.item;
|
||||
updateControl();
|
||||
break;
|
||||
|
||||
case "Insert":
|
||||
doInsert();
|
||||
stato = statoControllo.item;
|
||||
updateControl();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region area public
|
||||
|
||||
/// <summary>
|
||||
/// idxDipendente selezionato (0=tutti)
|
||||
/// </summary>
|
||||
public int idxDipCurr
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxDipCurr");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxDipCurr", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// progetto selezionato..
|
||||
/// </summary>
|
||||
public string idxProgetto
|
||||
{
|
||||
get
|
||||
{
|
||||
return idxProjSel.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// abilitato editing + nuovo + delete + clona
|
||||
/// </summary>
|
||||
public bool enableFull
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.BoolSessionObj("enableEditComm");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("enableEditComm", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// stato attuale del controllo
|
||||
/// </summary>
|
||||
public statoControllo stato
|
||||
{
|
||||
get
|
||||
{
|
||||
statoControllo answ = statoControllo.item;
|
||||
try
|
||||
{
|
||||
answ = (statoControllo)memLayer.ML.objSessionObj("statoControlloRA");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("statoControlloRA", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore datetime selezionato!
|
||||
/// </summary>
|
||||
public DateTime valoreDateTime
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Now;
|
||||
try
|
||||
{
|
||||
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif"));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("dataRif", value);
|
||||
lblTitle.Text = string.Format("{0:dddd dd/MM/yyyy}", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// evento update valori
|
||||
/// </summary>
|
||||
public event EventHandler eh_nuovoValore;
|
||||
/// <summary>
|
||||
/// effettua traduzione del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
refreshControlli();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// calcola idxProgetto da idxFase
|
||||
/// </summary>
|
||||
/// <param name="idxFase"></param>
|
||||
/// <returns></returns>
|
||||
public int idxPrjByFase(object idxFase)
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = DataProxy.DP.taAF.getByIdx(Convert.ToInt32(idxFase))[0].idxProgetto;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo eventuali "headers"
|
||||
/// riga popolata
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlFase_DataBound(object sender, EventArgs e)
|
||||
protected void grView_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (sender != null)
|
||||
if (e != null)
|
||||
{
|
||||
// cerco eventuali controlli tipo "ancestor" e li disattivo!
|
||||
DropDownList ddlFase_int = (DropDownList)sender;
|
||||
ListItem li = new ListItem();
|
||||
while (li != null)
|
||||
// controllo la riga
|
||||
GridViewRow riga = e.Row;
|
||||
if (grView.EditIndex >= 0 || grView.ShowFooter)
|
||||
{
|
||||
li = ddlFase_int.Items.FindByValue("0");
|
||||
try
|
||||
{
|
||||
li.Attributes.Add("style", "color:gray;");
|
||||
li.Attributes.Add("disabled", "true");
|
||||
li.Value = "-1";
|
||||
li.Text = string.Format("[ {0} ]", li.Text);
|
||||
//pre-seleziono idx progetto x ods fase...
|
||||
DropDownList ddlProj_int = (DropDownList)riga.FindControl("ddlProgetto");
|
||||
if (idxProjSel >= 0 && (ddlProj_int != null))
|
||||
{
|
||||
ddlProj_int.SelectedValue = idxProjSel.ToString();
|
||||
}
|
||||
DropDownList ddlFase_int = (DropDownList)riga.FindControl("ddlFase");
|
||||
if (idxFaseSel >= 0 && (ddlFase_int != null))
|
||||
{
|
||||
ddlFase_int.SelectedValue = idxFaseSel.ToString();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
try
|
||||
{
|
||||
ddlFase_int.SelectedIndex = 1;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// richiesta creazioen nuovo record
|
||||
/// riga eliminata
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
updateControl();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// riga in edit
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
|
||||
{
|
||||
if (e != null)
|
||||
{
|
||||
// controllo: se ho righe mostro il footer...
|
||||
stato = statoControllo.insert;
|
||||
refreshControlli();
|
||||
grView.SelectedIndex = e.NewEditIndex;
|
||||
int idxRASel = Convert.ToInt32(grView.SelectedDataKey["idxRA"]);
|
||||
// salvo in sessione valori selezionati
|
||||
idxFaseSel = DataProxy.DP.taRA.getByKey(idxRASel)[0].idxFase;
|
||||
idxProjSel = idxPrjByFase(idxFaseSel);
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettuato update
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
|
||||
{
|
||||
updateControl();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// salvo in session che il prox comando è clonare...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void imgClona_Click(object sender, ImageClickEventArgs e)
|
||||
{
|
||||
if (sender != null)
|
||||
{
|
||||
// default: inizia ora la dichiarazione
|
||||
double oraStart = DateTime.Now.Hour;
|
||||
int durataMinuti = memLayer.ML.IntSessionObj("stdMinDurata");
|
||||
// se c'è timbratura ingresso prendo quella come ora inizio...
|
||||
ImageButton lbtn = (ImageButton)sender;
|
||||
int idxRa = 0;
|
||||
try
|
||||
{
|
||||
DS_Applicazione.TimbratureRow riga = DataProxy.DP.taTimb.getByIdxDipPeriodo(DataProxy.idxDipendente, valoreDateTime, valoreDateTime.AddDays(1))[0];
|
||||
oraStart = Convert.ToDouble(riga.dataOra.Hour + riga.dataOra.Minute / 60);
|
||||
idxRa = Convert.ToInt32(lbtn.CommandArgument);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// altrimenti duplico ultima entry utente..
|
||||
DataProxy.DP.taRA.clonaLastRA_Utente(DataProxy.idxDipendente, valoreDateTime.AddHours(oraStart), durataMinuti);
|
||||
// chiamo clona!
|
||||
DataProxy.DP.taRA.clonaRecord(idxRa);
|
||||
updateControl();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// completato insert! aggiorno!
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void odsRA_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
|
||||
{
|
||||
stato = statoControllo.item;
|
||||
refreshControlli();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// intercetto update!
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void odsRA_Updating(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
if (e != null)
|
||||
{
|
||||
DropDownList ddlfase_int = (DropDownList)grView.Rows[grView.EditIndex].FindControl("ddlFase");
|
||||
e.InputParameters["idxFase"] = ddlfase_int.SelectedValue;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
refreshControlli();
|
||||
pnlHeader.Visible = enableFull;
|
||||
lblTitle.Text = string.Format("{0:dddd dd/MM/yyyy}", valoreDateTime);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// esegue ricerca progetto/fase x sovrascrivere
|
||||
/// </summary>
|
||||
@@ -615,6 +627,17 @@ namespace GPW_Admin.WebUserControls
|
||||
refreshControlli();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
refreshControlli();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// formatta la durata in ore secondo web.config (centesimale/ore:min)
|
||||
@@ -642,7 +665,33 @@ namespace GPW_Admin.WebUserControls
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// calcola idxProgetto da idxFase
|
||||
/// </summary>
|
||||
/// <param name="idxFase"></param>
|
||||
/// <returns></returns>
|
||||
public int idxPrjByFase(object idxFase)
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = DataProxy.DP.taAF.getByIdx(Convert.ToInt32(idxFase))[0].idxProgetto;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettua traduzione del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -183,8 +183,15 @@ namespace GPW_Commesse.WebUserControls
|
||||
// se c'è timbratura ingresso prendo quella come ora inizio...
|
||||
try
|
||||
{
|
||||
DS_Applicazione.TimbratureRow riga = DataProxy.DP.taTimb.getByIdxDipPeriodo(DataProxy.idxDipendente, dataRif, dataRif.AddDays(1))[0];
|
||||
oraStart = Convert.ToDouble(riga.dataOra.Hour + (double)riga.dataOra.Minute / 60);
|
||||
// recupero tab timbrature delal giornata...
|
||||
DS_Applicazione.TimbratureDataTable tabTimbrature = DataProxy.DP.taTimb.getByIdxDipPeriodo(DataProxy.idxDipendente, dataRif, dataRif.AddDays(1));
|
||||
// sono ordinate DEC x cui prendo l'ultima...
|
||||
int numRow = tabTimbrature.Rows.Count;
|
||||
if (numRow > 0)
|
||||
{
|
||||
DS_Applicazione.TimbratureRow riga = tabTimbrature[numRow - 1];
|
||||
oraStart = Convert.ToDouble(riga.dataOra.Hour + (double)riga.dataOra.Minute / 60);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
@@ -201,8 +201,15 @@ namespace GPW_Commesse.WebUserControls
|
||||
// se c'è timbratura ingresso prendo quella come ora inizio...
|
||||
try
|
||||
{
|
||||
DS_Applicazione.TimbratureRow riga = DataProxy.DP.taTimb.getByIdxDipPeriodo(DataProxy.idxDipendente, valoreDateTime, valoreDateTime.AddDays(1))[0];
|
||||
oraStart = Convert.ToDouble(riga.dataOra.Hour + (double)riga.dataOra.Minute / 60);
|
||||
// recupero tab timbrature delal giornata...
|
||||
DS_Applicazione.TimbratureDataTable tabTimbrature = DataProxy.DP.taTimb.getByIdxDipPeriodo(DataProxy.idxDipendente, valoreDateTime, valoreDateTime.AddDays(1));
|
||||
// sono ordinate DEC x cui prendo l'ultima...
|
||||
int numRow = tabTimbrature.Rows.Count;
|
||||
if (numRow > 0)
|
||||
{
|
||||
DS_Applicazione.TimbratureRow riga = tabTimbrature[numRow - 1];
|
||||
oraStart = Convert.ToDouble(riga.dataOra.Hour + (double)riga.dataOra.Minute / 60);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
@@ -339,7 +339,7 @@ namespace GPW_Commesse.WebUserControls
|
||||
break;
|
||||
}
|
||||
showPanels();
|
||||
tempVisible = true;
|
||||
tempVisible = false;
|
||||
cmp_chart.dtRif = DateTime.Today;
|
||||
}
|
||||
showCharts(tempVisible);
|
||||
|
||||
Vendored
+1
-1
@@ -10,7 +10,7 @@ pipeline {
|
||||
steps {
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=4155']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=4156']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '2.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '2.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'GPW'
|
||||
|
||||
Reference in New Issue
Block a user