protected void Button_Save_Click(object sender, EventArgs e)
    {
        string ls_olduserid = this.txtolduserid.Text;
        string ls_newuserid = this.txtnewuserid.Text;
        if (ls_olduserid != "" && ls_newuserid != "")
        {
            HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();

            string sql = "update hyt_user set hy_userid='" + ls_newuserid + "' where hy_userid='" + ls_olduserid + "'";
            Hyoa_global.ExcuteSQL_USER(sql);
            sql = "update hyt_user set hy_loginuid='" + ls_newuserid + "' where hy_loginuid='" + ls_olduserid + "'";
            Hyoa_global.ExcuteSQL_USER(sql);

            sql = "update hyt_roleuser set hy_userid='" + ls_newuserid + "' where hy_userid='" + ls_olduserid + "'";
            Hyoa_global.ExcuteSQL_BASE(sql);

            sql = "update hyt_flowtacheuser set hy_userid='" + ls_newuserid + "' where hy_userid='" + ls_olduserid + "'";
            Hyoa_global.ExcuteSQL_BASE(sql);

            sql = "update hyt_dbsy set hy_dbrid='" + ls_newuserid + "' where hy_dbrid='" + ls_olduserid + "'";
            Hyoa_global.ExcuteSQL(sql);

            sql = "update hyt_dbsy set hy_fsrid='" + ls_newuserid + "' where hy_fsrid='" + ls_olduserid + "'";
            Hyoa_global.ExcuteSQL(sql);

            sql = "update hyp_flowhistoryinfo_cy set hy_cyrid=replace(hy_cyrid,'" + ls_olduserid + "','" + ls_newuserid + "')  where ','+hy_cyrid+',' like '%," + ls_olduserid + ",%' ";
            Hyoa_global.ExcuteSQL(sql);

            sql = "update hyp_flowhistoryinfo_cl set hy_clrid=replace(hy_clrid,'" + ls_olduserid + "','" + ls_newuserid + "')  where ','+hy_clrid+',' like '%," + ls_olduserid + ",%' ";
            Hyoa_global.ExcuteSQL(sql);

            sql = "update hyp_flowhistoryinfo_cl set hy_cyrid=replace(hy_cyrid,'" + ls_olduserid + "','" + ls_newuserid + "')  where ','+hy_cyrid+',' like '%," + ls_olduserid + ",%'";
            Hyoa_global.ExcuteSQL(sql);

            Response.Write("<script>alert('更改成功');</script>");
        }
    }
Beispiel #2
0
 //执行
 protected void Button_Zx_Click(object sender, EventArgs e)
 {
     string ls_return = "";
     if (txtsql2.Value == "")
     {
         ls_return = "请填写执行语句";
     }
     if (ddldbconn.SelectedValue == "")
     {
         ls_return = "请选择连接";
     }
     HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
     if (ddldbconn.SelectedValue == "base")
     {
         if (Hyoa_global.ExcuteSQL_BASE(txtsql2.Value) == true)
             ls_return = "执行成功";
         else
             ls_return = "执行失败";
     }
     if (ddldbconn.SelectedValue == "pro")
     {
         if (Hyoa_global.ExcuteSQL(txtsql2.Value) == true)
             ls_return = "执行成功";
         else
             ls_return = "执行失败";
     }
     if (ddldbconn.SelectedValue == "user")
     {
         if (Hyoa_global.ExcuteSQL_USER(txtsql2.Value) == true)
             ls_return = "执行成功";
         else
             ls_return = "执行失败";
     }
     lbljg.Text = ls_return;
 }