| <%@ Page Language="C#" MasterPageFile="~/Backoffice/Header.master" AutoEventWireup="true" CodeFile="DepotFichier.aspx.cs" Inherits="Backoffice_DepotFichier_DepotFichier" Title="Untitled Page" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> |
| <script type="text/javascript"> |
| function Validation_fichier(sender, eventArgs) |
| { |
| var input = eventArgs.get_fileInputField(); |
| var nomfichier = input.value; |
| if (nomfichier != "") |
| { |
| Obj = document.getElementById("submit"); |
| if (Obj) |
| { |
| Obj.style.display = ""; |
| } |
| } |
| } |
| function refreshDepotFichier() |
| { |
| var ajaxManager = $find("<%=this.RadAjaxManager1.ClientID%>"); |
| ajaxManager.ajaxRequest('RefreshDepotFichier'); |
| } |
| function refreshDepotFichierZip() |
| { |
| var ajaxManager = $find("<%=this.RadAjaxManager1.ClientID%>"); |
| ajaxManager.ajaxRequest('RefreshDepotFichierZip'); |
| } |
| </script> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| </telerik:RadScriptManager> |
| <telerik:RadProgressManager ID="RadProgressManager1" runat="server" EnableTheming="True" /> |
| <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" ControlsToSkip="Textbox" /> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager_AjaxRequest"> |
| <AjaxSettings> |
| <telerik:AjaxSetting> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> |
| </telerik:RadAjaxLoadingPanel> |
| <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="ManualClose" |
| Width="650" Height="80" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element" |
| Position="MiddleRight" ShowEvent="OnClick"> |
| </telerik:RadToolTipManager> |
| <telerik:RadWindowManager ID="RadWindow" runat="server" ReloadOnShow="True" VisibleStatusbar="False" Behaviors="Move, Close" Animation="Resize"> |
| <Windows> |
| <telerik:RadWindow ID="RadWindowValidationFichier" runat="server" Width="480px" Height="480px" OnClientClose="refreshDepotFichier" Animation="Resize" Behaviors="Move" Title="Validation fichier" VisibleStatusbar="False" ShowContentDuringLoad="False" Behavior="Move" InitialBehavior="None" Left="" Top=""></telerik:RadWindow> |
| <telerik:RadWindow ID="RadWindowValidationZip" runat="server" Width="480px" Height="480px" OnClientClose="refreshDepotFichierZip" Animation="Resize" Behaviors="Move" Title="Validation fichier compressé" VisibleStatusbar="False" ShowContentDuringLoad="False" Behavior="Move" InitialBehavior="None" Left="" Top=""></telerik:RadWindow> |
| </Windows> |
| </telerik:RadWindowManager> |
| <div id="divTitre_KoosMos" style="width:980px; margin:auto;"> |
| <div style="padding: 3px 0px 0px 0px; margin: 0px 0px 0px 30px;"> |
| <asp:Literal ID="trad_listeAppli" runat="server" Text="Gestion de fichier" /> |
| <asp:Label ID="lbl_test" runat="server" Text="" ForeColor="red"></asp:Label> |
| </div> |
| </div> |
| <div style="width:980px; margin:auto; margin-top:10px;"> |
| <telerik:RadTabStrip ID="RadTabGestionFichier" runat="server" MultiPageID="RadMultiPageGestionFichier" |
| ShowBaseLine="True"> |
| <Tabs> |
| <telerik:RadTab runat="server" PageViewID="RadPageViewDepose" Value="1" Selected="true"> |
| </telerik:RadTab> |
| <telerik:RadTab runat="server" PageViewID="RadPageViewSuivi" Value="2"> |
| </telerik:RadTab> |
| </Tabs> |
| </telerik:RadTabStrip> |
| <telerik:RadMultiPage ID="RadMultiPageGestionFichier" runat="server"> |
| <telerik:RadPageView ID="RadPageViewDepose" runat="server" Selected="true"> |
| <div class="cadre_depose" style="padding-top:20px;"> |
| <div style="width:400px; margin:auto;"> |
| <div> |
| <div style="float:left; margin-right:40px; margin-top:4px;"> |
| <asp:Label ID="mtrad_lbl_ipn" runat="server" Text="[IPN] : "></asp:Label> |
| <asp:Label ID="lbl_ipn_value" runat="server"></asp:Label> |
| </div> |
| <div style="float:left; margin-top:4px;"> |
| <asp:Label ID="mtrad_lbl_pays" runat="server" Text="[Pays] : "></asp:Label> |
| </div> |
| <div> |
| <telerik:RadComboBox ID="RCB_Pays" runat="server" Skin="Default"> |
| </telerik:RadComboBox> |
| </div> |
| </div> |
| <div style="clear:both; margin-top:20px;"> |
| <asp:Label ID="mtrad_lbl_transfert" runat="server" Text="[Fichier à transférer] : "></asp:Label> |
| <telerik:RadUpload ID="RadUpload1" runat="server" Culture="french" ControlObjectsVisibility="None" OverwriteExistingFiles="false" OnClientFileSelected="Validation_fichier" AllowedFileExtensions=".txt,.zip,.tar,.gz" InputSize="50" ReadOnlyFileInputs="True"> |
| </telerik:RadUpload> |
| </div> |
| <div id="submit" style="margin-top:20px; display:none;"> |
| <asp:Button ID="trad_submit_fichier" runat="server" Text="Analyser" OnClick="submit_fichier_Click" /> |
| </div> |
| </div> |
| <div style="width:400px; margin:auto; margin-top:20px;"> |
| <asp:Label ID="lbl_msg" runat="server" ForeColor="red" Visible="false"></asp:Label> |
| </div> |
| <telerik:RadProgressArea ID="RadProgressArea1" runat="server" Width="400px" Culture="French" style="position:absolute; top:190px; left:400px;" DisplayCancelButton="True" ProgressIndicators="TotalProgressBar, TotalProgress, TotalProgressPercent, RequestSize, CurrentFileName, TimeElapsed, TimeEstimated, TransferSpeed" EnableTheming="True"> |
| <Localization Uploaded="Uploaded" /> |
| </telerik:RadProgressArea> |
| </div> |
| </telerik:RadPageView> |
| <telerik:RadPageView ID="RadPageViewSuivi" runat="server"> |
| <div class="cadre_suivi" style="padding-top:10px"> |
| <div class="filtre"> |
| <table width="100%"> |
| <tr> |
| <td> |
| <asp:Label ID="mtrad_lbl_nom_fichier" runat="server" Text="[Nom fichier] :"></asp:Label> |
| </td> |
| <td> |
| <asp:TextBox ID="tb_fichier" runat="server" CssClass="txbox"></asp:TextBox> |
| </td> |
| <td> |
| <asp:Label ID="mtrad_lbl_date_reception" runat="server" Text="[Date réception] :"></asp:Label> |
| </td> |
| <td> |
| <telerik:RadDatePicker ID="RadDatePickerDeb" runat="server" Skin="Default" Width="100px"> |
| <Calendar ID="CalendarDeb" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"> |
| </Calendar> |
| <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> |
| </telerik:RadDatePicker> |
| </td> |
| <td> |
| <asp:Label ID="mtrad_lbl_date_traitement" runat="server" Text="[Début traitement] :"></asp:Label> |
| </td> |
| <td> |
| <telerik:RadDatePicker ID="RadDatePickerDebTrt" runat="server" Skin="Default" Width="100px"> |
| <Calendar ID="CalendarDebTrt" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"> |
| </Calendar> |
| <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> |
| </telerik:RadDatePicker> |
| </td> |
| <td> |
| <asp:Label ID="mtrad_lbl_etat" runat="server" Text="[Etat] :"></asp:Label> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="RadComboBoxEtat" runat="server"> |
| </telerik:RadComboBox> |
| </td> |
| <td> |
| <asp:ImageButton ID="ImgFiltrer" runat="server" ImageUrl="~/Backoffice/Images/search.gif" OnClick="ImgFiltrer_Click" /> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:Label ID="mtrad_lbl_origine" runat="server" Text="[Origine] :"></asp:Label> |
| </td> |
| <td> |
| <asp:TextBox ID="tb_origine" runat="server" CssClass="txbox"></asp:TextBox> |
| </td> |
| <td> </td> |
| <td> |
| <telerik:RadDatePicker ID="RadDatePickerFin" runat="server" Skin="Default" Width="100px"> |
| <Calendar ID="CalendarFin" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"> |
| </Calendar> |
| <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> |
| </telerik:RadDatePicker> |
| </td> |
| <td> </td> |
| <td> |
| <telerik:RadDatePicker ID="RadDatePickerFinTrt" runat="server" Skin="Default" Width="100px"> |
| <Calendar ID="CalendarFinTrt" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"> |
| </Calendar> |
| <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> |
| </telerik:RadDatePicker> |
| </td> |
| <td> |
| <asp:Label ID="mtrad_lbl_crt" runat="server" Text="[CRT] :"></asp:Label> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="RadComboBoxCRT" runat="server"> |
| </telerik:RadComboBox> |
| </td> |
| <td> |
| <asp:ImageButton ID="ImgeClear" runat="server" ImageUrl="~/Backoffice/Images/clear.gif" OnClick="ImgeClear_Click" /> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <div> |
| <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AutoGenerateColumns="False" |
| OnItemCommand="RadGrid1_ItemCommand" AllowPaging="True" AllowSorting="True" |
| OnItemDataBound="RadGrid1_ItemDataBound" Height="347px" AllowFilteringByColumn="False" |
| PageSize="8" OnNeedDataSource="RadGrid1_NeedDataSource"> |
| <MasterTableView DataSourceID="SqlDataSourceFichier_Recu" DataKeyNames="fic_id" CommandItemDisplay="Bottom" NoMasterRecordsText="Aucune données à afficher."> |
| <Columns> |
| <telerik:GridBoundColumn DataField="fic_id" DataType="System.Int32" |
| SortExpression="fic_id" UniqueName="fic_id"> |
| <HeaderStyle HorizontalAlign="Left" Width="60px" /> |
| <ItemStyle HorizontalAlign="Left" Width="60px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn SortExpression="fic_nom" |
| UniqueName="TemplateColumn"> |
| <ItemTemplate> |
| <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Text='<%# Eval("fic_nom") %>'></asp:HyperLink> |
| </ItemTemplate> |
| <HeaderStyle HorizontalAlign="Left" Width="160px" /> |
| <ItemStyle HorizontalAlign="Left" Width="160px" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="download" HeaderButtonType="None" |
| ImageUrl="../Images/Download.gif" UniqueName="fic_id" DataType="System.Int32"> |
| <HeaderStyle HorizontalAlign="Center" Width="40px" /> |
| <ItemStyle HorizontalAlign="Center" Width="40px" /> |
| </telerik:GridButtonColumn> |
| <telerik:GridBoundColumn DataField="fic_date_reception" DataType="System.DateTime" |
| SortExpression="fic_date_reception" UniqueName="fic_date_reception"> |
| <HeaderStyle HorizontalAlign="Left" /> |
| <ItemStyle HorizontalAlign="Left" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="fic_origine" SortExpression="fic_origine" |
| UniqueName="fic_origine"> |
| <HeaderStyle HorizontalAlign="Left" Width="70px" /> |
| <ItemStyle HorizontalAlign="Left" Width="70px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="fic_date_trt_deb" DataType="System.DateTime" |
| SortExpression="fic_date_trt_deb" UniqueName="fic_date_trt_deb"> |
| <HeaderStyle HorizontalAlign="Left" /> |
| <ItemStyle HorizontalAlign="Left" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="fic_date_trt_fin" DataType="System.DateTime" |
| SortExpression="fic_date_trt_fin" UniqueName="fic_date_trt_fin"> |
| <HeaderStyle HorizontalAlign="Left" /> |
| <ItemStyle HorizontalAlign="Left" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="ficetat_lib" |
| SortExpression="ficetat_lib" UniqueName="ficetat_lib"> |
| <HeaderStyle HorizontalAlign="Left" Width="100px" /> |
| <ItemStyle HorizontalAlign="Left" Width="100px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn SortExpression="crt_lib" |
| UniqueName="TemplateColumnCRT"> |
| <ItemTemplate> |
| <asp:HyperLink ID="targetControl2" runat="server" NavigateUrl="#" Text='<%# Eval("crt_lib") %>' style="text-decoration:underline;"></asp:HyperLink> |
| </ItemTemplate> |
| <HeaderStyle HorizontalAlign="Left" Width="120px" /> |
| <ItemStyle HorizontalAlign="Left" Width="120px" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField="fic_comment" UniqueName="fic_comment" Visible="False"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| <CommandItemSettings ShowExportToCsvButton="True" /> |
| </MasterTableView> |
| <ClientSettings AllowAutoScrollOnDragDrop="False"> |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" /> |
| </ClientSettings> |
| <ExportSettings HideStructureColumns="True" IgnorePaging="True"> |
| <Csv ColumnDelimiter="Semicolon" /> |
| </ExportSettings> |
| <PagerStyle PageSizeLabelText="Taille de la page :" /> |
| </telerik:RadGrid> |
| <asp:SqlDataSource ID="SqlDataSourceFichier_Recu" runat="server" |
| ConnectionString="<%$ ConnectionStrings:Galileo_ConnectionString %>"> |
| </asp:SqlDataSource> |
| </div> |
| </div> |
| </telerik:RadPageView> |
| </telerik:RadMultiPage> |
| </div> |
| </asp:Content> |
| using System; |
| using System.Data; |
| using System.Configuration; |
| using System.Collections; |
| using System.Web; |
| using System.Web.Security; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using System.Web.UI.WebControls.WebParts; |
| using System.Web.UI.HtmlControls; |
| using Telerik.Web.UI; |
| using Telerik.Web.UI.Upload; |
| using System.Web.Configuration; |
| using System.Data.SqlClient; |
| using System.IO; |
| using System.Threading; |
| using Backoffice.DepotFichier; |
| using BOGeneral; |
| using Mx_Drive; |
| using Mx_Export; |
| public partial class Backoffice_DepotFichier_DepotFichier : CurrentPage |
| { |
| traduction t; |
| string targetFolder = "G:\\CFT_Data\\histo\\tmp\\"; |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| t = new traduction(Convert.ToInt32(Session["langue"]), connexionBDD.st_PMBase); |
| RadTabGestionFichier.Tabs[0].Text = t.getLibelle("Dépose de fichiers"); |
| RadTabGestionFichier.Tabs[1].Text = t.getLibelle("Suivi des fichiers reçus"); |
| RadUpload1.Localization.Select = t.getLibelle("Parcourir"); |
| RadGrid1.Columns[0].HeaderText = t.getLibelle("ID"); |
| RadGrid1.Columns[1].HeaderText = t.getLibelle("Fichier"); |
| RadGrid1.Columns[3].HeaderText = t.getLibelle("Date réception"); |
| RadGrid1.Columns[4].HeaderText = t.getLibelle("Origine"); |
| RadGrid1.Columns[5].HeaderText = t.getLibelle("Début traitement"); |
| RadGrid1.Columns[6].HeaderText = t.getLibelle("Fin traitement"); |
| RadGrid1.Columns[7].HeaderText = t.getLibelle("Etat"); |
| RadGrid1.Columns[8].HeaderText = t.getLibelle("CRT"); |
| RadGrid1.Columns[9].HeaderText = t.getLibelle("Commentaire"); |
| RadGrid1.MasterTableView.CommandItemSettings.RefreshText = t.getLibelle("Rafraichir"); |
| RadGrid1.MasterTableView.NoMasterRecordsText = t.getLibelle("Aucune données à afficher."); |
| RadGrid1.PagerStyle.PageSizeLabelText = t.getLibelle("Taille de la page :"); |
| Drive.CheckForGDrive(); |
| lbl_ipn_value.Text = Session["IPN"].ToString(); |
| if (!IsPostBack) |
| { |
| CurrentPage.PageContext.CurrentFichier.Uploaded_file = null; |
| DataTable Liste_pays = BO.GetListePays(TApplication.DepotDeFichier); |
| if (Liste_pays.Rows.Count > 1) |
| { |
| RadComboBoxItem MyRadItemAdmin = new RadComboBoxItem(); |
| MyRadItemAdmin.Text = "Fichier zip"; |
| MyRadItemAdmin.Value = "0"; |
| RCB_Pays.Items.Add(MyRadItemAdmin); |
| } |
| foreach (DataRow Rows in Liste_pays.Rows) |
| { |
| RadComboBoxItem MyRadItem = new RadComboBoxItem(); |
| MyRadItem.Text = Rows["LIBELLE_PAYS"].ToString(); |
| MyRadItem.Value = Rows["PAYS_ID"].ToString(); |
| RCB_Pays.Items.Add(MyRadItem); |
| } |
| string connStr = WebConfigurationManager.ConnectionStrings["Galileo_ConnectionString"].ToString(); |
| SqlConnection oDC = new SqlConnection(connStr); |
| string sql = "SELECT [ficetat_id], [ficetat_lib] FROM [REF_FICHIER_ETAT]"; |
| SqlCommand oCmd = new SqlCommand(sql, oDC); |
| oCmd.Connection.Open(); |
| SqlDataReader oReader = oCmd.ExecuteReader(); |
| RadComboBoxItem MyRadItemVide = new RadComboBoxItem(); |
| MyRadItemVide.Text = ""; |
| MyRadItemVide.Value = ""; |
| RadComboBoxEtat.Items.Add(MyRadItemVide); |
| while (oReader.Read()) |
| { |
| RadComboBoxItem MyRadItem = new RadComboBoxItem(); |
| MyRadItem.Text = oReader["ficetat_lib"].ToString(); |
| MyRadItem.Value = oReader["ficetat_id"].ToString(); |
| RadComboBoxEtat.Items.Add(MyRadItem); |
| } |
| oCmd.Connection.Close(); |
| string sql2 = "SELECT [crt_id], [crt_lib] FROM [REF_FICHIER_CRT]"; |
| SqlCommand oCmd2 = new SqlCommand(sql2, oDC); |
| oCmd2.Connection.Open(); |
| SqlDataReader oReader2 = oCmd2.ExecuteReader(); |
| RadComboBoxItem MyRadItemVide2 = new RadComboBoxItem(); |
| MyRadItemVide2.Text = ""; |
| MyRadItemVide2.Value = ""; |
| RadComboBoxCRT.Items.Add(MyRadItemVide2); |
| while (oReader2.Read()) |
| { |
| RadComboBoxItem MyRadItem2 = new RadComboBoxItem(); |
| MyRadItem2.Text = oReader2["crt_lib"].ToString(); |
| MyRadItem2.Value = oReader2["crt_id"].ToString(); |
| RadComboBoxCRT.Items.Add(MyRadItem2); |
| } |
| oCmd2.Connection.Close(); |
| } |
| } |
| protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) |
| { |
| filtrer(); |
| RadGrid1.DataSourceID = "SqlDataSourceFichier_Recu"; |
| RadToolTipManager1.TargetControls.Clear(); |
| if (e.CommandName.ToString() == "download") |
| { |
| Drive.CheckForGDrive(); |
| int fichier_id = Convert.ToInt32((e.Item as GridDataItem).GetDataKeyValue("fic_id").ToString()); |
| string connStr = WebConfigurationManager.ConnectionStrings["Galileo_ConnectionString"].ToString(); |
| SqlConnection oDC = new SqlConnection(connStr); |
| string sql = "SELECT fic_path, fic_nom_reel FROM tbl_fichier_recu WHERE fic_id = " + fichier_id; |
| SqlCommand oCmd = new SqlCommand(sql, oDC); |
| oCmd.Connection.Open(); |
| SqlDataReader oReader = oCmd.ExecuteReader(); |
| oReader.Read(); |
| string Location = oReader["fic_path"].ToString() + oReader["fic_nom_reel"]; |
| Location = Location.Replace("D:", "\\\\Varel\\Galileo"); |
| oCmd.Connection.Close(); |
| if (File.Exists(Location)) |
| { |
| FileInfo file = new System.IO.FileInfo(Location); |
| Response.AppendHeader("Content-Disposition", "attachment; filename=" + file.Name.Replace(" ", "_")); |
| Response.AppendHeader("Content-Length", file.Length.ToString()); |
| Response.ContentType = "application/octet-stream"; |
| Response.TransmitFile(Location); |
| } |
| } |
| if (e.CommandName == "ExportToCsv") |
| { |
| RadGrid1.MasterTableView.GetColumn("fic_id").Visible = false; |
| RadGrid1.MasterTableView.GetColumn("fic_comment").Visible = true; |
| RadGrid1.MasterTableView.ExportToCSV(); |
| } |
| } |
| protected void submit_fichier_Click(object sender, EventArgs e) |
| { |
| foreach (UploadedFile file in RadUpload1.UploadedFiles) |
| { |
| CurrentPage.PageContext.CurrentFichier.Uploaded_file = file; |
| } |
| if (CurrentPage.PageContext.CurrentFichier.Uploaded_file != null) |
| { |
| CurrentPage.PageContext.CurrentFichier.Pays_text = RCB_Pays.SelectedItem.Text; |
| CurrentPage.PageContext.CurrentFichier.Pays_value = RCB_Pays.SelectedItem.Value; |
| if (CurrentPage.PageContext.CurrentFichier.Uploaded_file.GetExtension() == ".txt") |
| { |
| RadWindowValidationFichier.NavigateUrl = "ValidationFichier.aspx"; |
| RadWindowValidationFichier.VisibleOnPageLoad = true; |
| } |
| else |
| { |
| Drive.CheckForGDrive(); |
| UploadedFile file = CurrentPage.PageContext.CurrentFichier.Uploaded_file; |
| string extension = file.GetExtension(); |
| file.SaveAs(Path.Combine(targetFolder, file.GetName()), true); |
| if (!Object.Equals(file, null)) |
| { |
| LooongMethodWhichUpdatesTheProgressContext(file); |
| } |
| RadWindowValidationZip.NavigateUrl = "ValidationFichierZip.aspx"; |
| RadWindowValidationZip.VisibleOnPageLoad = true; |
| } |
| lbl_msg.Visible = false; |
| } |
| else |
| { |
| lbl_msg.Text = t.MultiTrad("[Fichier non pris en charge.]<br>[Vérifier qu'il s'agit bien d'un fichier .txt, .zip, .tar ou .gz .]"); |
| lbl_msg.Visible = true; |
| } |
| } |
| protected void RadAjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e) |
| { |
| if (e.Argument == "RefreshDepotFichier") |
| { |
| CurrentPage.PageContext.CurrentFichier.Uploaded_file = null; |
| } |
| if (e.Argument == "RefreshDepotFichierZip") |
| { |
| if (CurrentPage.PageContext.CurrentFichier.Uploaded_file != null) |
| { |
| File.Delete(targetFolder + CurrentPage.PageContext.CurrentFichier.Uploaded_file.GetName()); |
| CurrentPage.PageContext.CurrentFichier.Uploaded_file = null; |
| } |
| } |
| } |
| private void LooongMethodWhichUpdatesTheProgressContext(UploadedFile file) |
| { |
| const int total = 100; |
| RadProgressContext progress = RadProgressContext.Current; |
| for (int i = 0; i < total; i++) |
| { |
| progress.PrimaryTotal = 1; |
| progress.PrimaryValue = 1; |
| progress.PrimaryPercent = 100; |
| progress.SecondaryTotal = total; |
| progress.SecondaryValue = i; |
| progress.SecondaryPercent = i; |
| progress.CurrentOperationText = file.GetName() + " is being processed..."; |
| if (!Response.IsClientConnected) |
| { |
| break; |
| } |
| } |
| } |
| protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) |
| { |
| this.UpdateToolTip(args.Value, args.UpdatePanel); |
| } |
| private void UpdateToolTip(string fichier_id, UpdatePanel panel) |
| { |
| Control ctrl = Page.LoadControl("DetailFichier.ascx"); |
| panel.ContentTemplateContainer.Controls.Add(ctrl); |
| CurrentPage.PageContext.CurrentFichier.Fichier_id = fichier_id; |
| } |
| protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) |
| { |
| if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem) |
| { |
| Control target = e.Item.FindControl("targetControl"); |
| if (!Object.Equals(target, null)) |
| { |
| if (!Object.Equals(this.RadToolTipManager1, null)) |
| { |
| this.RadToolTipManager1.TargetControls.Add(target.ClientID, (e.Item as GridDataItem).GetDataKeyValue("fic_id").ToString(), true); |
| } |
| } |
| Control target2 = e.Item.FindControl("targetControl2"); |
| if (!Object.Equals(target2, null)) |
| { |
| if (!Object.Equals(this.RadToolTipManager1, null)) |
| { |
| this.RadToolTipManager1.TargetControls.Add(target2.ClientID, (e.Item as GridDataItem).GetDataKeyValue("fic_id").ToString(), true); |
| } |
| } |
| } |
| if (e.Item is GridCommandItem) |
| { |
| GridCommandItem cmdItem = (GridCommandItem)e.Item; |
| Button btn1 = (Button)cmdItem.FindControl("AddNewRecordButton"); |
| btn1.Visible = false; |
| LinkButton lnkbtn1 = (LinkButton)cmdItem.FindControl("InitInsertButton"); |
| lnkbtn1.Visible = false; |
| } |
| } |
| protected void ImgFiltrer_Click(object sender, ImageClickEventArgs e) |
| { |
| filtrer(); |
| } |
| protected void filtrer() |
| { |
| DataTable Liste_pays = BO.GetListePays(TApplication.DepotDeFichier); |
| SqlDataSourceFichier_Recu.SelectParameters.Clear(); |
| string sql = @"SELECT fic.fic_id, fic.fic_nom, fic.fic_path, fic.fic_date_reception, fic.fic_origine, fic.fic_date_trt_deb, fic.fic_date_trt_fin, etat.ficetat_lib, (CASE WHEN crt.crt_lib = 'REJET' THEN crt.crt_lib + ' (' + CAST(fic.fic_nb_rejet AS VARCHAR) + ')' ELSE crt.crt_lib END) as crt_lib, fic.fic_comment, fic.fic_fichier_original |
| FROM tbl_fichier_recu fic |
| LEFT OUTER JOIN ref_fichier_etat etat ON fic.ficetat_id = etat.ficetat_id |
| LEFT OUTER JOIN ref_fichier_crt crt ON fic.crt_id = crt.crt_id |
| LEFT OUTER JOIN ref_fichier ref ON fic.fichier_id = ref.fichier_id |
| WHERE 1 = 1"; |
| if (Liste_pays.Rows.Count == 1) |
| { |
| sql += " AND ref.pays_id = '" + Liste_pays.Rows[0].ItemArray[0] + "'"; |
| } |
| if (tb_fichier.Text != "") |
| { |
| sql += " AND fic_nom LIKE '%" + tb_fichier.Text + "%'"; |
| } |
| if (tb_origine.Text != "") |
| { |
| sql += " AND fic_origine LIKE '%" + tb_origine.Text + "%'"; |
| } |
| if (RadDatePickerDeb.SelectedDate != null) |
| { |
| DateTime date_deb = this.RadDatePickerDeb.SelectedDate.Value; |
| sql += " AND fic_date_reception >= @date_deb"; |
| SqlDataSourceFichier_Recu.SelectParameters.Add("date_deb", TypeCode.DateTime, date_deb.ToString()); |
| } |
| if (RadDatePickerFin.SelectedDate != null) |
| { |
| DateTime date_fin = this.RadDatePickerFin.SelectedDate.Value.AddHours(23).AddMinutes(59); |
| sql += " AND fic_date_reception <= @date_fin"; |
| SqlDataSourceFichier_Recu.SelectParameters.Add("date_fin", TypeCode.DateTime, date_fin.ToString()); |
| } |
| if (RadDatePickerDebTrt.SelectedDate != null) |
| { |
| DateTime date_deb_trt = this.RadDatePickerDebTrt.SelectedDate.Value; |
| sql += " AND fic_date_trt_deb >= @date_deb_trt"; |
| SqlDataSourceFichier_Recu.SelectParameters.Add("date_deb_trt", TypeCode.DateTime, date_deb_trt.ToString()); |
| } |
| if (RadDatePickerFinTrt.SelectedDate != null) |
| { |
| DateTime date_fin_trt = this.RadDatePickerFinTrt.SelectedDate.Value.AddHours(23).AddMinutes(59); |
| sql += " AND fic_date_trt_deb <= @date_fin_trt"; |
| SqlDataSourceFichier_Recu.SelectParameters.Add("date_fin_trt", TypeCode.DateTime, date_fin_trt.ToString()); |
| } |
| if (RadComboBoxEtat.SelectedValue != "") |
| { |
| sql += " AND fic.ficetat_id = " + RadComboBoxEtat.SelectedValue; |
| } |
| if (RadComboBoxCRT.SelectedValue != "") |
| { |
| sql += " AND fic.crt_id = " + RadComboBoxCRT.SelectedValue; |
| } |
| sql += " ORDER BY fic.fic_date_reception DESC"; |
| SqlDataSourceFichier_Recu.SelectCommand = sql; |
| RadToolTipManager1.TargetControls.Clear(); |
| } |
| protected void ImgeClear_Click(object sender, ImageClickEventArgs e) |
| { |
| tb_fichier.Text = ""; |
| tb_origine.Text = ""; |
| RadDatePickerDeb.Clear(); |
| RadDatePickerDebTrt.Clear(); |
| RadDatePickerFin.Clear(); |
| RadDatePickerFinTrt.Clear(); |
| RadComboBoxCRT.ClearSelection(); |
| RadComboBoxEtat.ClearSelection(); |
| filtrer(); |
| } |
| protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e) |
| { |
| DataTable Liste_pays = BO.GetListePays(TApplication.DepotDeFichier); |
| if (Liste_pays.Rows.Count == 1) |
| { |
| SqlDataSourceFichier_Recu.SelectCommand = @"SELECT fic.fic_id, fic.fic_nom, fic.fic_path, fic.fic_date_reception, fic.fic_origine, fic.fic_date_trt_deb, fic.fic_date_trt_fin, etat.ficetat_lib, (CASE WHEN crt.crt_lib = 'REJET' THEN crt.crt_lib + ' (' + CAST(fic.fic_nb_rejet AS VARCHAR) + ')' ELSE crt.crt_lib END) as crt_lib, fic.fic_comment, fic.fic_fichier_original |
| FROM tbl_fichier_recu fic |
| LEFT OUTER JOIN ref_fichier_etat etat ON fic.ficetat_id = etat.ficetat_id |
| LEFT OUTER JOIN ref_fichier_crt crt ON fic.crt_id = crt.crt_id |
| LEFT OUTER JOIN ref_fichier ref ON fic.fichier_id = ref.fichier_id |
| WHERE ref.pays_id = '" + Liste_pays.Rows[0].ItemArray[0] + @"' |
| ORDER BY fic.fic_date_reception DESC"; |
| } |
| else |
| { |
| SqlDataSourceFichier_Recu.SelectCommand = @"SELECT fic.fic_id, fic.fic_nom, fic.fic_path, fic.fic_date_reception, fic.fic_origine, fic.fic_date_trt_deb, fic.fic_date_trt_fin, etat.ficetat_lib, (CASE WHEN crt.crt_lib = 'REJET' THEN crt.crt_lib + ' (' + CAST(fic.fic_nb_rejet AS VARCHAR) + ')' ELSE crt.crt_lib END) as crt_lib, fic.fic_comment, fic.fic_fichier_original |
| FROM tbl_fichier_recu fic |
| LEFT OUTER JOIN ref_fichier_etat etat ON fic.ficetat_id = etat.ficetat_id |
| LEFT OUTER JOIN ref_fichier_crt crt ON fic.crt_id = crt.crt_id |
| ORDER BY fic.fic_date_reception DESC"; |
| } |
| RadGrid1.DataSourceID = "SqlDataSourceFichier_Recu"; |
| } |
| protected void export_rejet_csv(string fichier_id) |
| { |
| string fichier_nom = ""; |
| DateTime date_trt_debut = new DateTime(); |
| DateTime date_trt_fin = new DateTime(); |
| string connStr = WebConfigurationManager.ConnectionStrings["Galileo_ConnectionString"].ToString(); |
| SqlConnection oDC = new SqlConnection(connStr); |
| string sql = @"SELECT fic.fic_nom, fic.fic_date_trt_deb, fic.fic_date_trt_fin |
| FROM tbl_fichier_recu fic |
| WHERE fic.fic_id = " + fichier_id; |
| SqlCommand oCmd = new SqlCommand(sql, oDC); |
| oCmd.Connection.Open(); |
| SqlDataReader oReader = oCmd.ExecuteReader(); |
| oReader.Read(); |
| fichier_nom = oReader["fic_nom"].ToString(); |
| (DateTime)date_trt_debut = Convert.ToDateTime(oReader["fic_date_trt_deb"]); |
| (DateTime)date_trt_fin = Convert.ToDateTime(oReader["fic_date_trt_fin"]); |
| oCmd.Connection.Close(); |
| DataTable MyTable = new DataTable(); |
| string sql_rejet = @"SELECT rejet_date, rejet_data, rejet_raison |
| FROM sys_rejet |
| WHERE (rejet_date BETWEEN @date_debut AND @date_fin) AND rejet_fichier = '" + fichier_nom + "'"; |
| SqlCommand oCmd_rejet = new SqlCommand(sql_rejet, oDC); |
| oCmd_rejet.Parameters.Add("@date_debut", SqlDbType.DateTime); |
| oCmd_rejet.Parameters.Add("@date_fin", SqlDbType.DateTime); |
| oCmd_rejet.Parameters["@date_debut"].Value = date_trt_debut; |
| oCmd_rejet.Parameters["@date_fin"].Value = date_trt_fin; |
| oCmd_rejet.Connection.Open(); |
| SqlDataAdapter adapter = new SqlDataAdapter(oCmd_rejet); |
| adapter.Fill(MyTable); |
| oCmd_rejet.Connection.Close(); |
| string fichier_rejet = Path.Combine(getDev.st_racineSite, "tempdata\\rejet_" + DateTime.Now.ToString("yyMMdd_HHmmss") + "_" + fichier_nom + ".csv"); |
| string en_tete = "date; données; raison"; |
| Export.CSV(MyTable, fichier_rejet, en_tete); |
| FileInfo file = new System.IO.FileInfo(fichier_rejet); |
| Response.AppendHeader("Content-Disposition", "attachment; filename=" + file.Name); |
| Response.AppendHeader("Content-Length", file.Length.ToString()); |
| Response.ContentType = "application/octet-stream"; |
| Response.TransmitFile(fichier_rejet); |
| } |
| } |
| <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> |
| <configSections> |
| <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> |
| <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> |
| <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> |
| <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> |
| <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/> |
| <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> |
| <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> |
| </sectionGroup> |
| </sectionGroup> |
| </sectionGroup> |
| </configSections> |
| <appSettings> |
| <add key="loginBackOffice" value="http://galileobo.orca.lan/Portail_bo/ASPX/login.aspx?statut=2"/> |
| <add key="loginFrontOffice" value="http://galileo.orca.lan"/> |
| <add key="com.orcaformation.webserv.Service1" value="http://webserv.orcaformation.com/Service1.asmx"/> |
| <add key="com.orcaformation.arcadecrypt.decrypt" value="http://arcadecrypt.orcaformation.com/decrypt.asmx"/> |
| </appSettings> |
| <connectionStrings> |
| <remove name="LocalSqlServer"/> |
| <add name="PORTAIL_MONDEConnectionString" connectionString="Data Source=;Initial Catalog=PORTAIL_MONDE;Persist Security Info=True;User ID=;Password=" providerName="System.Data.SqlClient"/> |
| <add name="Galileo_ConnectionString" connectionString="Data Source=;Initial Catalog=Galileo_Pays_Work;Persist Security Info=True;User ID=;Password=" providerName="System.Data.SqlClient"/> |
| </connectionStrings> |
| <system.web> |
| <trace enabled="true" localOnly="false"/> |
| <sessionState cookieless="UseCookies"/> |
| <customErrors mode="Off"/> |
| <compilation debug="true" urlLinePragmas="true"> |
| <assemblies> |
| <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> |
| <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> |
| <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| <add assembly="AjaxControlToolkit, Version=1.0.20229.20821, Culture=neutral, PublicKeyToken=28F01B0E84B6D53E"/> |
| <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| <add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.DirectoryServices.Protocols, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies> |
| </compilation> |
| <pages maintainScrollPositionOnPostBack="True"> |
| <controls> |
| <add assembly="AjaxControlToolkit, Version=1.0.20229.20821, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" namespace="AjaxControlToolkit" tagPrefix="atk"/> |
| <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> |
| </controls> |
| </pages> |
| <httpHandlers> |
| <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" /> |
| <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/> |
| <remove verb="*" path="*.asmx"/> |
| <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> |
| <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> |
| <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> |
| </httpHandlers> |
| <httpModules> |
| <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/> |
| <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> |
| </httpModules> |
| <httpRuntime executionTimeout="3600" maxRequestLength="2097151" useFullyQualifiedRedirectUrl="true" requestLengthDiskThreshold="2097151" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/> |
| </system.web> |
| <system.webServer> |
| <validation validateIntegratedModeConfiguration="false"/> |
| <modules> |
| <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> |
| </modules> |
| <handlers> |
| <remove name="WebServiceHandlerFactory-Integrated"/> |
| <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> |
| <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> |
| <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> |
| <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/> |
| </handlers> |
| </system.webServer> |
| </configuration> |
tree.DataValueField = "ID";tree.DataTextField = "Name";tree.DataSource = list; // list = new List<Person>(); // class Person { ID; Name; }tree.DataBind(); How can use Grid FilterExpression on DataTable.
DTSTART:20110101T000000Z DTEND:20120630T000000Z RRULE:FREQ=WEEKLY;UNTIL=20120630T000000Z;INTERVAL=1;BYDAY=TU

