riportata indietro funzionalità a bottoni fuori dal tabcontainer - funziona bottone select file

This commit is contained in:
Ermanno
2012-10-02 12:55:47 +02:00
parent f27ea2924b
commit 7a7eb4eaa6
10 changed files with 48 additions and 82 deletions
BIN
View File
Binary file not shown.
+2
View File
@@ -177,10 +177,12 @@
<Content Include="images\folder_m.png" />
<Content Include="images\folder_s.png" />
<Content Include="images\gantt.png" />
<Content Include="images\gestioneButton.png" />
<Content Include="images\office.png" />
<Content Include="images\program.png" />
<Content Include="images\tags.png" />
<Content Include="images\unknown.png" />
<Content Include="images\uploadButton.png" />
<Content Include="images\video.png" />
<Content Include="images\bg-menu-main.png" />
<Content Include="images\bg_bright.jpg" />
+7 -27
View File
@@ -6,47 +6,27 @@
<%@ Register Src="WebUserControls/mod_myTempFile.ascx" TagName="mod_myTempFile" TagPrefix="uc2" %>
<%@ Register Src="WebUserControls/mod_inputDati.ascx" TagName="mod_inputDati" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="clearDiv divSx" style="min-width: 340px; width: 28%; background-color: #DDFFDD;
<div class="clearDiv divSx" style="min-width: 320px; width: 25%; background-color: #DDFFDD;
min-height: 640px; height: 100%;">
<ajaxToolkit:TabContainer ID="TabContainer1" runat="server"
Height="100%" AutoPostBack="true" OnSelectedIndexChanged="rblMode_SelectedIndexChanged">
<ajaxToolkit:TabPanel runat="server" HeaderText="Prova1" ID="TabPanel1">
<HeaderTemplate>Upload file</HeaderTemplate>
<ContentTemplate>
<uc1:mod_fileUpload ID="mod_fileUpload1" runat="server" />
</ContentTemplate>
</ajaxToolkit:TabPanel>
<ajaxToolkit:TabPanel runat="server" HeaderText="Prova2" ID="TabPanel2" BackColor="Red">
<HeaderTemplate>Gestione file</HeaderTemplate>
<ContentTemplate>
<uc3:mod_inputDati ID="mod_inputDati2" runat="server" />
</ContentTemplate>
</ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>
<%-- <div class="divCenter" style="padding-top:4px; padding-bottom:4px;">
<div class="divCenter" style="padding-top:4px; padding-bottom:4px;">
<asp:RadioButtonList ID="rblMode" runat="server" AutoPostBack="true" OnSelectedIndexChanged="rblMode_SelectedIndexChanged"
RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="radioBtn">
<asp:ListItem Value="Upload" Text="Upload File" />
<asp:ListItem Value="Cataloga" Text="Gestione File" />
</asp:RadioButtonList>
</div>--%>
</div>
<asp:Panel ID="pnlFileUpload" runat="server">
<uc1:mod_fileUpload ID="mod_fileUpload1" runat="server" />
</asp:Panel>
<asp:Panel ID="pnlInputDati" runat="server">
<uc3:mod_inputDati ID="mod_inputDati2" runat="server" />
</asp:Panel>
</div>
<div class="divSx" style="min-width: 640px; width: 65%;">
<div style="width: 100%" class="fontPiccolo">
<uc2:mod_myTempFile ID="mod_myTempFile1" runat="server" />
<uc2:mod_myTempFile ID="mod_myTempFile1" runat="server" />
</div>
</div>
</asp:Content>
+7 -8
View File
@@ -9,20 +9,20 @@ namespace ETS_WS
{
public partial class MyDocs : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// rblMode.SelectedIndex = 0;
TabContainer1.ActiveTabIndex = 0;
setPnlVisibility();
rblMode.SelectedIndex = 0;
setPnlVisibility();
}
mod_fileUpload1.eh_fileCaricato += new EventHandler(mod_fileUpload1_eh_fileCaricato);
mod_inputDati2.eh_reqSalva += new EventHandler(mod_inputDati2_eh_reqSalva);
}
/// <summary>
/// richiesta salvataggio, chiamo metodo sulla gestione files temp!
/// richiesta salvataggio, chiamo metodo sulla gestioen files temp!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
@@ -37,6 +37,7 @@ namespace ETS_WS
/// <param name="e"></param>
void mod_fileUpload1_eh_fileCaricato(object sender, EventArgs e)
{
rblMode.SelectedIndex = 1;
setPnlVisibility();
}
/// <summary>
@@ -52,9 +53,7 @@ namespace ETS_WS
private void setPnlVisibility()
{
bool fileVisible = false;
//if (rblMode.SelectedValue == "Upload"
// FARE!!! verificare se funziona ancora dopo cambio a pannelli
if ( TabContainer1.ActiveTabIndex == 1)
if (rblMode.SelectedValue == "Upload")
{
fileVisible = true;
}
+30 -46
View File
@@ -7,56 +7,22 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace ETS_WS {
public partial class MyDocs {
namespace ETS_WS
{
public partial class MyDocs
{
/// <summary>
/// TabContainer1 control.
/// rblMode control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.TabContainer TabContainer1;
/// <summary>
/// TabPanel1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.TabPanel TabPanel1;
/// <summary>
/// mod_fileUpload1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ETS_WS.WebUserControls.mod_fileUpload mod_fileUpload1;
/// <summary>
/// TabPanel2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.TabPanel TabPanel2;
/// <summary>
/// mod_inputDati2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ETS_WS.WebUserControls.mod_inputDati mod_inputDati2;
protected global::System.Web.UI.WebControls.RadioButtonList rblMode;
/// <summary>
/// pnlFileUpload control.
/// </summary>
@@ -65,7 +31,16 @@ namespace ETS_WS {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnlFileUpload;
/// <summary>
/// mod_fileUpload1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ETS_WS.WebUserControls.mod_fileUpload mod_fileUpload1;
/// <summary>
/// pnlInputDati control.
/// </summary>
@@ -74,7 +49,16 @@ namespace ETS_WS {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel pnlInputDati;
/// <summary>
/// mod_inputDati2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ETS_WS.WebUserControls.mod_inputDati mod_inputDati2;
/// <summary>
/// mod_myTempFile1 control.
/// </summary>
@@ -50,7 +50,8 @@ namespace ETS_WS.WebUserControls
{
if (path != "")
{
path = string.Format("{0}/{1}", path, e.FileName);
// carico path e file
path = string.Format("{0}/{1}", path, System.IO.Path.GetFileName(e.FileName));
fileUpload.SaveAs(MapPath(path));
lg.Info("salvato file: {0}, {1} Kb", path, e.FileSize / 1024);
if (eh_fileCaricato != null)
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB