void FileListingUc1_DeleteClicked(object sender, Academic.ViewModel.IdAndNameEventArgs e) { FileDeleteDialogUc1.FileName = e.Name; FileDeleteDialogUc1.FileId = e.Id; //FileDeleteDialogUc1.ParentFolderId FileDeleteDialogUc1.SetValues("Delete " + e.RefIdString); FileDeleteDialogUc1.OpenDialog(); }
protected void Page_Load(object sender, EventArgs e) { Initialize(); if (!IsPostBack) { //PopulateData(); var user = Page.User as CustomPrincipal; if (user != null) { FileDeleteDialogUc1.SetValues("Delete"); var folderId = Convert.ToInt32(Request.QueryString["folId"] ?? "0"); FolderId = folderId; var isServerFile = ((Request.QueryString["type"] ?? "private") == "server" && user.IsInRole("manager")); IsServerFile = isServerFile; SetSitemap(isServerFile); FilePickerDialog1.SetValues("File upload", null, "", ""); FilePickerDialog1.OnlyUploadAvailable = true; var guid = Guid.NewGuid().ToString(); FilePickerDialog1.PageKey = guid; FilePickerDialog1.FileSaveDirectory = DbHelper.StaticValues.PrivateFiesLocation; FilePickerDialog1.FileAcquireMode = Enums.FileAcquireMode.Single; FilePickerDialog1.FolderId = folderId; } else { Response.Redirect("~/"); } } }