• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# SqlDataSourceStatusEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: sourceEmployees_Selected

	protected void sourceEmployees_Selected(object sender, SqlDataSourceStatusEventArgs e)
	{
		if (e.Exception != null)
		{
			// Mask the error with a generic message (for security purposes.)
			lblError.Text = "An exception occured performing the query.";

			// Consider the error handled.
			e.ExceptionHandled = true;
		}
	}
开发者ID:Helen1987,项目名称:edu,代码行数:11,代码来源:SqlDataSourceSimple.aspx.cs


示例17: SqlDataSource1_Updated

 protected void SqlDataSource1_Updated(object sender, SqlDataSourceStatusEventArgs e)
 {
     if (e.Exception == null)
     {
         ShowMessage("Actualizado con éxito");
     }
     else
     {
         ShowMessage("Se ha producido un error al actualizar, la operación fue cancelada");
         e.ExceptionHandled = true;
     }
 }
开发者ID:vvalotto,项目名称:PlataformaNET,代码行数:12,代码来源:Default.aspx.cs


示例18: SqlDataSource1_Deleted

 protected void SqlDataSource1_Deleted(object sender, SqlDataSourceStatusEventArgs e)
 {
     if (e.Exception != null && e.Exception is SqlException)
     {
       SqlException myException = (SqlException)e.Exception;
       if (myException.Number == 547)
       {
     ErrorMessage.Text = @"Sorry, you can't delete this genre because it has associated reviews that you need to delete first.";
     e.ExceptionHandled = true;
       }
     }
 }
开发者ID:evilempire22,项目名称:BegASPNET,代码行数:12,代码来源:Genres.aspx.cs


示例19: dsCaseActivities_Selected

    protected void dsCaseActivities_Selected(object sender, SqlDataSourceStatusEventArgs e)
    {
        if (e.Exception != null)
        {
            //Show error message
            frmCaseDetails.Visible = false;
            lblError.Visible = true;
            lblError.Text = "The database is currently offline";

            //Set the exception handled property so it doesn't bubble-up
            e.ExceptionHandled = true;
        }
    }
开发者ID:williamrobinson90,项目名称:CRM.Admin,代码行数:13,代码来源:case_details.aspx.cs


示例20: SqlDataSource2_Updated

    protected void SqlDataSource2_Updated(object sender, SqlDataSourceStatusEventArgs e)
    {
        if (e.Exception!=null)
        {
            lblResults.Text = "You broke it... why would you do that?";
            lblResults.Text += "<br><br><b> Message: </b> " + e.Exception.Message + "<br><br>";
            lblResults.Text += "<b> Source: </b> " + e.Exception.Source + "<br><br>";
            lblResults.Text += "<b> Stack Trace: </b> " + e.Exception.StackTrace;
            lblResults.ForeColor = System.Drawing.Color.Red;

            e.ExceptionHandled = true;
        }
    }
开发者ID:onyxpatel,项目名称:GublerWeeksRepository,代码行数:13,代码来源:AuthorManager_Exception.aspx.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SqlDataType类代码示例发布时间:2022-05-24
下一篇:
C# SqlDataSourceSelectingEventArgs类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap