static public void ShowModal(Control parentControl, string btnCancel, string popupDiv) { Button fakeButton = new Button(); fakeButton.ID = string.Format("btnFakeMpe_{0}", popupDiv); fakeButton.Attributes.Add("style", "display:none;"); parentControl.Controls.Add(fakeButton); AjaxControlToolkit.ModalPopupExtender mpe = new AjaxControlToolkit.ModalPopupExtender(); mpe.DropShadow = true; mpe.ID = "mpe" + popupDiv; mpe.BackgroundCssClass = "modalBackground"; mpe.RepositionMode = AjaxControlToolkit.ModalPopupRepositionMode.None; mpe.CancelControlID = getCancelButton(parentControl, btnCancel); mpe.TargetControlID = fakeButton.ID; mpe.PopupControlID = popupDiv; parentControl.Controls.Add(mpe); mpe.Show(); //Page p = (Page)parentControl.Page; //string controlName = string.Format("'{0}'", mpe.PopupControlID); //string mainctrl = "MainContent_ucModalAddUser_modalAddUser"; //string ctrl = "MainContent_ucModalAddUser_mpeMainContent_ucModalAddUser_modalAddUser_foregroundElement"; //JavascriptHelper.JavascriptOnPostback(p.Master, "test", "showAlert", controlName); }
public void MyBtnHandler(Object sender, EventArgs e) { selectedQuestionPanel.Visible = true; int favQueListID = Request.QueryString["id"] == null ? 0 : Int32.Parse(Request.QueryString["id"]); Button btn = (Button)sender; selectedQuestionPanel.Visible = true; selectedQuestionStatment.Text = btn.CommandName.ToString(); int quesID = Int32.Parse(btn.CommandArgument); QueDao queDaoObj = new QueDao(); List <FavListQueScore> favQueDetailList = queDaoObj.getQuestionDetailsByQuesIDAndAssessmentID(favQueListID, quesID); int sum = 0; foreach (FavListQueScore queScore in favQueDetailList) { sum += queScore.sumScoreValue; } Label4.Text = sum.ToString(); selectedQuestionDetailsView.DataSource = favQueDetailList; selectedQuestionDetailsView.DataBind(); AjaxControlToolkit.ModalPopupExtender ModalPopupExtender = this.Page.FindControl("ctl00$MainContent$MsgBoxModalPopupExtender") as AjaxControlToolkit.ModalPopupExtender; UpdatePanel UpdatePanel = this.Page.FindControl("ctl00$MainContent$UpdatePanelMsgBox") as UpdatePanel; UpdatePanel.Update(); ModalPopupExtender.Show(); }
protected void LinkButton1_Click(object sender, EventArgs e) { GridViewRow row = ((GridViewRow)((LinkButton)sender).NamingContainer); AjaxControlToolkit.ModalPopupExtender mpe = (AjaxControlToolkit.ModalPopupExtender)row.FindControl("mpe"); mpe.Show(); }
public void MyBtnHandler(Object sender, EventArgs e) { Button btn = (Button)sender; int quesID = Int32.Parse(btn.CommandArgument); LogUtils.myLog.Info("Question ID : " + quesID); selectedQuestionPanel.Visible = true; selectedQuestionStatment.Text = btn.CommandName.ToString(); selectedItemList = (Dictionary<String, String>)ViewState["searchCriteria"]; List<QuestionRangedValue> rangedValueList = new List<QuestionRangedValue>(); String selectedAttrOptIdsStr = getSelectedSearchCriteria(rangedValueList); List<QueQuestionScore> questionScoreList = queDaoObj.getQuestionScoreDetailsByID(quesID, rangedValueList, selectedAttrOptIdsStr); int sum = 0; foreach ( QueQuestionScore queScore in questionScoreList) { sum += queScore.sumScoreValue; } Label4.Text = sum.ToString(); selectedQuestionDetailsView.DataSource = questionScoreList; selectedQuestionDetailsView.DataBind(); AjaxControlToolkit.ModalPopupExtender ModalPopupExtender = this.Page.FindControl("ctl00$MainContent$MsgBoxModalPopupExtender") as AjaxControlToolkit.ModalPopupExtender; UpdatePanel UpdatePanel = this.Page.FindControl("ctl00$MainContent$UpdatePanelMsgBox") as UpdatePanel; UpdatePanel.Update(); ModalPopupExtender.Show(); }
private void ShowMessageBox() { AjaxControlToolkit.ModalPopupExtender c = (AjaxControlToolkit.ModalPopupExtender)Master.FindControl("ModalPopupExtenderMessageBox"); if (c != null) { c.Show(); } }
public void MsgBox(string title, Page page) { AjaxControlToolkit.ModalPopupExtender ModalPopupExtender = page.FindControl("ctl00$MainContent$MsgBoxModalPopupExtender") as AjaxControlToolkit.ModalPopupExtender; System.Web.UI.WebControls.Label Label = page.FindControl("ctl00$MainContent$LabelMsgBox") as System.Web.UI.WebControls.Label; string message = "<b>" + title + "</b>"; Label.Text = message; UpdatePanel UpdatePanel = page.FindControl("ctl00$MainContent$UpdatePanelMsgBox") as UpdatePanel; UpdatePanel.Update(); ModalPopupExtender.Show(); }
protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { AjaxControlToolkit.ModalPopupExtender m_panel = this.Master.FindControl("MPopup_Login") as AjaxControlToolkit.ModalPopupExtender; m_panel.Show(); } if (!IsPostBack) { empty_dt(); MyTendersInDrList(); ContractorsInDrList(); Generate_WB_Num(); //Grd1p_load(); } ddl_val = TenderId_inputId.SelectedValue; check_box_status(); }
protected void bindAllcobminationGrid() { pnlAllcombinationSelection.Attributes.Add("style", "display"); AjaxControlToolkit.ModalPopupExtender modalPop = new AjaxControlToolkit.ModalPopupExtender(); modalPop.ID = "Modalpopupextender1"; modalPop.PopupControlID = "pnlAllcombinationSelection"; modalPop.CancelControlID = "ImageButton2"; this.pnlAllcombinationSelection.Controls.Add(modalPop); modalPop.TargetControlID = "btnBook"; modalPop.Show(); int Tourid = Convert.ToInt32(tourId); dsallcomb = objGitDetail.fetchAllCombination("GET_ALL_COMBITATION", Tourid); gvallcomb.DataSource = dsallcomb; gvallcomb.DataBind(); upExRate.Update(); }
protected void BookCheckChanged(object sender, EventArgs e) { try { ViewState["l"] = null; //on each item checked, remove any other items checked Label l = new Label(); RadioButton selectButton = (RadioButton)sender; GridViewRow row = (GridViewRow)selectButton.Parent.Parent; int a = row.RowIndex; foreach (GridViewRow item in gvallcomb.Rows) { RadioButton rb = (RadioButton)item.FindControl("rbselect"); if (rb != sender) { rb.Checked = false; } if (rb.Checked == true) { l = (Label)item.FindControl("lblallcombinationID"); ViewState["l"] = l.Text; } upExRate.Update(); } pnlAllcombinationSelection.Attributes.Add("style", "display"); AjaxControlToolkit.ModalPopupExtender modalPop = new AjaxControlToolkit.ModalPopupExtender(); modalPop.ID = "Modalpopupextender1"; modalPop.PopupControlID = "pnlAllcombinationSelection"; modalPop.CancelControlID = "ImageButton2"; this.pnlAllcombinationSelection.Controls.Add(modalPop); modalPop.TargetControlID = "btnBook"; modalPop.Show(); upExRate.Update(); } catch (Exception ex) { throw ex; } finally { } }
protected void btnConfirm_click(object sender, EventArgs e) { pnlCompanyRoleSelection.Attributes.Add("style", "display"); txtreconfirmdate.Text = ""; AjaxControlToolkit.ModalPopupExtender modalPop = new AjaxControlToolkit.ModalPopupExtender(); modalPop.ID = "popUp"; modalPop.PopupControlID = "pnlCompanyRoleSelection"; modalPop.TargetControlID = "btnhotelconfirm"; modalPop.CancelControlID = "ImageButton1"; this.pnlCompanyRoleSelection.Controls.Add(modalPop); modalPop.Show(); modalPop.TargetControlID = "btnConfirmHotel"; FillHotelConformPopup(); Updateconfirm.Update(); }
protected void btnConfirmHotel_click(object sender, EventArgs e) { bool flag_popup = true; try { System.DateTime today1 = DateTime.ParseExact(txtreconfirmdate.Text, "dd/MM/yyyy", null); System.DateTime today4 = DateTime.ParseExact(txtpayment.Text, "dd/MM/yyyy", null); string result; System.DateTime today = DateTime.Now; today.ToString("MM-dd-yyyy"); string source = today.ToString(); string str1 = source; string[] w = str1.Split('/'); string t = w[2]; string[] t1 = t.Split(' '); if (w[1] == "1" || w[1] == "2" || w[1] == "3" || w[1] == "4" || w[1] == "5" || w[1] == "6" || w[1] == "7" || w[1] == "8" || w[1] == "9") { if (w[0] == "1" || w[0] == "2" || w[0] == "3" || w[0] == "4" || w[0] == "5" || w[0] == "6" || w[0] == "7" || w[0] == "8" || w[0] == "9") { result = "0" + w[1] + "/" + "0" + w[0] + "/" + t1[0]; } else { result = "0" + w[1] + "/" + w[0] + "/" + t1[0]; } } else { if (w[0] == "1" || w[0] == "2" || w[0] == "3" || w[0] == "4" || w[0] == "5" || w[0] == "6" || w[0] == "7" || w[0] == "8" || w[0] == "9") { result = w[1] + "/" + "0" + w[0] + "/" + t1[0]; } else { result = w[1] + "/" + w[0] + "/" + t1[0]; } } if (DateTime.ParseExact(txtreconfirmdate.Text, "dd/MM/yyyy", null) > DateTime.ParseExact(result, "dd/MM/yyyy", null)) { if (DateTime.ParseExact(txtreconfirmdate.Text, "dd/MM/yyyy", null) < DateTime.ParseExact(Session["FromDate"].ToString(), "dd/MM/yyyy", null)) { flag_popup = true; } else { flag_popup = false; } } else { flag_popup = false; } if (flag_popup == false) { labelerror.Text = "Please enter date between today's date and Tour date"; pnlCompanyRoleSelection.Attributes.Add("style", "display"); txtreconfirmdate.Text = ""; AjaxControlToolkit.ModalPopupExtender modalPop = new AjaxControlToolkit.ModalPopupExtender(); modalPop.ID = "popUp"; modalPop.PopupControlID = "pnlCompanyRoleSelection"; modalPop.TargetControlID = "btnhotelconfirm"; modalPop.CancelControlID = "ImageButton1"; this.pnlCompanyRoleSelection.Controls.Add(modalPop); modalPop.Show(); modalPop.TargetControlID = "btnConfirmHotel"; Updateconfirm.Update(); } else { if (ViewState["Hotel_Name"] != null && ViewState["Room_Type"] != null) { objGitDetail.UpdateHotelReconfirmationDate(int.Parse(tourId), ViewState["Hotel_Name"].ToString(), ViewState["Room_Type"].ToString(), txtreconfirmdate.Text, txtpayment.Text, txtconfirmnumber.Text); // ViewState["Hotel_Name"] = ""; // ViewState["Room_Type"] = ""; txtreconfirmdate.Text = ""; txtpayment.Text = ""; txtconfirmnumber.Text = ""; label63.Text = ""; labelerror.Text = ""; pnlCompanyRoleSelection.Attributes.Add("style", "display:none"); allUnchecked(sender); btnConfirmHotel.Visible = false; InsertReconformationDateToQuoteMaster(); Updateconfirm.Update(); ScriptManager.RegisterClientScriptBlock(this.Page, typeof(string), new Random(123).ToString(), "alert('Hotel Confirmed Successfully.')", true); } } } catch { labelerror.Text = "Enter Date Is not in valid Format"; pnlCompanyRoleSelection.Attributes.Add("style", "display"); txtreconfirmdate.Text = ""; AjaxControlToolkit.ModalPopupExtender modalPop = new AjaxControlToolkit.ModalPopupExtender(); modalPop.ID = "popUp"; modalPop.PopupControlID = "pnlCompanyRoleSelection"; modalPop.TargetControlID = "btnhotelconfirm"; modalPop.CancelControlID = "ImageButton1"; this.pnlCompanyRoleSelection.Controls.Add(modalPop); modalPop.Show(); modalPop.TargetControlID = "btnConfirmHotel"; Updateconfirm.Update(); } }
protected void bindSlabGrid() { pnlSelectSlab.Attributes.Add("style", "display"); AjaxControlToolkit.ModalPopupExtender modalPop = new AjaxControlToolkit.ModalPopupExtender(); modalPop.ID = "Modalpopupextender2"; modalPop.PopupControlID = "pnlSelectSlab"; modalPop.CancelControlID = "ImageButton3"; this.pnlSelectSlab.Controls.Add(modalPop); modalPop.TargetControlID = "btnreconform"; modalPop.Show(); int Tourid = Convert.ToInt32(tourId); DataSet dsslab = objGitDetail.fetchSlabAndCount("GET_SLAB_FROM_GIT_TOUR_SLAB_MASTER", Tourid); gvSelectSlab.DataSource = dsslab; gvSelectSlab.DataBind(); upExRate.Update(); }
protected void btnSave_discount(object sender, EventArgs e) { if (Request["TOURID"] != null && !string.IsNullOrEmpty(Request["TOURID"].ToString()) && Request["QUOTEID"] != null && !string.IsNullOrEmpty(Request["QUOTEID"].ToString())) { if (decimal.Parse(Label27.Text) < decimal.Parse(txtdiscount.Text)) { Label29.Text = "Can not give Discount greater then Invoice Amount"; AjaxControlToolkit.ModalPopupExtender modalPop = new AjaxControlToolkit.ModalPopupExtender(); modalPop.ID = "popUp"; modalPop.PopupControlID = "Paneldicount"; modalPop.TargetControlID = "chkdiscount"; modalPop.DropShadow = true; modalPop.CancelControlID = "ImageButton1"; this.Paneldicount.Controls.Add(modalPop); modalPop.Show(); UpdatePanel_TourDetails.Update(); } else { DataSet dsstatus = objBookingFitStoreProcedure.fetchComboData("FETCH_SALES_ACCOUNT_GL_CODE"); if (dsstatus.Tables[0].Rows.Count != 0) { if (txtdiscount.Text != "") { objBookingFitStoreProcedure.UpdateTourdiscount(txtdiscount.Text, int.Parse(Request["TOURID"].ToString()), int.Parse(Request["QUOTEID"].ToString())); } } SendMail_Ondiscount(); Master.DisplayMessage("Discount Amount Updated Successfully.", "successMessage", 3000); Paneldicount.Attributes.Add("style", "display:none"); UpdatePanel_TourDetails.Update(); } } }
protected void Checked_Changed(object sender, EventArgs e) { if (chkdiscount.Checked == true) { Label29.Text = ""; txtdiscount.Text = ""; DataSet ds = objBookingFitStoreProcedure.GET_QUTED_COST(int.Parse(Request.QueryString["TOURID"].ToString()), int.Parse(Request.QueryString["QUOTEID"].ToString())); Label27.Text = ds.Tables[0].Rows[0][0].ToString(); Paneldicount.Attributes.Add("style", "display"); AjaxControlToolkit.ModalPopupExtender modalPop = new AjaxControlToolkit.ModalPopupExtender(); modalPop.ID = "popUp"; modalPop.PopupControlID = "Paneldicount"; modalPop.TargetControlID = "chkdiscount"; modalPop.DropShadow = true; modalPop.CancelControlID = "ImageButton1"; this.Paneldicount.Controls.Add(modalPop); modalPop.Show(); UpdatePanel_TourDetails.Update(); } }
protected void ClientesGridView_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Ver" && e.CommandArgument != null) { int rowIndex = Convert.ToInt32(e.CommandArgument); List <Entidades.Persona> lista = (List <Entidades.Persona>)ViewState["Personas"]; Entidades.Persona persona = lista[rowIndex]; Entidades.Sesion sesion = (Entidades.Sesion)Session["Sesion"]; RN.Persona.LeerDestinatariosFrecuentes(persona, false, sesion); CUITTextBox.Text = persona.Cuit; if (persona.EsCliente && persona.EsProveedor) { AmbosRadioButton.Checked = true; } if (persona.EsCliente) { ClienteRadioButton.Checked = true; } else { ProveedorRadioButton.Checked = true; } TipoDocDropDownList.SelectedValue = persona.Documento.Tipo.Id; TipoDocDropDownList_SelectedIndexChanged(TipoDocDropDownList, new EventArgs()); if (TipoDocDropDownList.SelectedValue.Equals(new FeaEntidades.Documentos.CUITPais().Codigo.ToString())) { DestinosCuitDropDownList.SelectedValue = persona.Documento.Nro.ToString(); } else { NroDocTextBox.Text = persona.Documento.Nro.ToString(); } RazonSocialTextBox.Text = persona.RazonSocial; Domicilio.Calle = persona.Domicilio.Calle; Domicilio.Nro = persona.Domicilio.Nro; Domicilio.Piso = persona.Domicilio.Piso; Domicilio.Depto = persona.Domicilio.Depto; Domicilio.Manzana = persona.Domicilio.Manzana; Domicilio.Sector = persona.Domicilio.Sector; Domicilio.Torre = persona.Domicilio.Torre; Domicilio.Localidad = persona.Domicilio.Localidad; Domicilio.IdProvincia = persona.Domicilio.Provincia.Id; persona.Domicilio.CodPost = Domicilio.CodPost; Contacto.Nombre = persona.Contacto.Nombre; Contacto.Email = persona.Contacto.Email; Contacto.Telefono = persona.Contacto.Telefono; DatosImpositivos.IdCondIVA = persona.DatosImpositivos.IdCondIVA; DatosImpositivos.IdCondIngBrutos = persona.DatosImpositivos.IdCondIngBrutos; DatosImpositivos.NroIngBrutos = persona.DatosImpositivos.NroIngBrutos; DatosImpositivos.FechaInicioActividades = persona.DatosImpositivos.FechaInicioActividades; DatosIdentificatorios.GLN = persona.DatosIdentificatorios.GLN; DatosIdentificatorios.CodigoInterno = persona.DatosIdentificatorios.CodigoInterno; IdPersonaTextBox.Text = persona.IdPersona; DatosEmailAvisoComprobantePersona.Datos = persona.DatosEmailAvisoComprobantePersona; ListaPrecioDefaultPersona.IdListaPrecioVenta = persona.IdListaPrecioVenta; ListaPrecioDefaultPersona.IdListaPrecioCompra = persona.IdListaPrecioCompra; EmailAvisoVisualizacionTextBox.Text = persona.EmailAvisoVisualizacion; PasswordAvisoVisualizacionTextBox.Text = persona.PasswordAvisoVisualizacion; CUITTextBox.Enabled = false; TipoDocDropDownList.Enabled = false; NroDocTextBox.Enabled = false; DestinosCuitDropDownList.Enabled = false; RazonSocialTextBox.Enabled = false; Domicilio.Enabled = false; Contacto.Enabled = false; DatosImpositivos.Enabled = false; DatosIdentificatorios.Enabled = false; IdPersonaTextBox.Enabled = false; DatosEmailAvisoComprobantePersona.Enabled = false; ListaPrecioDefaultPersona.Enabled = false; EmailAvisoVisualizacionTextBox.Enabled = false; PasswordAvisoVisualizacionTextBox.Enabled = false; AjaxControlToolkit.ModalPopupExtender modalPopupExtender1 = (AjaxControlToolkit.ModalPopupExtender)ClientesGridView.Rows[rowIndex].FindControl("ModalPopupExtender1"); modalPopupExtender1.Show(); } }
protected void row10_btn_view_onclick(object sender, EventArgs e) { pnlCompanyRoleSelection.Attributes.Add("style", "display"); lblTitleAlert.Text = "PAYMENT DETAILS OF " + row10_drp_invoice.Text; DataSet ds2 = objVouchersStoredProcedure.get_invoice_amount("FETCH_AMOUNT_INVOICE_RECEIPT_VOUCHER_DETAILS", row10_drp_invoice.Text); GridView1.DataSource = ds2; GridView1.DataBind(); AjaxControlToolkit.ModalPopupExtender modalPop = new AjaxControlToolkit.ModalPopupExtender(); modalPop.ID = "popUp"; modalPop.PopupControlID = "pnlCompanyRoleSelection"; modalPop.TargetControlID = "row10_btn_view"; modalPop.DropShadow = true; modalPop.CancelControlID = "ImageButton1"; this.pnlCompanyRoleSelection.Controls.Add(modalPop); modalPop.Show(); updategrid.Update(); }