示例#1
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;
 }
    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>");
        }
    }
 protected void btndelinfo_Click(object sender, EventArgs e)
 {
     HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
     HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
     String[] v_uids = this.txtuids.Value.Split(',');
     for (var i = 0; i < v_uids.Length; i++)
     {
         if (v_uids[i] != "")
         {
             //先删除SQL中的表
             DelSQLTableByTableid(v_uids[i]);
             //删除配置表
             Hyoa_tableconfig.ID = v_uids[i];
             Hyoa_tableconfig.Delete();
             //删除表字段
             string ls_sql = "delete from hyt_flowfield where hy_tableid='"+v_uids[i]+"'";
             Hyoa_global.ExcuteSQL_BASE(ls_sql);
         }
     }
     this.txtuids.Value = "";
     //DataPlay(1);
     DataPlay(System.Int32.Parse(this.curpage.Text));
 }
示例#4
0
 //周报提交控制
 private void Zbtjkz()
 {
     string sqlSelect = " select * from hyc_Tabletjjzr order by hyc_pxh desc ";
     string lsTjjzd = "";
     HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
     DataTable dt = Hyoa_global.GetDataTable(sqlSelect);
     if (dt.Rows.Count > 0)
     {
         lsTjjzd = dt.Rows[0]["hyc_tjjzd"].ToString();
         if (lsTjjzd.Contains("-"))
         {
             lsTjjzd = lsTjjzd.Replace("-", "");
             //更改字段属性
             sqlSelect = " update hyt_flowfield set hy_onclick='WdatePicker({isShowWeek:true,readOnly:true,minDate:''%y-%M-{%d}'',onpicked:function() {$dp.$(''gzzq'').value=$dp.cal.getP(''W'',''WW'');}});hymainajax_getzbjd();' where id='3e062916-45e1-4490-95c5-866a73337991' and hy_tableid='Tablezbgl' ";
         }
         else if (lsTjjzd.Contains("+"))
         {
             lsTjjzd = lsTjjzd.Replace("+", "");
             //更改字段属性
             sqlSelect = " update hyt_flowfield set hy_onclick='WdatePicker({isShowWeek:true,readOnly:true,minDate:''%y-%M-{%d-" + lsTjjzd + "}'',onpicked:function() {$dp.$(''gzzq'').value=$dp.cal.getP(''W'',''WW'');}});hymainajax_getzbjd();' where id='3e062916-45e1-4490-95c5-866a73337991' and hy_tableid='Tablezbgl' ";
         }
         else
         {
             Response.Write("<script>alert('对不起,周报提交截至点填写有误,请联系管理员!');</script>");
         }
         Hyoa_global.ExcuteSQL_BASE(sqlSelect);
     }
     else
     {
         Response.Write("<script>alert('对不起,周报提交截至点未维护,请联系管理员!');</script>");
     }
 }