<telerik:RadProgressManager runat="server" ID="RadProgressManager1" /> <telerik:RadAsyncUpload ID="rauFileUpload" runat="server" Width="95%" OnClientValidationFailed="validationFailed" AllowedFileExtensions="xls" MaxFileSize="4000000"> </telerik:RadAsyncUpload> <br /> <asp:button id="btnCharge" runat="server" OnClick="btnCharge_Click" /> <br /> <telerik:RadProgressArea runat="server" ID="RadProgressArea1" skin="Default" ProgressIndicators="TotalProgressBar, TotalProgressPercent"> </telerik:RadProgressArea>Server Error in '/EPR' Application. -------------------------------------------------------------------------------- Could not find file 'C:\RPG\01-NET\EPR\EPR\EPR\App_Data\RadUploadTemp\nt2njtqp.xhy'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileNotFoundException: Could not find file 'C:\RPG\01-NET\EPR\EPR\EPR\App_Data\RadUploadTemp\nt2njtqp.xhy'. Source Error: Line 70: Line 71: string fileName = Path.GetTempFileName(); Line 72: uf.SaveAs(fileName); Line 73: Line 74: //DataSet ds = HLPimportExcel.ImportExcel(fileName, Yes); Source File: c:\RPG\01-NET\EPR\EPR\EPR\Pages\HES\ServicesMassiveCharge.aspx.cs Line: 72 Stack Trace: [FileNotFoundException: Could not find file 'C:\RPG\01-NET\EPR\EPR\EPR\App_Data\RadUploadTemp\nt2njtqp.xhy'.] System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +305 System.IO.File.Move(String sourceFileName, String destFileName) +239 Telerik.Web.UI.AsyncUploadedFile.SaveAs(String fileName, Boolean overwrite) +81 Telerik.Web.UI.UploadedFile.SaveAs(String fileName) +38 Pages_HES_ServicesMassiveCharge.btnCharge_Click(Object sender, EventArgs e) in c:\RPG\01-NET\EPR\EPR\EPR\Pages\HES\ServicesMassiveCharge.aspx.cs:72 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5420 function enableLoadButton(button) { button.disabled = true; __doPostBack("<%= btnCharge.UniqueID %>"); return; } <asp:button id="btnCharge" runat="server" OnClick="btnCharge_Click" OnClientClick="enableLoadButton(this)" />Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Fri, 18 Nov 2011 14:36:17 UTC
Message: Sys.WebForms.PageRequestManagerServerErrorException: Exception has been thrown by the target of an invocation.
Line: 6
Char: 84093
Code: 0
