当前位置: 首页>>代码示例>>C#>>正文


C# SqlDataSourceStatusEventArgs类代码示例

本文整理汇总了C#中SqlDataSourceStatusEventArgs的典型用法代码示例。如果您正苦于以下问题:C# SqlDataSourceStatusEventArgs类的具体用法?C# SqlDataSourceStatusEventArgs怎么用?C# SqlDataSourceStatusEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SqlDataSourceStatusEventArgs类属于命名空间,在下文中一共展示了SqlDataSourceStatusEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: sdsProducto_Inserted

    protected void sdsProducto_Inserted(object sender, SqlDataSourceStatusEventArgs e)
    {
        decimal outputValue = (decimal)(e.Command.Parameters)[0].Value;
        String NombreProducto = Convert.ToString((e.Command.Parameters)[1].Value);

        Response.Redirect("./Mantenimientos/vAsociaProductos.aspx?ProductoId=" + outputValue + "&nombreProducto=" + NombreProducto);
    }
开发者ID:royriojas,项目名称:RGEN2,代码行数:7,代码来源:vListaProducto.aspx.cs

示例2: srcMessage_Selected

 protected void srcMessage_Selected(object sender, SqlDataSourceStatusEventArgs e)
 {
     if (e.AffectedRows == 0)
     {
         Response.StatusCode = 404;
     }
 }
开发者ID:jinhaoxia,项目名称:hdu-sqlserver-xcontact,代码行数:7,代码来源:MessageView.aspx.cs

示例3: sdsAseguradoFRM_Inserted

    protected void sdsAseguradoFRM_Inserted(object sender, SqlDataSourceStatusEventArgs e)
    {
        this.hdfAseguradoId.Value = e.Command.Parameters["@personaId"].Value.ToString();
        this.hdfAsegurado.Value = ((TextBox)this.FormView1.FindControl("PrimerNombreTextBox")).Text;

        this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "callParent", " xAddEventListener(window,'load',copyValues);", true);
    }
开发者ID:royriojas,项目名称:RGEN2,代码行数:7,代码来源:vNuevoAseguradoRapido.aspx.cs

示例4: SqlDataSourceModifica_Deleted

 protected void SqlDataSourceModifica_Deleted(object sender, SqlDataSourceStatusEventArgs e)
 {
     if (e.Exception != null)
     {
         LabelErrorMessage.Text = "Impossibile eseguire la cancellazione probabilmente l'emento è in uso dalla tabella Strumenti.\n" + e.Exception.Message;
         e.ExceptionHandled = true;
     }
 }
开发者ID:PaoloMisson,项目名称:GATEvolution,代码行数:8,代码来源:GestioneMarcaConcessionari.aspx.cs

示例5: ds_Enrollment_Updated

 protected void ds_Enrollment_Updated(object sender, SqlDataSourceStatusEventArgs e)
 {
     if (e.AffectedRows > 0)
         lbl_error.Text = "Save Successfully.";
     else
         lbl_error.Text = "Save fail.";
     lbl_error.Visible = true;
 }
开发者ID:sdemdouglas,项目名称:sdecateproject,代码行数:8,代码来源:EnrollmentForm.aspx.cs

示例6: dsSelectedCommunication_Updated

    protected void dsSelectedCommunication_Updated(object sender, SqlDataSourceStatusEventArgs e)
    {
        //once updated, send user back to gridview
        mvCommunications.ActiveViewIndex = 0;

        //update the gridview
        gvCommunications.DataBind();
    }
开发者ID:haglerca,项目名称:CareerFinder,代码行数:8,代码来源:Communications.aspx.cs

示例7: SqlDataSource1_Selected

 protected void SqlDataSource1_Selected(object sender, SqlDataSourceStatusEventArgs e)
 {
     if(e.Exception != null)
     {
         Label1.Text = "Data error";
         e.ExceptionHandled = true;
     }
 }
开发者ID:naynishchaughule,项目名称:ASP.NET,代码行数:8,代码来源:ErrorHandling.aspx.cs

示例8: save_click

    protected void save_click(object sender, SqlDataSourceStatusEventArgs e)
    {
        a_step_2.Disabled = false;
        a_step_3.Disabled = false;
        (fv_contact.FindControl("tb_name") as TextBox).Enabled = false;
        ltrl_changes_submitted.Visible = true;

        Session["unfinishedContact"] = int.Parse(e.Command.Parameters["@contact_id"].Value.ToString());
    }
开发者ID:243,项目名称:ConTAX,代码行数:9,代码来源:NewContact1.aspx.cs

示例9: SDS_Selected

 protected void SDS_Selected(object sender, SqlDataSourceStatusEventArgs e)
 {
     if (e.AffectedRows < 1)
         this.Visible = false;
     else
     {
         base.pg.ScriptOrCssFileImportHead("/scripts/jquery.raty-2.4.5/js/jquery.raty.min.js");
     }
 }
开发者ID:yasinbolat,项目名称:Sanalog-1.5.2-Web,代码行数:9,代码来源:article-detail.ascx.cs

