/// <summary> /// Recupera le informazioni relative al documento /// </summary> private void Execute() { S_Controls.Collections.S_ControlsCollection CollezioneControlli = new S_Controls.Collections.S_ControlsCollection(); S_Controls.Collections.S_Object s_p_filname = new S_Controls.Collections.S_Object(); s_p_filname.ParameterName = "p_filname"; s_p_filname.DbType = CustomDBType.VarChar; s_p_filname.Direction = ParameterDirection.Input; s_p_filname.Index = 0; s_p_filname.Value = this.filname; s_p_filname.Size = 50; CollezioneControlli.Add(s_p_filname); Classi.AnagrafeImpianti.DocDWF _DocDWF = new Classi.AnagrafeImpianti.DocDWF(); DataSet Ds = _DocDWF.GetData(CollezioneControlli); Repeater1.DataSource = Ds; Repeater1.DataBind(); if (Ds.Tables[0].Rows.Count > 0) { GetFile(Ds.Tables[0].Rows[0]["var_percorso_root"].ToString(), Ds.Tables[0].Rows[0]["var_percorso_child"].ToString()); } }
public void imageButton_Click(Object sender, CommandEventArgs e) { // Context.Items.Add("var_afm_dwgs_dwg_name",(string)e.CommandArgument); // Server.Transfer("VisualDWF.aspx"); string PathFileName = ""; string PathRoot = ""; string PathChild = ""; Context.Items.Add("var_afm_dwgs_dwg_name", (string)e.CommandArgument); string file_name = Context.Items["var_afm_dwgs_dwg_name"].ToString(); file_name = file_name.ToUpper(); bool zip = (file_name.EndsWith(".ZIP") || file_name.EndsWith(".RAR")); //Context.Items.Keys.("var_afm_dwgs_dwg_name").ToString(); if (zip == false) { Server.Transfer("VisualDWF.aspx"); } else { S_Controls.Collections.S_ControlsCollection CollezioneControlli = new S_Controls.Collections.S_ControlsCollection(); S_Controls.Collections.S_Object s_p_filname = new S_Controls.Collections.S_Object(); s_p_filname.ParameterName = "p_filname"; s_p_filname.DbType = CustomDBType.VarChar; s_p_filname.Direction = ParameterDirection.Input; s_p_filname.Index = 0; s_p_filname.Value = file_name; s_p_filname.Size = 50; CollezioneControlli.Add(s_p_filname); Classi.AnagrafeImpianti.DocDWF _DocDWF = new Classi.AnagrafeImpianti.DocDWF(); DataSet Ds = _DocDWF.GetData(CollezioneControlli); //if (Ds.Tables[0].Rows.Count>0) //GetFile(Ds.Tables[0].Rows[0]["var_percorso_root"].ToString(),Ds.Tables[0].Rows[0]["var_percorso_child"].ToString()); PathRoot = Ds.Tables[0].Rows[0]["var_percorso_root"].ToString(); PathChild = Ds.Tables[0].Rows[0]["var_percorso_child"].ToString(); PathRoot = PathRoot.Replace(" ", "_"); PathChild = PathChild.Replace(" ", "_").Replace("/", "_"); PathFileName = "../Doc_DB/" + PathRoot + "/" + PathChild + "/" + file_name; Response.Redirect(PathFileName); } }