protected override void OnInit(EventArgs e) { EnsureChildControls(); _MPE = new ModalPopupExtender(); _MPE.PopupControlID = this.ID; // _MPE.PopupDragHandleControlID = this.ID; //Defines TargetControlID for the modalpopupExtender if (string.IsNullOrEmpty(this.TargetControlID)) { _MPE.TargetControlID = _HiddenButton.ID; } else { _MPE.TargetControlID = this.TargetControlID; } // Defines BehaviorId for use in Javascript if (string.IsNullOrEmpty(this.BehaviorID)) { _MPE.BehaviorID = this.ClientID + "_BehaviorID"; } else { _MPE.BehaviorID = this.BehaviorID; } CloseButton.OnClientClick = "$find('" + _MPE.BehaviorID + "').hide();return false;"; _MPE.BackgroundCssClass = this.BackgroundCssClass; Controls.Add(_MPE); base.OnInit(e); }
protected void lblitem_Click(object sender, EventArgs e) { try { List <productsDetails> Details = new List <productsDetails>(); Details = rpt.Rpt_GetStockBy_ReOrderQty(); if (Details.Count > 0) { ReportViewer1.LocalReport.DataSources.Clear(); ReportDataSource reportDataset = new ReportDataSource("AllStockReport_RPT_DS", Details); ReportViewer1.LocalReport.DataSources.Add(reportDataset); ReportViewer1.LocalReport.ReportPath = Server.MapPath("Reports/RPT_AllCentralStockReportBy_LessThenQty.rdlc"); ReportViewer1.LocalReport.Refresh(); ModalPopupExtender.Show(); } else { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('No data found!')", true); //ReportViewer1.Reset(); //ReportViewer1.LocalReport.Refresh(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true); } }
protected void lblChildrenInfo_Click(object sender, EventArgs e) { Button imgbtn = (Button)sender; GridViewRow row = (GridViewRow)imgbtn.NamingContainer; try { string lblChildrenId = ""; Label lblAId = (Label)gridviewChildrenInfo.Rows[row.RowIndex].FindControl("lblChildrenID"); if (lblAId != null) { string OCODE = ((SessionUser)Session["SessionUser"]).OCode; lblChildrenId = lblAId.Text; List <HRM_ChildInfo> childrenes = employeeSetupDal.GetChildrenInfoById(lblChildrenId, OCODE); foreach (HRM_ChildInfo children in childrenes) { childrenId.Value = children.ChildId.ToString(); txtbxChildrenName.Text = children.Name; drpChildrenGender.SelectedValue = children.Gender; txbxDBO.Text = children.DOB.ToString(); txtbxAge.Text = children.Age.ToString(); } } btnAdd.Text = "Update"; ModalPopupExtender.Show(); } catch (Exception ex) { throw; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { (Master as OrderingMaster).SetPageHeader(GetLocalResourceObject("PageResource1.Title") as string); } if (GlobalContext.CurrentExperience.ExperienceType == Shared.ViewModel.ValueObjects.ExperienceType.Green && HLConfigManager.Configurations.DOConfiguration.ChangeOrderingLeftMenuMyHL3) { (Master as OrderingMaster).IsleftMenuVisible = true; (Master as OrderingMaster).IsleftOrderingMenuVisible = false; } var paymentsControl = LoadControl(HLConfigManager.Configurations.PaymentsConfiguration.PaymentInfoControl); ucPaymentInfoControl = paymentsControl as UserControlBase; phPaymentInfoControl.Controls.Add(paymentsControl); if (HLConfigManager.Configurations.PaymentsConfiguration.UseCardRegistry) { if (gvSavedPaymentInformation.Columns.Count > 0) { gvSavedPaymentInformation.Columns[gvSavedPaymentInformation.Columns.Count - 1].Visible = false; btnAddPaymentInfo.Visible = false; } } sortExpression = ViewState["_GridView1LastSortExpression_"] as string; sortDirection = ViewState["_GridView1LastSortDirection_"] as string; mpPaymentInformation = (ModalPopupExtender)ucPaymentInfoControl.FindControl("ppPaymentInfoControl"); loadPaymentInformation(); (Master as OrderingMaster).gdoNavMidCSS("gdo-nav-mid col-sm-7 gdo-no-right-nav"); }
protected void AddBtn_Click(object sender, EventArgs e) { LscIDTextBox.Text = String.Empty; LscNameTextBox.Text = String.Empty; LscIPTextBox.Text = String.Empty; LscPortTextBox.Text = String.Empty; LscUIDTextBox.Text = String.Empty; LscPwdTextBox.Attributes["value"] = String.Empty; BeatIntervalTextBox.Text = "20"; BeatDelayTextBox.Text = "20"; DBIPTextBox.Text = String.Empty; DBPortTextBox.Text = "1433"; DBNameTextBox.Text = String.Empty; DBUIDTextBox.Text = String.Empty; DBPwdTextBox.Attributes["value"] = String.Empty; HisDBIPTextBox.Text = String.Empty; HisDBPortTextBox.Text = "1433"; HisDBNameTextBox.Text = String.Empty; HisDBUIDTextBox.Text = String.Empty; HisDBPwdTextBox.Attributes["value"] = String.Empty; EnabledCheckBox.Checked = false; LscIDTextBox.Enabled = true; TitleLabel.Text = "新增记录"; UpdateBtn.Visible = false; SaveBtn.Visible = true; ModalPopupExtender.Show(); }
public void ShowEditRiddle(object sender, CommandEventArgs e) { ViewState["ResID"] = e.CommandArgument.ToString(); ModalPopupExtender modalPopupExtender = (ModalPopupExtender)Page.FindControlRecursive("EditRiddlePopup"); modalPopupExtender.Show(); Model1 _db = new Model1(); int id = int.Parse(ViewState["ResID"].ToString()); riddleresources riddle = (from resources in _db.riddleresources where resources.ResourceID == id select resources).FirstOrDefault(); TextBox name = (TextBox)Page.FindControlRecursive("EditRiddleName"); TextBox ogText = (TextBox)Page.FindControlRecursive("EditOGTExt"); TextBox transText = (TextBox)Page.FindControlRecursive("EditTransText"); TextBox answer = (TextBox)Page.FindControlRecursive("EditRiddleAnswer"); Label audio = (Label)Page.FindControlRecursive("oldRiddleAudio"); Label image = (Label)Page.FindControlRecursive("oldRiddleImage"); name.Text = riddle.RiddleName; ogText.Text = riddle.Text; transText.Text = riddle.TranslatedText; answer.Text = riddle.Answer; audio.Text = riddle.AudioPath; image.Text = riddle.ImagePath; }
public void ShowTestPopup(object sender, CommandEventArgs e) { ViewState["blockID"] = e.CommandArgument.ToString(); ModalPopupExtender modalPopupExtender = (ModalPopupExtender)Page.FindControlRecursive("addTestPopup"); modalPopupExtender.Show(); }
protected void imgBtnClick(object sender, EventArgs e) { ImageButton imgBtn = (ImageButton)sender; DataListItem item = (DataListItem)imgBtn.NamingContainer; if (item != null) { int currentItemID = int.Parse(this.DataList1.DataKeys[item.ItemIndex].ToString()); ModalPopupExtender ex = item.FindControl("mp1") as ModalPopupExtender; Label lblName = item.FindControl("txtName") as Label; Label lblPrice = item.FindControl("txtPrice") as Label; Label lblCategory = item.FindControl("txtCategory") as Label; Label lblWarranty = item.FindControl("txtWarranty") as Label; Label lblDesc = item.FindControl("txtDesc") as Label; Image img = item.FindControl("Image2") as Image; product pro = (from p in dc.products where p.productId == currentItemID select p).Single(); lblName.Text = pro.productName; lblPrice.Text = pro.sellingPrice.ToString("0.00"); lblCategory.Text = pro.category; lblWarranty.Text = pro.warranty.ToString(); lblDesc.Text = "<pre>" + pro.description + "</pre>"; img.ImageUrl = pro.url; ex.Show(); } }
public void ShowEditImage(object sender, CommandEventArgs e) { ViewState["ResID"] = e.CommandArgument.ToString(); ModalPopupExtender modalPopupExtender = (ModalPopupExtender)Page.FindControlRecursive("EditImagePopup"); modalPopupExtender.Show(); }
protected void btnGravarJustifica_Click(object sender, EventArgs e) { if (ValidarCampos()) { tblFaturaObraEtapaJustifica table = new tblFaturaObraEtapaJustifica(); try { table.cmpIdFaturaObraEtapaJustifica = ViewState["cmpIdFaturaObraEtapaJustifica"].ToString(); table.cmpIdFaturaObra = ViewState["idFaturaObra"].ToString(); table.cmpDcFaturaObraEtapaJustifica = txtJustificativa.Text.TrimEnd(); table.cmpNoUsuario = ((HzLibGeneral.Util.HzLogin)Session["login"]).cmpNoUsuario.TrimEnd(); if (!(table.GravarJustificaNaoRecebimentoFatura(Global.GetConnection()))) { throw new Exception("Erro ao gravar justificativa do não recebimento da fatura da obra!"); } else { MsgBox.ShowMessage("Dados gravado com sucesso!", "Aviso"); } btnJustificativa_Click(sender, null); ModalPopupExtender.Show(); } catch (Exception ex) { MsgBox.ShowMessage(ex.ToString(), "Erro"); } } else { txtJustificativa.Focus(); } }
private void CreatePleaseWait() { //Add the please wait panel _pleaseWaitPanel = new Panel(); _pleaseWaitPanel.ID = "pnlPleaseWait"; _pleaseWaitPanel.Style.Add("display", "none"); _pleaseWaitPanel.CssClass = "modalPopup"; _pleaseWaitPanel.Controls.Add(new LiteralControl("Please Wait...")); Controls.Add(_pleaseWaitPanel); //Add a dummy control for the popup extender _hidDummyField = new HiddenField(); _hidDummyField.ID = "hidDummyField"; Controls.Add(_hidDummyField); //Add the pop up extender. _mde = new ModalPopupExtender(); _mde.ID = "mdePleaseWait"; _mde.PopupControlID = _pleaseWaitPanel.ID; //_mde.TargetControlID = _hidDummyField.ClientID; _mde.TargetControlID = _hidDummyField.ID; _mde.DropShadow = true; _mde.BackgroundCssClass = "modalBackground"; Controls.Add(_mde); }
protected void btnNovaJustifica_Click(object sender, EventArgs e) { ViewState["cmpIdFaturaObraEtapaJustifica"] = "0"; txtJustificativa.Text = ""; txtJustificativa.Focus(); ModalPopupExtender.Show(); }
protected void grdJustifica_RowCommand(object sender, GridViewCommandEventArgs e) { ViewState["cmpIdFaturaObraEtapaJustifica"] = e.CommandArgument.ToString(); DataTable tbl = loadJustificativa(false); switch (e.CommandName.Trim()) { case "Editar": txtJustificativa.Text = tbl.Rows[0]["cmpDcFaturaObraEtapaJustifica"].ToString(); ModalPopupExtender.Show(); txtJustificativa.Focus(); break; case "Excluir": tblFaturaObraEtapaJustifica table = new tblFaturaObraEtapaJustifica(); table.cmpIdFaturaObraEtapaJustifica = ViewState["cmpIdFaturaObraEtapaJustifica"].ToString(); table.cmpNoUsuario = ((HzLibGeneral.Util.HzLogin)Session["login"]).cmpNoUsuario; if (table.Delete(Global.GetConnection())) { grdJustifica.DataSource = loadJustificativa(true); grdJustifica.DataBind(); MsgBox.ShowMessage("Justificativa excluída com sucesso!", "Aviso"); } ModalPopupExtender.Show(); break; } }
protected void btnDrivingLicence_Click(object sender, EventArgs e) { Button imgbtn = (Button)sender; GridViewRow row = (GridViewRow)imgbtn.NamingContainer; try { string DId = ""; Label lblDrivId = (Label)gridViewDrivingLicenceInfo.Rows[row.RowIndex].FindControl("lblDrivingLicenceId"); if (lblDrivId != null) { string OCODE = ((SessionUser)Session["SessionUser"]).OCode; DId = lblDrivId.Text; List <HRM_DrivingLicencs> drivs = drivingLicenceBLL.getDrivingLicenceByDrivingIdandOcode(DId, OCODE); foreach (HRM_DrivingLicencs driv in drivs) { hidDivrIngLicenceId.Value = driv.DrivingId.ToString(); txtbxLiceNo.Text = driv.LicenceNo; drpdwnDriveType.SelectedValue = driv.Type; txtbxIssuedDate.Text = driv.IssuedDate.ToString(); txtbxDexperiredDate.Text = driv.ExperiredDate.ToString(); txtbxLocation.Text = driv.Location; btnDrivingSumbiandUpdate.Text = "Update"; ModalPopupExtender.Show(); } } } catch (Exception ex) { throw; } }
protected void GridViewGRADE_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "GradeEdit") { //btnSubmit.Text = "Update"; btnSubmit.Visible = false; btnUpdate.Visible = true; //-------------- LinkButton btndetails = (LinkButton)e.CommandSource; GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer; lblID.Text = GridViewGRADE.DataKeys[gvrow.RowIndex].Value.ToString(); drpStep.Text = HttpUtility.HtmlDecode(gvrow.Cells[0].Text); txtGrade.Text = HttpUtility.HtmlDecode(gvrow.Cells[1].Text); txtGrsSal.Text = HttpUtility.HtmlDecode(gvrow.Cells[2].Text); txtHouseRent.Text = HttpUtility.HtmlDecode(gvrow.Cells[3].Text); txtBasic.Text = HttpUtility.HtmlDecode(gvrow.Cells[4].Text); txtMedical.Text = HttpUtility.HtmlDecode(gvrow.Cells[5].Text); txtConveyance.Text = HttpUtility.HtmlDecode(gvrow.Cells[6].Text); txtFoodAllowance.Text = HttpUtility.HtmlDecode(gvrow.Cells[7].Text); txtOthers.Text = HttpUtility.HtmlDecode(gvrow.Cells[8].Text); txtRemarks.Text = HttpUtility.HtmlDecode(gvrow.Cells[9].Text); ModalPopupExtender.Show(); } }
protected void productRepeater_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "deleteProduct") { ModalPopupExtender popup = (ModalPopupExtender)e.Item.FindControl("deletePopUp"); HiddenField id = (HiddenField)e.Item.FindControl("productID"); Session["PRODUCTID"] = id.Value; DeleteQuestion.InnerText = "¿Desea elimnar el producto seleccionado?"; popup.Show(); } if (e.CommandName == "EditProduct") { ModalPopupExtender updatePopup = (ModalPopupExtender)e.Item.FindControl("EditPopUp"); HiddenField id = (HiddenField)e.Item.FindControl("productID"); Session["PRODUCTID"] = id.Value; Catalogue prod = new Catalogue(); prod = menuService.GetProductByIDservice(Convert.ToInt32(id.Value)); updateName.Value = prod.Name; updateDescription.Value = prod.Description; updatePrice.Value = prod.Price.ToString(); updateAmount.Value = prod.Quantity.ToString(); updateMessage.InnerText = "Edite el producto. Use los espacios provistos para introducir los nuevos datos."; updatePopup.Show(); } }
protected void Click_btn_img_ver(object sender, EventArgs e) { ModalPopupExtender mpe_ver = RadPanelBar_menu.FindChildByValue <RadPanelItem>("filtro").FindControl("mpe_ver") as ModalPopupExtender; cargarParametrosdeXml(); mpe_ver.Show(); }
protected void OrderDetailsGridView_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if ((e.Row.RowState & DataControlRowState.Edit) == 0) { string rowPostbackArguments = string.Format("Edit${0}", e.Row.RowIndex); string postbackCall = this.Page.ClientScript.GetPostBackClientHyperlink(OrderDetailsGridView, rowPostbackArguments); foreach (TableCell cell in e.Row.Cells) { // Onclick is handled in each cell with no command buttons, to turn row to edit mode. if (ShouldAddEditPostbackToCell(cell)) { cell.Attributes.Add("onclick", postbackCall); } } } else { ModalPopupExtender modalPopup = e.Row.FindControl("ProductModalPopupExtender") as ModalPopupExtender; if (modalPopup != null) { // Force postback to the SelectButton on the Ok event of the ModalPopup modalPopup.OnOkScript = this.Page.ClientScript.GetPostBackClientHyperlink(SelectButton, ""); } } } }
protected void SaveMovie_ServerClick(object sender, EventArgs e) { pelicula movie = new pelicula(); movie.nombre = movieName.Value; movie.duracion = movieTime.Value; movie.genero = movieGender.Value; movie.rango_fechas = ""; movie.resumen = movieDescription.Value; movie.foto = "MovieImages/" + fileToSave.FileName; if (movie.nombre != null && movie.duracion != null && movie.genero != null && movie.rango_fechas != null && movie.foto != null) { MovieBusiness movieBusiness = new MovieBusiness(); if (movieBusiness.CreateMovie(movie)) { resultMessage.InnerText = "Película creada con éxito."; ModalPopupExtender.Show(); } else { resultMessage.InnerText = "La película no ha sido creada debido a que se ha producido un error. Intentelo más tarde."; ModalPopupExtender.Show(); } } else { resultMessage.InnerText = "Debe llenar todos los espacios requeridos"; ModalPopupExtender.Show(); } EraseFields(); }
protected void productRepeater_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "deleteProduct") { ModalPopupExtender popup = (ModalPopupExtender)e.Item.FindControl("deletePopUp"); HiddenField id = (HiddenField)e.Item.FindControl("productID"); Session["PRODUCTID"] = id.Value; DeleteQuestion.InnerText = "¿Desea elimnar el producto seleccionado?"; popup.Show(); } if (e.CommandName == "EditProduct") { ModalPopupExtender updatePopup = (ModalPopupExtender)e.Item.FindControl("EditPopUp"); HiddenField id = (HiddenField)e.Item.FindControl("productID"); Session["PRODUCTID"] = id.Value; PreOrderProduct preorderProduct = new PreOrderProduct(); preorderProduct = preorderBusiness.getPreOrderService(Convert.ToInt32(id.Value)); updateName.Value = preorderProduct.Name; updateDescription.Value = preorderProduct.Description; updatePrice.Value = preorderProduct.Price.ToString(); updateDateCreation.Value = preorderProduct.CreateDate; updateDateEnd.Value = preorderProduct.FinalizeDate; updateMessage.InnerText = "Edite el producto. Use los espacios provistos para introducir los nuevos datos."; updatePopup.Show(); } }
/// <summary> /// button clicked for add payment information /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtAddPaymentInformation_Click(object sender, EventArgs e) { onCreditCardProcessing(this, new PaymentInfoEventArgs(PaymentInfoCommandType.Add, new PaymentInformation(), false)); mpPaymentInformation = (ModalPopupExtender)ucPaymentInfoControl.FindControl("ppPaymentInfoControl"); mpPaymentInformation.Show(); }
protected void SendBtn_ServerClick(object sender, EventArgs e) { MailService mail = new MailService(); message.InnerText = mail.SendMessageToAllSuscriptors(ContactSubject.Value, contactSuscriberMessage.Value); ModalPopupExtender.Show(); }
protected void btnUpdateAdmin_ServerClick(object sender, EventArgs e) { //Primero vamos a comparar la contrasena que ingresamos la encriptamos string currentUser = nameAdmin.Text; Administrator admin = new Administrator(currentUser, currentPassToEdit.Value); if (admBusiness.ComparePassword(admin)) { if (newPassEdited.Value.ToString().Equals(PasswordEditRepeat.Value.ToString())) { Administrator admin1 = new Administrator(nameToEdit.Value, admBusiness.EncryptCredentials(newPassEdited.Value)); admBusiness.UpdateAdministrator(admin1); currentPassToEdit.Value = ""; newPassEdited.Value = ""; message.InnerText = "El usuario ha sido actualizado con éxito."; ModalPopupExtender.Show(); } else { message.InnerText = "Las contraseña nuevas no coinciden."; ModalPopupExtender.Show(); } } else { currentPassToEdit.Value = ""; newPassEdited.Value = ""; message.InnerText = "La contraseña actual no es la correcta."; ModalPopupExtender.Show(); } }
protected void CreateBtn_ServerClick(object sender, EventArgs e) { if (username.Value != "" && password.Value != "") { string admin = username.Value; string passw = password.Value; string passRepeat = passwordRepeat.Value; if (passw.ToString() == passRepeat.ToString()) { Administrator adm = new Administrator(admin, passw); admBusiness.AddAdmininstrator(adm); i = 0; adminList = admBusiness.GetAdministrators(); administratorList.DataSource = adminList; administratorList.DataBind(); message.InnerText = "Administrador: " + username.Value + ", contraseña: " + "*********" + " agregado con exito!"; username.Value = ""; password.Value = ""; passwordRepeat.Value = ""; ModalPopupExtender.Show(); } else { message.InnerText = "Las contraseñas no coinciden"; ModalPopupExtender.Show(); } } else { message.InnerText = "Debe llenar los espacios."; ModalPopupExtender.Show(); } }
protected void btnUpdate_Click(object sender, EventArgs e) { int count = 0; foreach (GridViewRow row in ExpenseGrid.Rows) { if (((CheckBox)row.FindControl("checkGrid")).Checked == true) { expenseEntity.ExpenseId = Convert.ToInt32(ExpenseGrid.DataKeys[row.RowIndex].Values["ExpenseID"].ToString()); hdf1.Value = (expenseEntity.ExpenseId).ToString(); receiptBusiness.editRecord(expenseEntity); ModalPopupExtender.Show(); hdf.Value = (expenseEntity.receiptE.ReceiptId).ToString(); txtAmount.Text = (expenseEntity.receiptE.Amount).ToString(); txtComment.Text = expenseEntity.receiptE.Comment; txtDate.Text = (Convert.ToDateTime(expenseEntity.receiptE.ReceiptDate)).ToString("dd/MM/yyyy"); dlCurrency.SelectedValue = (expenseEntity.receiptE.CurrencyTypeId).ToString(); dlExpenseType.SelectedValue = (expenseEntity.receiptE.ExpenseTypeId).ToString(); receiptImage.ImageUrl = "~/Receipt/" + expenseEntity.receiptE.ReceiptPath; receiptImage.AlternateText = expenseEntity.receiptE.ReceiptPath; count++; } } if (count > 1) { ModalPopupExtender.Hide(); } }
protected void administratorList_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "deleteItem") { Label lbl_Id = e.Item.FindControl("lbl_Id_admin") as Label; int id_Admin = Convert.ToInt32(lbl_Id.Text); admin_Info.Text = id_Admin.ToString(); ModalPopupExtender popup = (ModalPopupExtender)e.Item.FindControl("ModalPopupExtender2"); popup.Show(); } if (e.CommandName == "editItem") { ModalPopupExtender popup = (ModalPopupExtender)e.Item.FindControl("ModalPopupExtender3"); Label username = (Label)e.Item.FindControl("lbl_User_admin"); Label id = (Label)e.Item.FindControl("lbl_Id_admin"); int idToUpdate = Convert.ToInt32(id.Text); userLabel.Text = "Nombre de usuario actual"; currentPassLabel.Text = "Digite su contraseña actual"; newPassLabel.Text = "Digite la nueva contraseña"; repeatPassword.Text = "Repita la nueva contraseña"; nameToEdit.Value = username.Text; Admin_ID.Text = idToUpdate.ToString(); popup.Show(); } }
protected void reorderListLocation_ItemCommand(object sender, ReorderListCommandEventArgs e) { Location location; switch (e.CommandName) { case "View": location = Module.LocationGetById(Convert.ToInt32(e.CommandArgument)); imgLocationView.ImageUrl = location.Image; lblLocationName.Text = location.Name; ModalPopupExtender.Show(); break; case "Delete": try { location = Module.LocationGetById(Convert.ToInt32(e.CommandArgument)); Module.Delete(location); GetDataSource(); reorderListLocation.DataBind(); } catch (Exception ex) { ShowError(ex.Message); logger.Error("Delete location error", ex); } break; default: break; } }
private void busca_informativa() { try { lblMensaje.Text = string.Empty; Objinformativa.usuario = SesionUsu.Usu_Nombre; Objinformativa.ejercicio = SesionUsu.Usu_Ejercicio; CNInformativa.Consultar_Observaciones(ref Objinformativa, ref Verificador); if (Verificador == "0") { if (Objinformativa.observaciones.Length > 1) { lblMsg_Observaciones.Text = Objinformativa.observaciones; ModalPopupExtender.Show(); } } else { lblMensaje.Text = Verificador; } } catch (Exception ex) { lblMensaje.Text = ex.Message; } }
protected void rpPackage_OnItemCommand(object source, RepeaterCommandEventArgs e) { if (!(e.CommandName == "openPopup")) { return; } ModalPopupExtender modalPopupExtender = (ModalPopupExtender)e.Item.FindControl("mpPackage"); //RepeaterItem item = (source as Button).NamingContainer as RepeaterItem; //LinkButton button = (LinkButton)item.FindControl("btnClick"); //this.lblError.Text = ""; //if (button.CommandArgument != null) // this.hfPackageID.Value = button.CommandArgument; //this.lblPackageName1.Text = this.lblPackageName.Text = button.ToolTip; //if (!string.IsNullOrEmpty(this.hfPackageID.Value)) //{ // this.objCloudPackageMasterDT = this.objCloudPackageMasterBll.GetDataByCloudPackageID(int.Parse(this.hfPackageID.Value)); // if (this.objCloudPackageMasterDT.Rows.Count > 0) // { // this.objCurrencyMasterDT = this.objCurrencyMasterBll.GetDataByCurrencyID(int.Parse(this.objCloudPackageMasterDT.Rows[0]["CloudPackageCurrency"].ToString())); // this.lblPriceMonth1.Text = this.lblPriceMonth.Text = (string)this.objCurrencyMasterDT.Rows[0]["CurrencySymbol"] + (object)" " + (string)this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceMonthly"]; // this.lblPriceYear1.Text = this.lblPriceYear.Text = (string)this.objCurrencyMasterDT.Rows[0]["CurrencySymbol"] + (object)" " + (string)this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceYearly"]; // } //} modalPopupExtender.Show(); }
protected void Button1_Click1(object sender, EventArgs e) { ModalPopupExtender modal = DetailsView1.FindControl("ModalPopupExtender1") as ModalPopupExtender; Panel pnlObs = DetailsView1.FindControl("Panel2") as Panel; pnlObs.Style["dislplay"] = "block"; modal.Show(); }
/// <summary> /// Create the ModalPopup extender and add it as a child of this control. /// </summary> protected override void CreateChildControls() { base.CreateChildControls(); // Create the extender extender = new ModalPopupExtender(); extender.ID = ID + "_ModalPopupExtender"; //Pass on ModalPopup extender properties of this control to the extender. extender.TargetControlID = ActivateControlID; extender.BackgroundCssClass = BackgroundCss; extender.CancelControlID = CancelControlID; extender.OkControlID = OkControlID; extender.DropShadow = DropShadow; extender.OnOkScript = OnOkScript; extender.PopupControlID = ID; if (! this.DesignMode) { Controls.AddAt(0, extender); } }