protected void Insert_fields(object sender, EntityDataSourceChangingEventArgs e) { YASA_PL.Fixture_Document_File c = (YASA_PL.Fixture_Document_File)e.Entity; if (c != null) { c.Date_created_modified = DateTime.Now; if (c.filePath != null) { c.File_extension = c.filePath.Substring(c.filePath.LastIndexOf(".") + 1).ToLower(); //add file size information String fileUrl = "~/fixture_files/" + c.filePath; String path = Server.MapPath(fileUrl); System.IO.FileInfo fi = null; fi = new System.IO.FileInfo(path); c.File_size = fi.Length; } } }
protected void Insert_fields(object sender, EntityDataSourceChangingEventArgs e) { YASA_PL.Fixture_Document_File c = (YASA_PL.Fixture_Document_File)e.Entity; if (c != null) { c.Date_created_modified = DateTime.Now; if (c.filePath != null) { c.File_extension = c.filePath.Substring(c.filePath.LastIndexOf(".") + 1).ToLower(); //add file size information String fileUrl = "~/fixture_files/" + c.filePath; String path = Server.MapPath(fileUrl); System.IO.FileInfo fi = null; fi = new System.IO.FileInfo(path); c.File_size = fi.Length; } Session["Record_Info"] = "Edycja pliku zakończona poprawnie"; redirectlink = "~/FixtureSet/Details.aspx?Id=" + c.FixtureId; } }