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


C# WebControls.DetailsViewUpdatedEventArgs类代码示例

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


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

示例1: societaUpdate

        protected void societaUpdate(object sender, DetailsViewUpdatedEventArgs e)
        {
            try
            {
                //quando faccio update per la societa sistemo l'username per l'utente
                string username = e.NewValues["email"].ToString();
                SqlCommand qUp = new SqlCommand();
                qUp.Connection = conn;

                conn.Open();

                qUp.CommandType = CommandType.StoredProcedure;
                qUp.CommandText = "updateUsername";
                qUp.Parameters.Add(new SqlParameter("idSocieta", idSocieta));
                qUp.Parameters.Add(new SqlParameter("username", username));

                qUp.ExecuteNonQuery();

                result.Text = "Società aggiornata correttamente";
                dettaglioUtente.DataBind();
            }
            catch (Exception ex)
            {
                result.Text = "Si è verificato un errore durante la query: " + ex.Message;
            }
        }
开发者ID:caspandre,项目名称:aptportal,代码行数:26,代码来源:GestioneSocieta.aspx.cs

示例2: DetailsView1_ItemUpdated

 protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
 {
     if (e.Exception == null || e.ExceptionHandled)
     {
         Response.Redirect(table.ListActionPath);
     }
 }
开发者ID:dmziryanov,项目名称:ApecAuto,代码行数:7,代码来源:Edit.aspx.cs

示例3: DetailsViewEditItem_ItemUpdated

        protected void DetailsViewEditItem_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
        {
            if (e.Exception == null)
            {

            }
            else
            {
                ShowError(e.Exception);
                e.ExceptionHandled = true;
            }
        }
开发者ID:trifonov-mikhail,项目名称:Site1,代码行数:12,代码来源:PageHtmlEditor.ascx.cs

示例4: dvwWine_ItemUpdated

        /// <summary>
        /// Event fired after update of Wine Details View
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void dvwWine_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
        {
            CheckBoxList cblAttributes = (CheckBoxList)dvwWine.FindControl("cblAttributes");
            if (cblAttributes != null)
            {
                ClearAttributeAssignments(Convert.ToInt32(e.Keys[0]));
                SetAttributeAssignments(cblAttributes, Convert.ToInt32(e.Keys[0]));
            }

            //redirect to the manage wines screen
            Response.Redirect("/GUI/WineDatabase/ManageWines.aspx");
        }
开发者ID:blel,项目名称:ebalit,代码行数:17,代码来源:CreateWine.aspx.cs

示例5: BankAccountDetailsView_ItemUpdated

        protected void BankAccountDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
        {
            UserBL userBL = new UserBL();

            string accountname = userBL.GetBankAccountName();

            if (accountname != null)
            {
                TextBox pe = (TextBox)CompanyDetailsView.FindControl("BankAccountTextBox");
                pe.Text = accountname;

            }
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script", "CloseModal('BodyContent_ModalPanel1');", true);
        }
开发者ID:jasimuddin534,项目名称:jasim_basis,代码行数:14,代码来源:Company.aspx.cs

示例6: dvCustomerSelect_ItemUpdated

 protected void dvCustomerSelect_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         lblDbError.Visible = true;
         lblDbError.Text = "A database error occured. Message: " + e.Exception.Message;
         e.ExceptionHandled = true;
         e.KeepInEditMode = true;
     }
     else if (e.AffectedRows == 0)
     {
         lblDbError.Visible = true;
         lblDbError.Text = "Another user may have updated this entry already";
     }
 }
开发者ID:m-windle,项目名称:Customer-Product-Management,代码行数:15,代码来源:CustomersAdmin.aspx.cs

示例7: CompanyDetailsView_ItemUpdated

        protected void CompanyDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
        {
            long id = 0;
            string value = Convert.ToString(Session["NewCompany"]);
            if (value != "")
                id = int.Parse(value);

            if (id > 0)
            {
                Label1.Text = "Success !</br> <p>Company information has been updated successfully</p>";
                UpdatePanel1.Update();
            }
            else
            {
                Label1.Text = "Error !</br> <p>Company information did not save.</p>";
                UpdatePanel1.Update();
            }
        }
开发者ID:jasimuddin534,项目名称:jasim_basis,代码行数:18,代码来源:CompanySetup.aspx.cs

