protected void AcilisDuyurusuOkundu_Callback(object source, DevExpress.Web.CallbackEventArgs e) { //duyuruyu okudu string qwe = acilisDuyurusu.Src.ToString().Replace("Images/UploadImagePopupDuyuru/", "").Split('.')[0].ToString(); db.I_DuyurularPopupLog((Guid)Membership.GetUser().ProviderUserKey, acilisDuyurusu.Src.ToString().Replace("Images/UploadImagePopupDuyuru/", "")); }
protected void validationCallback_Callback(object source, DevExpress.Web.CallbackEventArgs e) { try { string[] parameters = e.Parameter.Split('|'); string dialogMode = parameters[0]; string fileName = Server.MapPath(Path.Combine(fileManager.Settings.RootFolder, parameters[1])); switch (dialogMode) { case "OPEN": using (var file = File.OpenRead(fileName)) { } break; case "SAVE": if (!File.Exists(fileName)) { using (var file = File.Create(fileName)) { } File.Delete(fileName); } break; } e.Result = String.Empty; } catch (Exception ex) { string rootPath = Server.MapPath(fileManager.Settings.RootFolder); e.Result = ex.Message.Replace(rootPath, fileManager.Settings.RootFolder); } }
protected void SaveData(object source, DevExpress.Web.CallbackEventArgs e) { try { throw new NotImplementedException(); } catch (NotImplementedException) { e.Result = "Error|An error was thrown while saving data. Please contact site administrator."; } }
private void Handler_OnCallback(object source, DevExpress.Web.CallbackEventArgs e) { var idx = -1; if (int.TryParse(e.Parameter, out idx) && (idx > -1 && idx < Buttons.Count)) { Buttons[idx].RaiseExecutionEvent(Buttons[idx], e); } }
protected void Callback_Callback(object source, DevExpress.Web.CallbackEventArgs e) { // Not secure // e.Result = "<img src=1 onerror=alert('XSS') /> "; // CallbackControl.JSProperties["cpSomeInfo"] = "<video src=1 onerror=alert(document.cookie)>"; e.Result = HttpUtility.HtmlEncode("<img src=1 onerror=alert('XSS') /> "); CallbackControl.JSProperties["cpSomeInfo"] = HttpUtility.HtmlEncode("<video src=1 onerror=alert(document.cookie)>"); }
protected void ASPxCallback_Callback(object source, DevExpress.Web.CallbackEventArgs e) { try { GridDataItem.UpdateData(JsonConvert.DeserializeObject <GridDataItem>(e.Parameter)); e.Result = "OK"; } catch (Exception ex) { e.Result = ex.Message; } }
protected void ASPxCallback1_Callback(object source, DevExpress.Web.CallbackEventArgs e) { int count = 10; for (int i = 0; i < count; i++) { progress = Convert.ToDouble(i) / Convert.ToDouble(count) * 100; System.Threading.Thread.Sleep(500); } }
private void Handler_OnCallback(object source, DevExpress.Web.CallbackEventArgs e) { var paramsList = String.Concat(e.Parameter).Split(new String[] { "|" }, StringSplitOptions.RemoveEmptyEntries); if (paramsList.Length > 1) { switch (paramsList[0]) { case "navigate": if (String.Concat(Helpers.Session["XafBootstrapStructureView"]) == String.Concat(paramsList[1])) { if (currentStart != null) { Helpers.Session["XafBootstrapStructureView"] = (currentStart.Parent != null ? GetKey(currentStart.Parent) : ""); } else { Helpers.Session["XafBootstrapStructureView"] = ""; } } else { Helpers.Session["XafBootstrapStructureView"] = paramsList[1]; } BuildData(); break; case "select": /*var frame = Helpers.Session["XafBootstrapStructureViewFrame"] as Frame; * if (frame != null) * { * var controller = frame.GetController<DialogController>(); * if (controller != null) * { * Selected = FindSelectable(paramsList[1]); * if (Editor != null) * Editor.InvokeSelectionChanged(); * controller.AcceptAction.DoExecute(); * WebWindow.CurrentRequestWindow.RegisterStartupScript("CloseThisModal", "closeThisModal()"); * } * }*/ var app = (WebApplication.Instance as XafApplication); if (app != null) { Selected = FindSelectable(paramsList[1]); var os = app.CreateObjectSpace(); var item = os.GetObject(Selected); var view = app.CreateDetailView(os, item); var SVP = new ShowViewParameters(view); app.ShowViewStrategy.ShowView(SVP, new ShowViewSource(null, null)); } break; } } }
protected void callback_Callback(object source, DevExpress.Web.CallbackEventArgs e) { string[] para = e.Parameter.Split(':'); if (para[0] == "SAVE") { Save(); } else if (para[0] == "CANCEL") { } }
protected void ASPxCallback1_Callback(object source, DevExpress.Web.CallbackEventArgs e) { if (e.Parameter != "") { int aptIdForDismiss = Convert.ToInt32(e.Parameter); foreach (Appointment apt in storage.Appointments.Items) { if (((int)apt.Id) == aptIdForDismiss && apt.Reminder != null) { apt.Reminder.Dismiss(); } } appointmentsAdapter.Update(schedulerDataSet, "Appointments"); } ASPxCallback1.JSProperties["cpReminders"] = null; storage.TriggerAlerts(); }
protected void ASPxCallback1_Callback(object source, DevExpress.Web.CallbackEventArgs e) { string baseurl = string.Empty; string seguridad = "http://"; baseurl = string.Format("{0}{1}", seguridad, HttpContext.Current.Request.ServerVariables["HTTP_HOST"].ToString()); string urlFinal = string.Format("{0}{1}{2}", baseurl, "/WebForm1.aspx", "?accion=anulado"); string urlReturn = string.Format("{0}{1}{2}", baseurl, "/WebForm1.aspx", "?accion=pagado"); var res = new Transbank() { }.Pagar(); e.Result = res == null ? "no hay respuesta de transbank" : res.token + " " + res.url; }
protected void LoginCallback_Callback(object source, DevExpress.Web.CallbackEventArgs e) { bool signInSuccess = false; string message = ""; string username = ""; // CommonMethods.Trim(txtUsername.Text); string password = ""; //CommonMethods.Trim(txtPassword.Text); try { if (e.Parameter.Contains("SignInUserCredentials")) { username = CommonMethods.Trim(txtUsername.Text); password = CommonMethods.Trim(txtPassword.Text); } if (username != "" && password != "") { signInSuccess = auth.Authenticate(username, password, rememberMeCheckBox.Checked); } } catch (EmployeeCredentialsException ex) { message = ex.Message; } catch (Exception ex) { CommonMethods.LogThis(ex.Message + "\r\n" + ex.Source + "\r\n" + ex.StackTrace); message = AuthenticationValidation_Exception.res_01; } if (signInSuccess) { Session.Remove("PreviousPage"); HttpContext.Current.Response.AddHeader("Cache-Control", "no-cache, no-store, must-revalidate"); HttpContext.Current.Response.AddHeader("Pragma", "no-cache"); HttpContext.Current.Response.AddHeader("Expires", "0"); } else { LoginCallback.JSProperties["cpResult"] = message; } }
protected void CallbackUploadControl_Callback(object source, DevExpress.Web.CallbackEventArgs e) { string[] split = e.Parameter.Split(';'); if (split[0] == "Delete") { currentFile = new DocumentEntity { Url = "", Name = split[1] }; DeleteAttachments(this, EventArgs.Empty); } else if (split[0] == "Download") { currentFile = new DocumentEntity { Url = "", Name = split[1] }; DownloadAttachments(this, EventArgs.Empty); } }
void handler_OnCallback(object source, DevExpress.Web.CallbackEventArgs e) { if (e.Parameter == "save") { var themeName = String.Concat(HttpContext.Current.Request.Form["themeName"]).Replace("/", "").Replace("\\", ""); if (themeName != "") { var bootstrapCSS = String.Concat(HttpContext.Current.Request.Form["bootstrapCSS"]); var path = HttpContext.Current.Server.MapPath("bootstrap_themes/" + themeName + "/css/"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } if (bootstrapCSS != "") { using (FileStream fs = new FileStream(path + "bootstrap.min.css", FileMode.OpenOrCreate)) { using (StreamWriter outfile = new StreamWriter(fs)) { outfile.Write(bootstrapCSS); outfile.Close(); } fs.Close(); } } if (CurrentObject is XAFBootstrapConfiguration) { (CurrentObject as XAFBootstrapConfiguration).SetThemeChanged(); (CurrentObject as XAFBootstrapConfiguration).Session.CommitTransaction(); } InitEdit(); } } }
protected void CallbackLogin_Callback(object source, DevExpress.Web.CallbackEventArgs e) { string message = ""; string username = ""; string password = ""; bool signInSuccess = false; try { if (e.Parameter == "SignInUserCredentials") { username = CommonMethods.Trim(txtUsername.Text); password = CommonMethods.Trim(txtPassword.Text); } if (username != "" && password != "") { signInSuccess = auth.Authenticate(username, password); } } catch (UserCredentialsException ex) { message = ex.Message; } catch (Exception ex) { CommonMethods.LogThis(ex.Message + "\r\n" + ex.Source + "\r\n" + ex.StackTrace); message = ExceptionsRes.res_01; } if (!signInSuccess) { LoginCallback.JSProperties["cpResult"] = message; } }
public virtual void OnCallback(object source, DevExpress.Web.CallbackEventArgs e) { }
protected void ASPxCallback1_Callback(object source, DevExpress.Web.CallbackEventArgs e) { e.Result = DateTime.Now.ToShortTimeString(); }
protected void cpLoadingShow_Callback(object source, DevExpress.Web.CallbackEventArgs e) { System.Threading.Thread.Sleep(200); }
protected void ASPxCallback1_Callback(object source, DevExpress.Web.CallbackEventArgs e) { DeleteUploadedFileFormSession(); e.Result = "ok"; }
protected void ASPxCallback_Callback(object source, DevExpress.Web.CallbackEventArgs e) { e.Result = GetNote(e.Parameter); }
protected void clbProgress_Callback(object source, DevExpress.Web.CallbackEventArgs e) { e.Result = progressInPercent.ToString(); }
void handler_OnCallback(object source, DevExpress.Web.CallbackEventArgs e) { InnerRender(); }
protected void ASPxCallback2_Callback(object source, DevExpress.Web.CallbackEventArgs e) { e.Result = progress + "%"; }
protected void clbCancel_Callback(object source, DevExpress.Web.CallbackEventArgs e) { isCancelRequired = true; }
protected void CallbackControl_Callback(object source, DevExpress.Web.CallbackEventArgs e) { Exception innerException = new Exception("NoReport"); throw new Exception("This Exception is thrown to demonstrate the ASPxWebControl.CallbackError Event.", innerException); }
private void DataSelector_OnCallback(object source, DevExpress.Web.CallbackEventArgs e) { OnCallback(source, e); }