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

C# WebControls.DetailsViewUpdatedEventArgs类代码示例

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

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



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


示例16: dvwOrderStatus_ItemUpdated

 protected void dvwOrderStatus_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
 {
     gvwOrderStatuses.SelectedIndex = -1;
      gvwOrderStatuses.DataBind();
 }
开发者ID:BGCX261,项目名称:zqerpjohnny-svn-to-git,代码行数:5,代码来源:ManageOrderStatuses.aspx.cs


示例17: UserProfile_ItemUpdated

 protected void UserProfile_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
 {
     SettingsUpdatedMessage.Visible = true;
 }
开发者ID:sanjayshah89,项目名称:SecurityApp,代码行数:4,代码来源:AdditionalUserInfo.aspx.cs


示例18: dvSelectedBook_ItemUpdated

        protected void dvSelectedBook_ItemUpdated( object sender, DetailsViewUpdatedEventArgs e )
        {
            int bookId = (int) dvSelectedBook.DataKey.Value;

            CheckBoxList cbl = dvSelectedBook.FindControl( "cblDVBookThemes" ) as CheckBoxList;
            if( cbl != null )
            {
                List<int> themeIDs = new List<int>();
                foreach( ListItem item in cbl.Items )
                {
                    if( item.Selected )
                        themeIDs.Add( Convert.ToInt32( item.Value ) );
                }

                Book.SetThemes( bookId, themeIDs.ToArray() );
            }

            gvBooks.SelectedIndex = -1;
            gvBooks.DataBind();
        }
开发者ID:Confirmit,项目名称:Portal,代码行数:20,代码来源:Books.aspx.cs


示例19: dvwComment_ItemUpdated

 protected void dvwComment_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
 {
     CancelCurrentEdit();
 }
开发者ID:BGCX261,项目名称:zqerpjohnny-svn-to-git,代码行数:4,代码来源:ManageComments.aspx.cs


示例20: DetailsView1_ItemUpdated

        protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
        {
            if (e.Exception != null)
            {
                lblError.Text = "A database error has occurred. " +
                    "Message: " + e.Exception.Message;
                e.ExceptionHandled = true;
                e.KeepInEditMode = true;
                lblError.Text = DataValidation(e);

                //decimal testfield = 0m;
                //if (!(Decimal.TryParse(e.NewValues["UnitPrice"].ToString(), out testfield)))
                //    lblError.Text = "Unit Price not numeric ";

            }
            else if (e.AffectedRows == 0)
                lblError.Text = "Another user may have updated that product. " +
                    "Please try again. ";
            else
            {
                lblError.Text = "Record was successfully updated. ";
                GridView1.DataBind();
            }
        }
开发者ID:mj9119,项目名称:GridDetailsView,代码行数:24,代码来源:GridAndDetailsView.aspx.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# WebControls.DropDownList类代码示例发布时间:2022-05-26
下一篇:
C# WebControls.DetailsViewInsertedEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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