コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!ClientScript.IsStartupScriptRegistered("initialize"))
     {
         Page.ClientScript.RegisterStartupScript(this.GetType(),
                                                 "initialize", "initialize();", true);
     }
     if (!Page.IsPostBack)
     {
     }
 }
コード例 #2
0
    protected void openWindow(string ruta)
    {
        string script = "<script>window.open('" +
                        ruta +
                        "')</script>";

        if (!ClientScript.IsStartupScriptRegistered("Arena -" + lblSelect.Text))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Arena -" + lblSelect.Text, script);
        }
    }
コード例 #3
0
    protected void ButtonVote_Click(object sender, EventArgs e)
    {
        EmployeeVote vote = GetVoteFromUI();

        SaveVote(vote);

        if (!ClientScript.IsStartupScriptRegistered("ShowFinalWindowScript"))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "ShowFinalWindowScript", "showFinalWindow();", true);
        }
    }
コード例 #4
0
        private void PerformInsert()
        {
            string statoChk;

            try
            {
                DocsPaWR.ModelloTrasmissione modello = (DocsPAWA.DocsPaWR.ModelloTrasmissione)Session["Modello"];
                // verifica se è selezionato almeno un utente per ruolo e la corretta cessione dei diritti
                if (controllaInserimentiUtente())
                {
                    foreach (DocsPAWA.DocsPaWR.RagioneDest ragioneDest in modello.RAGIONI_DESTINATARI)
                    {
                        foreach (DocsPAWA.DocsPaWR.MittDest mittDest in ragioneDest.DESTINATARI)
                        {
                            if (!mittDest.CHA_TIPO_URP.Equals("U"))
                            {
                                if (mittDest.UTENTI_NOTIFICA != null && mittDest.UTENTI_NOTIFICA.Length > 0)
                                {
                                    foreach (DocsPAWA.DocsPaWR.UtentiConNotificaTrasm utNot in mittDest.UTENTI_NOTIFICA)
                                    {
                                        statoChk            = this.utenteSelezionato(utNot.ID_PEOPLE, Convert.ToString(mittDest.ID_CORR_GLOBALI));
                                        utNot.FLAG_NOTIFICA = statoChk;
                                        //if (utNot.FLAG_NOTIFICA != "1")
                                        //{
                                        //    statoChk = this.utenteSelezionato(utNot.ID_PEOPLE, Convert.ToString(mittDest.ID_CORR_GLOBALI));
                                        //    utNot.FLAG_NOTIFICA = statoChk;
                                        //}
                                    }
                                }
                            }
                        }
                    }

                    // cessione diritti
                    if (this.utenteAbilitatoACL)
                    {
                        modello = this.impostaCessioneSuModello(modello);
                    }

                    Session.Remove("impostaNotifiche");

                    // chiude la popup
                    this.chiudePopup(this.hd_mode.Value);
                }
            }
            catch
            {
                string jscript = "<script>alert('Errore durante il salvataggio dei dati!'); window.close();</script>";
                if (!ClientScript.IsStartupScriptRegistered("erroreEchiude"))
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "erroreEchiude", jscript);
                }
            }
        }
コード例 #5
0
 /// <summary>
 /// Method to show info message on the screen.
 /// If you want to call this js script multiple times at the same time, please pass unique key name for each call.
 /// </summary>
 /// <param name="message"></param>
 /// <param name="title"></param>
 /// <param name="type"></param>
 /// <param name="key"></param>
 public void ShowNotificationDialog(string message, string title, CommonEnums.NotificationTypes type = CommonEnums.NotificationTypes.None, string key = "__notificationMsg")
 {
     if (!message.IsNullOrWhiteSpace())
     {
         string script = ScriptHelper.GetNotificationDialogScript(message, title, type);
         if (!ClientScript.IsStartupScriptRegistered(key))
         {
             System.Web.UI.ScriptManager.RegisterStartupScript(this.Page, GetType(), key, script, true);
         }
     }
 }
コード例 #6
0
    protected void btnSaveExit_Click1(object sender, EventArgs e)
    {
        string strMessage = string.Empty;
        bool   isSaved    = SaveChangeDetails(false, out strMessage);

        strScript = "<script language=javascript>" + (strMessage != string.Empty?"alert('" + strMessage + "');":string.Empty) + "window.top.close();</script>";
        if (!ClientScript.IsStartupScriptRegistered("clientScript") && isSaved)
        {
            ClientScript.RegisterStartupScript(Page.GetType(), "clientScript", strScript);
        }
    }
コード例 #7
0
ファイル: Default.aspx.cs プロジェクト: rjustesen/Sterling
    protected void lnkView_Click(object sender, EventArgs e)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("<script language=JavaScript id='openit'>");
        sb.Append("window.open('../ReportView.aspx?report=profile&id=" + GetPortfolio().Id + "', '', '');");
        sb.Append("</script>");
        if (!ClientScript.IsStartupScriptRegistered("openit"))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "openit", sb.ToString());
        }
    }
コード例 #8
0
ファイル: PageBase.cs プロジェクト: ZB347954263/RailExam
        private void Page_Load(object sender, System.EventArgs e)
        {
            // 在此处放置用户代码以初始化页面
            if (ShowProcessInfo)
            {
                string strScript = @"
<div id='wait' style='font-weight: bold; font-size: 14px; color: #006600; position: absolute; left: 40%; top: 48%;'>_</div>
<script language=javascript>
wait.innerText = '';
var dots = 0;
var dotmax = 10;

function ShowWait()
{
	var output;
	output = '正在装载页面';
	dots ++;
	if(dots >= dotmax)
	{
		dots = 1;
	}
	for(var x = 0; x < dots; x ++)
	{
		output += '·';
	}
	wait.innerText = output;
}

function StartShowWait()
{
	wait.style.visibility = 'visible';
	window.setInterval('ShowWait()', 1000);
}

function HideWait()
{
	wait.style.visibility = 'hidden';
	window.clearInterval();
}

StartShowWait();
</script>";

                Response.Write(strScript);
                Response.Flush();
                Thread.Sleep(ProcessInfoTimeout);

                if (!ClientScript.IsStartupScriptRegistered("HideWait"))
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "HideWait", "<script language=javascript>HideWait();</script>");
                }
            }
        }
コード例 #9
0
        //[System.Web.Services.WebMethod]
        //public static int setIdViaje(string idViaje)
        //{

        //    return Convert.ToInt32(idViaje);
        //}

        private void RegistrarScript(int id)
        {
            const string ScriptKey = "ScriptKey";

            if (!ClientScript.IsStartupScriptRegistered(this.GetType(), ScriptKey))
            {
                StringBuilder fn = new StringBuilder();
                fn.Append("llenarAutobus(" + id + ");");
                ClientScript.RegisterStartupScript(this.GetType(),
                                                   ScriptKey, fn.ToString(), true);
            }
        }
コード例 #10
0
ファイル: HtmlForum.aspx.cs プロジェクト: 3niman/biketour-1
    public void QuizTest(int CityId)
    {
        #region QuizTest`dc
        StringBuilder sb = new StringBuilder();

        DataTable dt = objAdmin.GetQuizTest(CityId);

        if (dt != null && dt.Rows.Count > 0)
        {
            Decompress(dt.Rows[0]["QuizFile"].ToString());

            sb.Append("<h3>" + dt.Rows[0]["QuizName"].ToString() + "</h3>");
            sb.Append("<table cellpadding='0' cellspacing='0'>");
            sb.Append("<tr>");
            sb.Append("<td align='center' valign='middle'>");

            sb.Append("<iframe id='quiz' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' src='../QuizTests/HtmlQuiz1/index.html' frameborder='0' align='middle' allowfullscreen='true' width='720' height='470'>");

            //sb.Append("<object id='quiz' width='720' height='470' type='text/html' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' data='../QuizTests/HtmlQuiz1/index.html'  align='middle'>");
            //sb.Append("<param name='allowScriptAccess' value='sameDomain' />");
            //sb.Append("<param name='movie' value='../QuizTests/" + dt.Rows[0]["QuizFile"].ToString() + "' />");
            //sb.Append("<param name='movie' value='../QuizTests/HtmlQuiz1/" + "index.html" + "' />");
            //sb.Append("<param name='quality' value='high' />");
            sb.Append("<param name='bgcolor' value='#ffffff' />");
            //sb.Append("<param name='allowFullScreen' value='true' />");
            //  sb.Append("<embed id='embedQuiz' src='../QuizTests/HtmlQuiz1/index.html' bgcolor='#ffffff' width='720' height='470' name='quiz' align='middle' />");
            // sb.Append("<embed id='embedQuiz' src='../QuizTests/" + dt.Rows[0]["QuizFile"].ToString() + "' quality='high' bgcolor='#ffffff' width='720' height='470' name='quiz' align='middle' ");
            //sb.Append(" allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/go/getflashplayer' allowFullScreen='true' />");
            // sb.Append("</object>");
            sb.Append("</iframe>");
            sb.Append("</td>");
            sb.Append("</tr>");
            sb.Append("</table>");

            //  btnQuizNext.Visible = true;

            if (!ClientScript.IsStartupScriptRegistered("JSScript"))
            {
                // ClientScript.RegisterStartupScript(this.GetType(), "JSScript", sb.ToString());
            }
            else
            {
                div_QuizTest.Visible = false;
                sb.Append("<b>" + (string)GetLocalResourceObject("NoQuizCreated") + "</b><br/>" + (string)GetLocalResourceObject("ContactAdmin") + "<br/><br/>");
                btnQuizNext.Visible = false;
            }
            lt_Quiz.Text = sb.ToString();
            sb.Clear();
        }
        #endregion
        sb = null;
    }
