protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName) { telerikAsyncUploadResult result = CreateDefaultUploadResult<telerikAsyncUploadResult>(file); string folderType = "temp"; DocAccess objDoc = new DocAccess(); result.DocumentID = 0; result.DocumentID = objDoc.saveFiles(file, folderType, Convert.ToInt32(context.Session["ClientID"]), Convert.ToInt32(context.Session["UserID"]), 0, Convert.ToInt32(context.Session["WebinarID"])); return result; }
protected void btnUpload_Click(object sender, EventArgs e) { int docID = 0; DocAccess objDocAccess = new DocAccess(); WebinarDA objWebinarDA = new WebinarDA(); docID = objDocAccess.saveFiles(Request, "PRESENTATION", Convert.ToInt32(Session["ClientID"]), Convert.ToInt32(Session["UserID"])); if (docID > 0) { objWebinarDA.UpdateRegPageVideo(docID, Convert.ToInt32(hWebinarID.Value)); hDocID.Value = docID.ToString(); } }
protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName) { // Call the base Process method to save the file to the temporary folder //base.Process(file, context, configuration, tempFileName); // Populate the default (base) result into an object of type telerikAsyncUploadResult telerikAsyncUploadResult result = CreateDefaultUploadResult<telerikAsyncUploadResult>(file); int userID = -1; int clientID = -1; string folderType = string.Empty; DocAccess objDoc = new DocAccess(); //Follwoing is commented as the custom config values are not getting passed. //telerikUploadConfig getConfig = configuration as telerikUploadConfig; //if (getConfig != null) //{ // userID = getConfig.ActionID; // clientID = getConfig.ClientID; // folderType = getConfig.FolderType; // result.DocumentID = objDoc.saveFiles(file, folderType, clientID, userID); //} result.DocumentID = 0; if (context.Request["uid"] != null) userID = 1; string refURL = context.Request.UrlReferrer.ToString().ToUpper(); if (refURL.IndexOf("BIO") > 0) folderType = "PROFILE"; if (refURL.IndexOf("AUDIFEATURE_CONTENT") > 0) folderType = "PRESENTATION"; if (refURL.IndexOf("SNAPSITE") > 0) folderType = "SS"; if (folderType == string.Empty) { if (context.Request["ftyp"] != null) { if (Convert.ToString(context.Request["ftyp"]) == "u") folderType = "PROFILE"; else folderType = "PRESENTATION"; } else if (context.Session["FolderType"] != null) folderType = Convert.ToString(context.Session["FolderType"]); } if (folderType != string.Empty) { if (userID == -1) result.DocumentID = objDoc.saveFiles(file, folderType, Convert.ToInt32(context.Session["ClientID"]), Convert.ToInt32(context.Session["UserID"]), 0, Convert.ToInt32(context.Session["WebinarID"])); else result.DocumentID = objDoc.saveFiles(file, folderType, Convert.ToInt32(context.Session["ClientID"]), Convert.ToInt32(context.Session["UserID"]), Convert.ToInt32(context.Session["UserID"]), 0); //if (folderType != "PRESENTATION") //{ // DocAccess objDocAccess = new DocAccess(); // objDocAccess.resizeImage(result.DocumentID, Convert.ToInt32(context.Session["ClientID"])); //} } return result; }
private void updateHeader(string headerType) { int docID = 0; DocAccess objDocAccess = new DocAccess(); WebinarDA objWebinarDA = new WebinarDA(); switch (headerType) { case "Logo1": docID = objDocAccess.saveFiles(Request, "Logo", Convert.ToInt32(Session["ClientID"]), Convert.ToInt32(Session["UserID"])); objWebinarDA.SaveWebinarTheme("Logo1", docID, Convert.ToInt32(hWebinarID.Value)); break; case "Logo2": docID = objDocAccess.saveFiles(Request, "Logo", Convert.ToInt32(Session["ClientID"]), Convert.ToInt32(Session["UserID"])); objWebinarDA.SaveWebinarTheme("Logo2", docID, Convert.ToInt32(hWebinarID.Value)); break; case "Banner": docID = objDocAccess.saveFiles(Request, "Logo", Convert.ToInt32(Session["ClientID"]), Convert.ToInt32(Session["UserID"])); objWebinarDA.SaveWebinarTheme("BANNER", docID, Convert.ToInt32(hWebinarID.Value)); break; } getThemeDetails(); }