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


C# HyoaClass.Hyoa_flowfield.Updateflowid_For_flowinfor方法代码示例

本文整理汇总了C#中HyoaClass.Hyoa_flowfield.Updateflowid_For_flowinfor方法的典型用法代码示例。如果您正苦于以下问题:C# HyoaClass.Hyoa_flowfield.Updateflowid_For_flowinfor方法的具体用法?C# HyoaClass.Hyoa_flowfield.Updateflowid_For_flowinfor怎么用?C# HyoaClass.Hyoa_flowfield.Updateflowid_For_flowinfor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HyoaClass.Hyoa_flowfield的用法示例。


在下文中一共展示了HyoaClass.Hyoa_flowfield.Updateflowid_For_flowinfor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Button_Save_Click

    //保存
    protected void Button_Save_Click(object sender, EventArgs e)
    {
        if (this.Session["hyuid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
        if (this.txtop.Value == "add")
        {
            //先判断是否已经存在
            DataTable dt = Hyoa_flowinfor.Getflowinfor(this.txtid.Text);
            if (dt.Rows.Count > 0)
            {
                Response.Write("<script>alert('该流程已存在,请重新填写!');history.back();</script>");
                return;
            }
            if (this.txtid.Text.Length < 5)
            {
                Response.Write("<script>alert('模块编号长度必须大于4位!');history.back();</script>");
                return;
            }
            if (this.txtid.Text.Substring(0, 4) != "Flow")
            {
                Response.Write("<script>alert('模块编号必须以Flow开头!');history.back();</script>");
                return;
            }
            Hyoa_flowinfor.hy_flowid = this.txtid.Text;
            Hyoa_flowinfor.hy_flowname = this.txtname.Value;
            Hyoa_flowinfor.hy_sort = System.Int32.Parse(this.txtsort.Value);
            Hyoa_flowinfor.hy_mudelid = this.ddlmudelid.SelectedValue;
            Hyoa_flowinfor.Insert();
        }
        else
        {
            Hyoa_flowinfor.hy_flowid = this.txtid.Text;
            Hyoa_flowinfor.hy_flowname = this.txtname.Value;
            Hyoa_flowinfor.hy_sort = System.Int32.Parse(this.txtsort.Value);
            Hyoa_flowinfor.hy_mudelid = this.ddlmudelid.SelectedValue;
            Hyoa_flowinfor.Update();
        }

        //保存时更新选中的模块对应的流程字段(hy_flowid)
        HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
        DataTable dt_update = Hyoa_flowfield.Getflowfieldsbymudelid_For_flowinfor(this.ddlmudelid.SelectedValue);
        if (dt_update.Rows.Count > 0)
        {
            for (var i = 0; i < dt_update.Rows.Count; i++)
            {
                Hyoa_flowfield.Updateflowid_For_flowinfor(this.txtid.Text, dt_update.Rows[i]["id"].ToString());
            }
        }

        //处理完成后的提示及跳转
        if (this.txtifpop.Value == "")
        {
            Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
        }
        else
        {
            Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
        }
    }
开发者ID:wjszxli,项目名称:hyoav10_gdcrm,代码行数:65,代码来源:main_flowinfor.aspx.cs


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