コード例 #11
0
        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            if (!ClientScript.IsStartupScriptRegistered("JsFunc_Setsize"))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "JsFunc_Setsize", "Setsize();", true);
            }
            int       fellowshipID = Convert.ToInt32(dpFellowship.SelectedValue);
            DataTable dt           = CobcYouthDAL.GetSpiritGrowPlan(fellowshipID);

            GridViewPlan.DataSource = dt;
            GridViewPlan.DataBind();
            Session["Test_dtmember"] = dt;
        }
        //on initial loading of the page-- load initialize() *This starts the Map from the beginning*
        protected void Page_Load(object sender, EventArgs e)
        {
            Date_Reported_TextBox.Text = Convert.ToString(DateTime.Now);

            if (!ClientScript.IsStartupScriptRegistered("initialize"))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(),
                                                        "initialize", "initialize();", true);
            }
            if (!Page.IsPostBack)
            {
            }
        }
コード例 #13
0
        private void RegisterThankYouScript()
        {
            var script = new StringBuilder();

            script.Append(@"<script language='javascript'>");
            script.AppendFormat(@"alert('Thanks for reporting this {0}.');<", _httpStatusCode == 404 ? "missing page" : "exception notice");
            script.Append(@"/script>");

            if (!ClientScript.IsStartupScriptRegistered("JSScript"))
            {
                ClientScript.RegisterStartupScript(GetType(), "JSScript", script.ToString());
            }
        }
コード例 #14
0
    void btnSaveandExit_Click(object sender, EventArgs e)
    {
        try
        {
            if (Page.IsValid)
            {
                string strStartDate = txtStartDate.Text.Trim();



                string strEndDate = txtEndDate.Text.Trim();

                string strRedirURL;
                //strRedirURL = ConfigurationManager.AppSettings["SaveExitRedirURL"].ToString();
                strRedirURL = Master.SaveandExitURL;
                if (!objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_3.Value, Master.CamperUserId))
                {
                    InsertCamperAnswers();
                }
                //Session["FJCID"] = null;
                //Session["ZIPCODE"] = null;
                //Session["STATUS"] = null;
                //Session.Abandon();
                //  Response.Redirect(strRedirURL);
                if (Master.IsCamperUser == "Yes")
                {
                    General oGen = new General();
                    if (oGen.IsApplicationSubmitted(Session["FJCID"].ToString()))
                    {
                        Response.Redirect(strRedirURL);
                    }
                    else
                    {
                        string strScript = "<script language=javascript>openThis(); window.location='" + strRedirURL + "';</script>";
                        if (!ClientScript.IsStartupScriptRegistered("clientScript"))
                        {
                            ClientScript.RegisterStartupScript(Page.GetType(), "clientScript", strScript);
                        }
                    }
                }
                else
                {
                    Response.Redirect(strRedirURL);
                }
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
    }
コード例 #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        RefererValidationProvider.CheckReferer();
        SkinHelper.InitializeSkin(this.Page);

        if (!ClientScript.IsStartupScriptRegistered("personIdKey"))
        {
            string myScript = string.Empty;
            myScript  = "\n<script type=\"text/javascript\" language=\"Javascript\" id=\"EventScriptBlock\">\n";
            myScript += "window.personId='" + BUser.CurrentUser.Person.ID.ToString() + "';";
            myScript += "\n\n </script>";
            Page.ClientScript.RegisterStartupScript(this.GetType(), "personIdKey", myScript, false);
        }
    }
