fix bug #57 di redmine

This commit is contained in:
Samuele Locatelli
2013-09-06 10:28:15 +02:00
parent ed41131938
commit bc25a44da6
5 changed files with 18 additions and 9 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
<add key="appName" value="PROJ-ETS" />
<add key="SiteName" value="ETS" />
<add key="mainRev" value="0.8" />
<add key="minRev" value="197" />
<add key="minRev" value="198" />
<add key="stdEmail" value="info@steamware.net" />
<add key="_safePages" value="Default.aspx#unauthorized.aspx#forceUser.aspx#login.aspx#test.aspx#Test.aspx" />
<!--area gestione auth cookie-->
@@ -174,14 +174,11 @@
<SortedDescendingHeaderStyle BackColor="#15524A"></SortedDescendingHeaderStyle>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OnInserting="recuperaFooter" OldValuesParameterFormatString="original_{0}"
SelectMethod="getByIdxProgetto" TypeName="ETS_Data.Ds_ProjEtsTableAdapters.AnagFasiTableAdapter" FilterExpression=" (nomeFase like '%{0}%') OR (descrizioneFase like '%{0}%') "
SelectMethod="getByIdxProgetto" TypeName="ETS_Data.Ds_ProjEtsTableAdapters.AnagFasiTableAdapter"
DeleteMethod="deleteQuery" InsertMethod="InsertQuery" UpdateMethod="updateQuery" OnUpdating="ods_Updating">
<DeleteParameters>
<asp:Parameter Name="Original_idxFase" Type="Int32" />
</DeleteParameters>
<FilterParameters>
<asp:SessionParameter SessionField="valoreCercato" Type="String" />
</FilterParameters>
<InsertParameters>
<asp:SessionParameter SessionField="idxProgetto_sel" Name="idxProgetto" Type="Int32" />
<asp:SessionParameter SessionField="idxFaseAncest" Name="idxFaseAncest" Type="Int32" />
@@ -261,24 +261,36 @@ namespace PROJ_ETS.WebUserControls
protected void btnNew_Click(object sender, EventArgs e)
{
// controllo se c'è un argument x la fase...
string idxFaseAncest = "0";
int idxFaseAncest = 0;
try
{
idxFaseAncest = ((ImageButton)sender).CommandArgument;
idxFaseAncest = Convert.ToInt32(((ImageButton)sender).CommandArgument);
}
catch
{ }
utils.obj.setSessionVal("idxFaseAncest", idxFaseAncest);
if (idxFaseAncest == "0")
if (idxFaseAncest == 0)
{
// reset selezione...
resetSelezione();
}
// aggiungo un record "standard" di fase...
int anno = DateTime.Now.Year;
int idxProgetto = utils.obj.IntSessionObj("idxProgetto_sel");
int idxProgettoTemplate = utils.obj.confReadInt("idxProgettoTemplate");
string nomeFase = string.Format("Nuova Fase {0:dd/MM/yyyy}", DateTime.Now);
string descrFase = string.Format("Nuova Fase del {0:dd/MM/yyyy} creata da {1}", DateTime.Now, utils.obj.currUserCognomeNome);
// creo direttamente record con valori "standard"
DataProxy_ProjEts.DP.taAF.InsertQuery(idxProgetto, idxFaseAncest, nomeFase, descrFase, true, false, 0, 0, true);
// refresh!
grView.DataBind();
#if false
// mostro il footer oppure la riga dei dettagli x nuovo...
if (grView.FooterRow != null)
{
grView.FooterRow.Visible = true;
}
}
#endif
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
Binary file not shown.
Binary file not shown.