示例8: DetailsView1_ItemUpdated

        protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
        {
            //Update Available days for the Booking Object
                                    //Get parameters

                                    int BookingObjectId = Convert.ToInt32(DetailsView1.DataKey.Value);

                                    //Delete current information
                                    SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ABSConnectionString"].ToString());
                                    SqlCommand cmd = new SqlCommand("DELETE FROM BookingObjectWorkingDay WHERE BookingObjectId = @BookingObjectId", conn);
                                    cmd.Parameters.AddWithValue("@BookingObjectId", BookingObjectId);

                                    conn.Open();
                                    cmd.ExecuteNonQuery();

                                    GridView AvailableDays = DetailsView1.FindControl("GridView2") as GridView;

                                    //Check Availability for each of the days and add to database
                                    foreach (GridViewRow row in AvailableDays.Rows)
                                    {
                                                if (row.RowType == DataControlRowType.DataRow)
                                                {
                                                            int WorkingDayId = row.RowIndex + 1; //Set Day
                                                            if (((CheckBox)row.FindControl("AvailabilityCheck")).Checked == true)
                                                            {
                                                                        SqlCommand insertCmd = new SqlCommand("INSERT INTO BookingObjectWorkingDay  (BookingObjectId, WorkingDayId) VALUES (@BookingObjectId, @WorkingDayId)", conn);
                                                                        insertCmd.Parameters.AddWithValue("@BookingObjectId", BookingObjectId);
                                                                        insertCmd.Parameters.AddWithValue("@WorkingDayId", WorkingDayId);
                                                                        insertCmd.ExecuteNonQuery();
                                                            }
                                                }
                                    }

                                    conn.Close();
                                    Server.Transfer("Manage_Rooms.aspx");
        }
开发者ID:tah187,项目名称:ABS,代码行数:36,代码来源:Manage_Rooms.aspx.cs

示例9: detailsEmployee_ItemUpdated

 // now we have added the Partial class to Linq generate class,
 // let's try to handle that gracefully
 protected void detailsEmployee_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         // Has to enable EnableUpdate in DetailsView, otherwise, it goes to linqException branch.
         LinqDataSourceValidationException linqException = e.Exception as LinqDataSourceValidationException;
         if (linqException == null)
         {
             lblError.Text = "Data Error";
         }
         else
         {
             // to display all the validation error
             lblError.Text = "";
             foreach (Exception err in linqException.InnerExceptions.Values)
                 lblError.Text += err.Message + "<br />";
         }
         e.ExceptionHandled = true;
     }
     else
     {
         gridEmployees.DataBind();
     }
 }
开发者ID:bq-wang,项目名称:aspnet,代码行数:26,代码来源:LinqDataSource_Form.aspx.cs

示例10: DataValidation

        protected String DataValidation(DetailsViewUpdatedEventArgs e)
        {
            decimal testfield = 0m;
            if (!(Decimal.TryParse(e.NewValues["UnitPrice"].ToString(), out testfield)))
            {
                lblError.ForeColor = System.Drawing.Color.Red;
                lblError.Text = "Unit Price must be numeric ";
            }

            if (!(Decimal.TryParse(e.NewValues["OnHand"].ToString(), out testfield)))
            {
                lblError.ForeColor = System.Drawing.Color.Red;
                lblError.Text = "Inventory On Hand must be numeric ";
            }

            int number;
            if (!(Int32.TryParse(e.NewValues["OnHand"].ToString(), out number)))
            {
                lblError.ForeColor = System.Drawing.Color.Red;
                lblError.Text = "On Hand field must be an Integer ";
            }

            return lblError.Text;
        }
开发者ID:mj9119,项目名称:GridDetailsView,代码行数:24,代码来源:GridAndDetailsView.aspx.cs

示例11: UpdateSparse_ItemUpdated

 protected void UpdateSparse_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
 {
     //      SparesGridView.DataBind();
 }
开发者ID:AlekseyHamov,项目名称:dispokb,代码行数:4,代码来源:Device.aspx.cs

示例12: DetailsView_ItemUpdated

 protected void DetailsView_ItemUpdated(Object sender, DetailsViewUpdatedEventArgs e)
 {
     //        DeviceGridView.DataBind();
 }
开发者ID:AlekseyHamov,项目名称:dispokb,代码行数:4,代码来源:Device.aspx.cs

示例13: DetailsView1_ItemUpdated

 protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
 {
 }
开发者ID:prasadmaduranga,项目名称:Performance-Analyzer,代码行数:3,代码来源:EditProfileView.aspx.cs

示例14: dvArticle_ItemUpdated

 protected void dvArticle_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
 {
     lblStatus.Text = "Статья успешно обновлена.";
     lblStatus.Visible = true;
 }
开发者ID:Nevs12,项目名称:LiveandevSite,代码行数:5,代码来源:AddEditArticle.aspx.cs

示例15: dv_ItemUpdated

 protected void dv_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
 {
     this.gv.SelectedIndex = -1;
     this.gv.DataBind();
 }
开发者ID:gabla5,项目名称:LearningProjects,代码行数:5,代码来源:WorkingWithTheEntityDataSourceControl.aspx.cs


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