コード例 #16
0
        protected void btnCancel_Click(object sender, EventArgs e)
        {
            var helper = (SearchHelper)Session["SearchHelper"];

            helper.ItemReturn  = null;
            helper.ItemReturns = null;

            string strscript = "parent.$('iframe').dialog('close');";

            if (!ClientScript.IsStartupScriptRegistered("clientScript"))
            {
                ClientScript.RegisterStartupScript(Page.GetType(), "clientScript", strscript, true);
            }
        }
コード例 #17
0
        protected void btnSelect_Click(object sender, EventArgs e)
        {
            var helper = (SearchHelper)Session["SearchHelper"];

            helper.ItemReturns = helper.ViewSource.FindAll(p => p.GetType().GetProperty("Check").GetValue(p, null).ToString().ToLower() == "true");
            //helper.ItemReturns = selectedItems.Cast(helper.SearchType);

            String script = "parent.$('iframe').dialog('close');parent.doPostBack('" + helper.SearchFor + "');";

            if (!ClientScript.IsStartupScriptRegistered("clientScript"))
            {
                ClientScript.RegisterStartupScript(GetType(), "clientScript", script, true);
            }
        }
コード例 #18
0
    //Registra el JavaScript que implementa toda la funcionalidad con el Mapa
    private void RegistrarScript()
    {
        const string ScriptKey = "ScriptKey";

        if (!ClientScript.IsStartupScriptRegistered(this.GetType(), ScriptKey))
        {
            StringBuilder fn = new StringBuilder();
            //fn.Append("function fnAceptar() { ");
            fn.Append("codeLatLng();");
            //fn.Append("}");
            //ClientScript.RegisterStartupScript(this.GetType(), ScriptKey, fn.ToString(), true);
            ScriptManager.RegisterStartupScript(this, typeof(Page), ScriptKey, fn.ToString(), true);
        }
    }
コード例 #19
0
ファイル: Default.aspx.cs プロジェクト: rjustesen/Sterling
    protected void btnNominees_Click(object sender, EventArgs e)
    {
        Label lblId = mdlDlgPrincipal.FindControl("lblId") as Label;

        StringBuilder sb = new StringBuilder();

        sb.Append("<script language=JavaScript id='openit'>");
        sb.Append("window.open('../ReportView.aspx?report=nominees&id=" + GetSchool().Id + "', '', '');");
        sb.Append("</script>");
        if (!ClientScript.IsStartupScriptRegistered("openit"))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "openit", sb.ToString());
        }
    }
コード例 #20
0
    void btnSaveandExit_Click(object sender, EventArgs e)
    {
        string strRedirURL;

        try
        {
            if (Page.IsValid)
            {
                //strRedirURL = ConfigurationManager.AppSettings["SaveExitRedirURL"].ToString();
                strRedirURL = Master.SaveandExitURL;
                if (!objGeneral.IsApplicationReadOnly(hdnFJCID_ParentInfo.Value, Master.CamperUserId))
                {
                    ProcessParentInfoValues();
                }
                //Session["FJCID"] = null;
                //Session["FEDNAME"] = null;
                //Session["ZIPCODE"] = null;
                //Session["FedId"] = null;
                //Session.Abandon();
                // Response.Redirect(strRedirURL, false);

                if (Master.IsCamperUser == "Yes")
                {
                    // string strScript = "<script language=javascript> window.open('../ThankYouMessage.aspx','Message','toolbar=no,status=no,scroll=no,width=800,height=400'); window.location='" + strRedirURL + "';</script>";
                    General oGen = new General();
                    if (oGen.IsApplicationSubmitted(Session["FJCID"].ToString()))
                    {
                        Response.Redirect(strRedirURL);
                    }
                    else
                    {
                        string strScript = "<script language=javascript>openThis(); window.location='" + strRedirURL + "';</script>";
                        if (!ClientScript.IsStartupScriptRegistered("clientScript"))
                        {
                            ClientScript.RegisterStartupScript(Page.GetType(), "clientScript", strScript);
                        }
                    }
                }
                else
                {
                    Response.Redirect(strRedirURL);
                }
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
    }
コード例 #21
0
 protected void gvReturningCamper_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "FJCID")
     {
         string strFJCID = e.CommandArgument.ToString();
         Session["FJCID"] = strFJCID;
         string strRedirURL = "Step1.aspx?check=popup";
         string link        = "Step1.aspx";
         string strScript   = "<script language=javascript>window.close();if (window.opener && !window.opener.closed) { window.opener.location.reload( true ); }  window.location='" + strRedirURL + "'; </script>";
         if (!ClientScript.IsStartupScriptRegistered("clientScript"))
         {
             ClientScript.RegisterStartupScript(Page.GetType(), "clientScript", strScript);
         }
     }
 }
