惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
Security Latest
Security Latest
S
Secure Thoughts
H
Heimdal Security Blog
The Last Watchdog
The Last Watchdog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security Affairs
PCI Perspectives
PCI Perspectives
C
CERT Recently Published Vulnerability Notes
C
CXSECURITY Database RSS Feed - CXSecurity.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
爱范儿
爱范儿
腾讯CDC
P
Privacy & Cybersecurity Law Blog
量子位
T
Threat Research - Cisco Blogs
V
V2EX
S
Schneier on Security
P
Proofpoint News Feed
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
Forbes - Security
Forbes - Security
The Hacker News
The Hacker News
月光博客
月光博客
C
Cybersecurity and Infrastructure Security Agency CISA
Schneier on Security
Schneier on Security
L
LINUX DO - 最新话题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Visual Studio Blog
S
SegmentFault 最新的问题
G
GRAHAM CLULEY
人人都是产品经理
人人都是产品经理
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 叶小钗
罗磊的独立博客
WordPress大学
WordPress大学
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cisco Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tenable Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
W
WeLiveSecurity
V
Vulnerabilities – Threatpost
Last Week in AI
Last Week in AI
Google DeepMind News
Google DeepMind News
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

博客园 - javaca88

SQL高级语法汇总 textaera maxlength - javaca88 - 博客园 聚焦索引与非聚焦索引及其查询效率 zhuan - javaca88 - 博客园 博文阅读密码验证 - 博客园 最经典的实现字符数控制的方案哦!(完善版)(转) JavaScript实际应用:父子页面交互 FormView1 动态传参数 如何取得treeview的节点的checkbox的value值 - javaca88 - 博客园 DetailsView1 动态添加自动列 - javaca88 - 博客园 要用到的代码2 - javaca88 - 博客园 技术网站收录 grid view控件中经常会遇到选择行的问题,怎么才能获得当前行呢 step by step 7 转:C#.Net的常见面试试题 zuo ye 缓冲池 Assembly.Load 获取硬盘序列号 split 正确用法 在SQLSERVER里写了一个Split函数
FormView1.ChangeMode
javaca88 · 2006-11-01 · via 博客园 - javaca88

      protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
    {
      

        GridViewRow selectRow = GridView1.Rows[e.NewSelectedIndex];
    
        string strId = selectRow.Cells[0].Text;

        if (BLL.updatepro.CountNum(strId) == 0)
        {
            Response.Write("<script>alert('没有数据,请添加数据');</script>");
            FormView1.ChangeMode(FormViewMode.Insert);
            
        }
        else
        {
            if (FormView1.CurrentMode != FormViewMode.ReadOnly)
            {
                FormView1.ChangeMode(FormViewMode.ReadOnly);
            }
        }
    }

 /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
   {
  
     
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
   
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e)
    {
        if (e.CommandName == "Edit")
        {
            FormView1.ChangeMode(FormViewMode.Edit);
        }
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void DropDownList6_SelectedIndexChanged(object sender, EventArgs e)
    {
        HiddenField hi = (HiddenField)FormView1.FindControl("eid");
        DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList6");
        hi.Value = dr6.SelectedValue;
        SqlDataSource3.UpdateParameters["creatEmployId"].DefaultValue = hi.Value;
       
      //  Response.Write(SqlDataSource3.InsertParameters[1].DefaultValue);
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void DropDownList7_SelectedIndexChanged(object sender, EventArgs e)
    {
        HiddenField hi = (HiddenField)FormView1.FindControl("eid7");
        DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList7");
        hi.Value = dr6.SelectedValue;
        SqlDataSource3.UpdateParameters[6].DefaultValue = hi.Value;
       
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void DropDownList4_SelectedIndexChanged(object sender, EventArgs e)
    {
        HiddenField hi = (HiddenField)FormView1.FindControl("eid4");
        DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList4");
        hi.Value = dr6.SelectedValue;
        SqlDataSource3.UpdateParameters[7].DefaultValue = hi.Value;
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void SqlDataSource3_Updating(object sender, SqlDataSourceCommandEventArgs e)
    {
       
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void FormView1_PageIndexChanging(object sender, FormViewPageEventArgs e)
    {

    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e)
    {
        if (SqlDataSource3.UpdateParameters[7].DefaultValue == null)
        {
             DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList4");
             SqlDataSource3.UpdateParameters[7].DefaultValue = dr6.Text;
        }

        if (SqlDataSource3.UpdateParameters[6].DefaultValue == null)
        {
            DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList7");
            SqlDataSource3.UpdateParameters[7].DefaultValue = dr6.Text;
        }

        if (SqlDataSource3.UpdateParameters["creatEmployId"].DefaultValue == null)
        {
            DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList6");
            SqlDataSource3.UpdateParameters["creatEmployId"].DefaultValue = dr6.Text;
        }

    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList3");
        SqlDataSource3.InsertParameters[1].DefaultValue = dr6.SelectedValue;
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList2");
        SqlDataSource3.InsertParameters[6].DefaultValue = dr6.SelectedValue;
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void DropDownList5_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList5");
        SqlDataSource3.InsertParameters[7].DefaultValue = dr6.SelectedValue;
    }
    /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
    {
        if (SqlDataSource3.InsertParameters[7].DefaultValue == null)
        {
            DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList5");
            SqlDataSource3.InsertParameters[7].DefaultValue = dr6.Text;
        }

        if (SqlDataSource3.InsertParameters[6].DefaultValue == null)
        {
            DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList2");
            SqlDataSource3.InsertParameters[6].DefaultValue = dr6.Text;
        }

        if (SqlDataSource3.InsertParameters["creatEmployId"].DefaultValue == null)
        {
            DropDownList dr6 = (DropDownList)FormView1.FindControl("DropDownList3");
            SqlDataSource3.InsertParameters["creatEmployId"].DefaultValue = dr6.Text;
        }

    }