260ccfd4ed
- rilettura sel squadre in setup - fix visualizzazione MatrOp Bug vari
91 lines
2.7 KiB
C#
91 lines
2.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using WebSCR_data;
|
|
|
|
namespace WebSCR.WebUserControls
|
|
{
|
|
public partial class mod_schemaSettASSD : System.Web.UI.UserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
fixVisibility(false);
|
|
// reimposto selezione squadre...
|
|
mod_selSquadre.selezionaDaSession();
|
|
}
|
|
//aggancio modifica data e salvo...
|
|
mod_selData.eh_update += Mod_selData_eh_update;
|
|
}
|
|
/// <summary>
|
|
/// determina visibilità controlli
|
|
/// </summary>
|
|
/// <param name="showDet"></param>
|
|
private void fixVisibility(bool showDet)
|
|
{
|
|
repWeek.Visible = !showDet;
|
|
divEdit.Visible = showDet;
|
|
}
|
|
|
|
private void Mod_selData_eh_update(object sender, EventArgs e)
|
|
{
|
|
repWeek.DataBind();
|
|
}
|
|
|
|
protected void lbtClonaPrev_Click(object sender, EventArgs e)
|
|
{
|
|
// chiamo stored x clonare da sett prec
|
|
DtProxy.man.taASSD.clonePrevWeek(mod_selData.dateSel);
|
|
// refresh
|
|
repWeek.DataBind();
|
|
mod_giornataASSD.doUpdate();
|
|
}
|
|
|
|
protected void lbtInitWeek_Click(object sender, EventArgs e)
|
|
{
|
|
// chiamo stored x inserire missing
|
|
DtProxy.man.taASSD.insMiss(mod_selData.dateSel);
|
|
|
|
// refresh
|
|
repWeek.DataBind();
|
|
mod_giornataASSD.doUpdate();
|
|
}
|
|
|
|
protected void lbtEditMat_Click(object sender, EventArgs e)
|
|
{
|
|
// sistemo dati x dettaglio giorno
|
|
LinkButton lbt = (LinkButton)sender;
|
|
DateTime data = Convert.ToDateTime(lbt.CommandArgument);
|
|
string slot = "MAT";
|
|
showEditMode(data, slot);
|
|
}
|
|
|
|
private void showEditMode(DateTime data, string slot)
|
|
{
|
|
mod_giornataASSD.DataRif = data;
|
|
mod_giornataASSD.Slot = slot;
|
|
lblData.Text = data.ToString("ddd dd/MM");
|
|
lblSlot.Text = slot;
|
|
// update visualizzazione
|
|
fixVisibility(true);
|
|
}
|
|
|
|
protected void lbtEditPom_Click(object sender, EventArgs e)
|
|
{
|
|
// sistemo dati x dettaglio giorno
|
|
LinkButton lbt = (LinkButton)sender;
|
|
DateTime data = Convert.ToDateTime(lbt.CommandArgument);
|
|
string slot = "POM";
|
|
showEditMode(data, slot);
|
|
}
|
|
|
|
protected void lbCancel_Click(object sender, EventArgs e)
|
|
{
|
|
fixVisibility(false);
|
|
}
|
|
}
|
|
} |