コード例 #22
0
        private void RegistrarScript()
        {
            const string ScriptKey = "ScriptKey";

            if (!ClientScript.IsStartupScriptRegistered(this.GetType(), ScriptKey))
            {
                StringBuilder fn = new StringBuilder();
                fn.Append("function fnAceptar() { ");
                fn.Append("alert('El Contenido del TextBox es:'); ");

                fn.Append("}");
                ClientScript.RegisterStartupScript(this.GetType(),
                                                   ScriptKey, fn.ToString(), true);
            }
        }
コード例 #23
0
        protected void gvwSoftware_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (!e.CommandName.Equals("Page"))
            {
                int index        = Convert.ToInt32(e.CommandArgument);
                int cve_Software = Convert.ToInt32(gvwSoftware.DataKeys[index].Value);
                hdnCve_Software.Value = cve_Software.ToString();

                if (e.CommandName.Equals("InfoGen"))
                {
                    BLSoftware            oblSoftware            = new BLSoftware();
                    BLAsignacion_Software oblAsiganacionSoftware = new BLAsignacion_Software();

                    List <TotalesSoftware> totalesSoftware =
                        oblSoftware.ObtieneTotalesSoftware(cve_Software);

                    grvTotalTipo.DataSource = totalesSoftware;
                    grvTotalTipo.DataBind();

                    gvwDetalle.DataSource = oblAsiganacionSoftware.ObtieneAsignacionSoftware(cve_Software);
                    gvwDetalle.DataBind();

                    InventarioHSC.Model.Software software = oblSoftware.Software(Convert.ToInt32(hdnCve_Software.Value));

                    string xmlData = oblSoftware.xmlDataTotales(totalesSoftware, software.Descripcion);

                    HabilitarBotonAgregarDetalle(true);

                    StringBuilder Clientscript = new StringBuilder();
                    Clientscript.Append("<script>");
                    Clientscript.Append("updateChartTotalesSoftware(\"" + xmlData + "\");");
                    Clientscript.Append("</script>");

                    if (!ClientScript.IsStartupScriptRegistered("udpChart"))
                    {
                        ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "udpChart", Clientscript.ToString(), false);
                    }
                }
                else if (e.CommandName.Equals("Editar"))
                {
                    hdnCve_Software.Value = cve_Software.ToString();
                    lblInfo.Text          = ".: Actualizar :.";
                    CargarDatosSoftware();
                    txtCantidadU.Enabled = false;
                    mpeDatosSoftware.Show();
                }
            }
        }
コード例 #24
0
    void btnSaveandExit_Click(object sender, EventArgs e)
    {
        try
        {
            if (Page.IsValid)
            {
                string strRedirURL;
                strRedirURL = Master.SaveandExitURL;
                if (!objGeneral.IsApplicationReadOnly(hdnFJCIDStep2_3.Value, Master.CamperUserId))
                {
                    var startDate = Convert.ToDateTime(txtStartDate.Text);
                    var endDate   = Convert.ToDateTime(txtEndDate.Text);

                    if (startDate > endDate)
                    {
                        lblMsg.Text = "Error: Start date must be earlier than end date.";
                        return;
                    }
                    InsertCamperAnswers();
                }

                if (Master.IsCamperUser == "Yes")
                {
                    General oGen = new General();
                    if (oGen.IsApplicationSubmitted(Session["FJCID"].ToString()))
                    {
                        Response.Redirect(strRedirURL);
                    }
                    else
                    {
                        string strScript = "<script language=javascript>openThis(); window.location='" + strRedirURL + "';</script>";
                        if (!ClientScript.IsStartupScriptRegistered("clientScript"))
                        {
                            ClientScript.RegisterStartupScript(Page.GetType(), "clientScript", strScript);
                        }
                    }
                }
                else
                {
                    Response.Redirect(strRedirURL);
                }
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
    }
コード例 #25
0
        protected void lvwCart_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            if (e.CommandName == "DeleteItem")
            {
                int proID = Convert.ToInt32(e.CommandArgument);
                CurrentContext.GetCart().RemoveItem(proID);

                ((template_sale_cars)this.Master).UpdateCartLink();
                lvwCart.DataSource = CurrentContext.GetCart().Items;
                lvwCart.DataBind();

                return;
            }

            if (e.CommandName == "UpdateItem")
            {
                int proID = Convert.ToInt32(e.CommandArgument);

                using (SaleCarsEntities ctx = new SaleCarsEntities())
                {
                    Product pro = ctx.Products.Where(p => p.ProID == proID).FirstOrDefault();

                    int quantity = Convert.ToInt32(((TextBox)e.Item.FindControl("txtSL")).Text);

                    if (quantity <= pro.Quantity)
                    {
                        CurrentContext.GetCart().UpdateItem(proID, quantity);

                        ((template_sale_cars)this.Master).UpdateCartLink();
                        lvwCart.DataSource = CurrentContext.GetCart().Items;
                        lvwCart.DataBind();
                    }
                    else
                    {
                        if (ClientScript.IsStartupScriptRegistered("thongbaoUP") == false)
                        {
                            ClientScript.RegisterStartupScript(this.GetType(),
                                                               "thongbaoUP",
                                                               "alert('Bạn chỉ có thể đặt tối đa là: " + pro.Quantity + " chiếc!');",
                                                               true
                                                               );
                        }
                        ((TextBox)e.Item.FindControl("txtSL")).Text = pro.Quantity.ToString();
                    }
                }
                return;
            }
        }
コード例 #26
0
        /// <summary>
        /// Pulsante annulla
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_annulla_Click(object sender, System.EventArgs e)
        {
            Session.Remove("Modello");

            trasmissione.cessione = null;
            TrasmManager.setGestioneTrasmissione(this, trasmissione);
            TrasmManager.setDocTrasmSel(this, trasmissione);
            TrasmManager.setGestioneTrasmissione(this, trasmissione);

            string jscript = "<script language=javascript>window.close();</script>";

            if (!ClientScript.IsStartupScriptRegistered("chiude"))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "chiude", jscript);
            }
        }
コード例 #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!ClientScript.IsStartupScriptRegistered("initialize"))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(),
                                                        "initialize", "initialize();", true);
            }

            if (!IsPostBack)
            {
            }
            if (txtSearchAddress.Text != "")
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "click", "codeAddress();", true);
            }
        }
コード例 #28
0
 public bool ShowMessage(string DiveName, string Message, string MessageType)
 {
     try
     {
         if ((!ClientScript.IsStartupScriptRegistered("regMostrarMensagem")))
         {
             Page.ClientScript.RegisterStartupScript(this.GetType(), "regMostrarMensagem", "MostrarMensagem('" + DiveName + "', '" + Message + "', '" + MessageType + "');", true);
         }
         return(true);
     }
     catch (Exception Ex)
     {
         CommonClasses.SendError("Delivery Challan Register", "ShowMessage", Ex.Message);
         return(false);
     }
 }
コード例 #29
0
    protected void lnkViewTrans_Click(object sender, EventArgs e)
    {
        IList <Attachment> attachments = PortfolioService.GetAttachments(AttachmentType.Portfolio, PortfolioId);
        Attachment         attachment  = attachments.FirstOrDefault(x => x.Category == AttachmentCategory.Transcript);

        if (null != attachment)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<script language=JavaScript id='openit'>");
            sb.Append("window.open('../DocView.aspx?id=" + attachment.Id + "', '', '');");
            sb.Append("</script>");
            if (!ClientScript.IsStartupScriptRegistered("openit"))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "openit", sb.ToString());
            }
        }
    }
コード例 #30
0
    void btnSaveandExit_Click(object sender, EventArgs e)
    {
        string      strRedirURL;
        UserDetails Info;

        try
        {
            Page.Validate();
            if (Page.IsValid)
            {
                //strRedirURL = ConfigurationManager.AppSettings["SaveExitRedirURL"].ToString();
                strRedirURL = Master.SaveandExitURL;
                //to get the user input values as struct object
                Info = getUserInfoStructwithValues();
                ProcessCamperInfo(Info);
                //Session["FJCID"] = null;
                //Session["ZIPCODE"] = null;
                // Session.Abandon();
                //Response.Redirect(strRedirURL);
                if (Master.IsCamperUser == "Yes")
                {
                    General oGen = new General();
                    if (oGen.IsApplicationSubmitted(Session["FJCID"].ToString()))
                    {
                        Response.Redirect(strRedirURL);
                    }
                    else
                    {
                        string strScript = "<script language=javascript>openThis(); window.location='" + strRedirURL + "';</script>";
                        if (!ClientScript.IsStartupScriptRegistered("clientScript"))
                        {
                            ClientScript.RegisterStartupScript(Page.GetType(), "clientScript", strScript);
                        }
                    }
                }
                else
                {
                    Response.Redirect(strRedirURL);
                }
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
    }