protected void btnSaveClick(object sender, EventArgs e) { if (callbackCustomer == null) { return; } callbackCustomer.Name = txtName.Text; callbackCustomer.Phone = txtPhone.Text; callbackCustomer.Comment = txtComment.Text; callbackCustomer.AdminComment = txtAdminComment.Text; callbackCustomer.Processed = ckbProcessed.Checked; CallbackRepository.UpdateCallbackCustomer(callbackCustomer); var jScript = new StringBuilder(); jScript.Append("<script type=\'text/javascript\' language=\'javascript\'> "); if (string.IsNullOrEmpty(string.Empty)) { jScript.Append("window.opener.location.reload();"); } else { jScript.Append("window.opener.location =" + string.Empty); } jScript.Append("self.close();"); jScript.Append("</script>"); Type csType = this.GetType(); ClientScriptManager clScriptMng = this.ClientScript; clScriptMng.RegisterClientScriptBlock(csType, "Close_window", jScript.ToString()); }
protected void Page_Load(object sender, EventArgs e) { if (string.IsNullOrEmpty(Request["id"])) { return; } if (!Int32.TryParse(Request["id"], out CallbackID)) { return; } if ((callbackCustomer = CallbackRepository.GetCallbackCustomer(CallbackID)) == null) { return; } }
protected void lvCallbacksItemCommand(object sender, ListViewCommandEventArgs e) { int callbackID; if (Int32.TryParse(e.CommandArgument.ToString(), out callbackID)) { switch (e.CommandName) { case "processCallBack": CallbackRepository.SetCallbackProcessed(callbackID, true); break; case "deleteCallBack": CallbackRepository.DeleteCallbackById(callbackID); break; } } }
public CallbackController(CallbackRepository callbackRepository) { CallbackRepository = callbackRepository; }
private void LoadData() { lvCallbacks.DataSource = CallbackRepository.GetCallbackCustomers(); lvCallbacks.DataBind(); }
public CallbackGenerator(CallbackRepository callbackRepository) { _callbackRepository = callbackRepository; }
public static ASPxGridViewCustomButtonCallbackEventArgs FindLastOf(this CallbackRepository <ASPxGridViewCustomButtonCallbackEventArgs> source, string buttonID) { return(source.Find(x => x.ButtonID == buttonID).LastOrDefault()); }
public static ASPxGridViewCommandButtonCallbackEventArgs FindLastOf(this CallbackRepository <ASPxGridViewCommandButtonCallbackEventArgs> source, ColumnCommandButtonType buttonType) { return(source.Find(x => x.ButtonType == buttonType).LastOrDefault()); }