示例10: sdsEliminarAjuste_Updated

    protected void sdsEliminarAjuste_Updated(object sender, SqlDataSourceStatusEventArgs e)
    {
        this.lblMensaje.Text = "El Caso de Ajuste se encuentra ahora Eliminado, ya no podrá acceder a el...";
        /*this.pnlConfirmacion.Style.Remove(HtmlTextWriterStyle.BackgroundColor);
        this.pnlConfirmacion.Style.Add(HtmlTextWriterStyle.BackgroundColor, "RED");*/
        this.pnlConfirmacion.Visible = true;

        this.ClientScript.RegisterStartupScript(this.GetType(), "scriptInicial", "window.onload = function() { cierraLaVentana();}", true);
    }
开发者ID:royriojas,项目名称:RGEN2,代码行数:9,代码来源:vEliminarCasoAjuste.aspx.cs

示例11: SqlDataSource2_Updated

    protected void SqlDataSource2_Updated(object sender, SqlDataSourceStatusEventArgs e)
    {
        // check e to see if an exception has happened
        if(e.Exception != null) {
            Label12.Text = "An error occured when performing the query";

            e.ExceptionHandled = true;
        }
    }
开发者ID:anhany,项目名称:fa15-mis5050-Repository,代码行数:9,代码来源:AuthorManager_Exception.aspx.cs

示例12: SDS_Selected

 protected void SDS_Selected(object sender, SqlDataSourceStatusEventArgs e)
 {
     //eğer kayıt var ise css dosyasını import et
     if (e.AffectedRows < 1)
         this.Visible = false;
     else
     {
         pg.ScriptOrCssFileImportHead("//cdn.jsdelivr.net/jquery.marquee/1.3.1/jquery.marquee.min.js");
     }
 }
开发者ID:yasinbolat,项目名称:Sanalog-1.5.2-Web,代码行数:10,代码来源:latest-news.ascx.cs

示例13: Comment_Selected

 protected void Comment_Selected(object sender, SqlDataSourceStatusEventArgs e)
 {
     if (e.AffectedRows <= 0)
     {
         NoComment.Visible = true;
     }
     else
     {
         NoComment.Visible = false;
     }
 }
开发者ID:The---onE,项目名称:dmtucao.com,代码行数:11,代码来源:ImageText.master.cs

示例14: CheckLogin

 protected void CheckLogin(object sender, SqlDataSourceStatusEventArgs e)
 {
     if (e.AffectedRows > 0)
     {
         FormsAuthentication.RedirectFromLoginPage(Login.UserName, false);
     }
     else
     {
         Login.FailureText = "Wrong user name or password!";
     }
 }
开发者ID:BenjaminUJun,项目名称:MyCakeWorkshop,代码行数:11,代码来源:Login.aspx.cs

示例15: pInsert

    protected void pInsert(object sender, SqlDataSourceStatusEventArgs e)
    {
        if (e.Exception == null)
        {
            mensagemErro.Text = String.Format("<br> Product '{0}' successfully added. <br><br>", e.Command.Parameters["@id_product"].Value);
            ProductsMultiView.ActiveViewIndex = 0;
            LinkProductsManage.CssClass = "selectedview";
            LinkProductsCreate.CssClass = "";

            string id_product_for_image = String.Format("{0}", e.Command.Parameters["@id_product"].Value);

            // verifica o tipo de ficheiro
            // neste exemplo, apenas vamos permitir upload ficheiros do tipo JPG
            if (imageUpload.PostedFile.ContentType == "image/jpg" || imageUpload.PostedFile.ContentType == "image/jpeg" || imageUpload.PostedFile.ContentType == "image/pjpeg")
            {
                // verifica o tamanho do ficheiro
                // neste exemplo, o tamanho do ficheiro tem que ser superior a ZERO e inferior a 512 Kb
                if (imageUpload.PostedFile.ContentLength > 0 && imageUpload.PostedFile.ContentLength < (512 * 1024))
                {
                    try
                    {
                        //imageUpload.PostedFile.SaveAs(Server.MapPath("~/files/products/" + imageUpload.PostedFile.FileName));
                        imageUpload.PostedFile.SaveAs(Server.MapPath("~/files/products/" + id_product_for_image + ".JPG"));
                        mensagemErro.Text += "Ficheiro guardado com sucesso no servidor!<br />";
                        mensagemErro.Text += "File name: " + imageUpload.PostedFile.FileName + "<br>" + imageUpload.PostedFile.ContentLength + " kb<br>" + "Content type: " + imageUpload.PostedFile.ContentType;
                        mensagemErro.CssClass = "ok";
                    }
                    catch (Exception ex)
                    {
                        mensagemErro.Text += "Ocorreu um erro ao tentar guardar no servidor";
                        mensagemErro.Text += "<br />" + ex.Message.ToString();
                        mensagemErro.CssClass = "error";
                    }

                }
                else
                {
                    mensagemErro.Text += "Ficheiro inválido: o tamanho não pode exceder os 512 kB";
                    mensagemErro.CssClass = "error";
                }
            }
            else
            {
                mensagemErro.Text += "Ficheiro inválido/Sem Ficheiro: escolha uma imagem JPG";
                mensagemErro.CssClass = "error";
            }
        }
        else
        {
            mensagemErro.Text = "Unable to add Product. Please try again.";
            e.ExceptionHandled = true;
        }
        mensagemErro.Text += "<br>";
    }
开发者ID:utneon,项目名称:asp.net-mobile-cms,代码行数:54,代码来源:Products.aspx.cs


注:本文中的SqlDataSourceStatusEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。