本文整理汇总了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);
}
示例2: srcMessage_Selected
protected void srcMessage_Selected(object sender, SqlDataSourceStatusEventArgs e)
{
if (e.AffectedRows == 0)
{
Response.StatusCode = 404;
}
}
示例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);
}
示例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;
}
}
示例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;
}
示例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();
}
示例7: SqlDataSource1_Selected
protected void SqlDataSource1_Selected(object sender, SqlDataSourceStatusEventArgs e)
{
if(e.Exception != null)
{
Label1.Text = "Data error";
e.ExceptionHandled = true;
}
}
示例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());
}
示例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");
}
}
示例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);
}
示例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;
}
}
示例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");
}
}
示例13: Comment_Selected
protected void Comment_Selected(object sender, SqlDataSourceStatusEventArgs e)
{
if (e.AffectedRows <= 0)
{
NoComment.Visible = true;
}
else
{
NoComment.Visible = false;
}
}
示例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!";
}
}
示例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>";
}