本文整理汇总了C#中HyoaClass.Hyoa_global.ExcuteSQL方法的典型用法代码示例。如果您正苦于以下问题:C# HyoaClass.Hyoa_global.ExcuteSQL方法的具体用法?C# HyoaClass.Hyoa_global.ExcuteSQL怎么用?C# HyoaClass.Hyoa_global.ExcuteSQL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HyoaClass.Hyoa_global
的用法示例。
在下文中一共展示了HyoaClass.Hyoa_global.ExcuteSQL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 = "提交成功!";
string ls_insert = "";
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
ls_insert = "insert into hyp_gzlxdhf (id,hy_jsrdocid,hy_fsrdocid,hy_userid,hy_username,hy_deptid,hy_deptname,hy_time,hy_body,hy_ip,hy_ifshow)";
ls_insert += " values ('" + Hyoa_global.GetRandom() + "','" + this.txtid.Value + "','" + this.txtdocid.Value + "','" + this.Session["hyuid"].ToString() + "'";
ls_insert += ",'" + this.Session["hyuname"].ToString() + "','" + this.Session["hydeptid"].ToString() + "','" + this.Session["hydeptname"].ToString() + "'";
ls_insert += ",'" + System.DateTime.Now.ToString() + "','" + this.txthfnr.Text + "','" + HttpContext.Current.Request.UserHostAddress + "','')";
Hyoa_global.ExcuteSQL(ls_insert);
//收件中置为已回复
string ls_update;
ls_update = "update hyp_wjcd set hy_ifyhf='1' where ID='" + this.txtid.Value + "' ";
Hyoa_global.ExcuteSQL(ls_update);
//处理完成后的提示及跳转
Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
}
示例2: btnLogin_Click
protected void btnLogin_Click(object sender, EventArgs e)
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
DataTable dt = Hyoa_tableconfig.GetTables();
string sql = "";
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
//增加字段,先删除再添加
sql = "ALTER TABLE hyc_" + dt.Rows[i]["ID"].ToString();
sql += " ADD hy_clrylist text ";
Hyoa_global.ExcuteSQL(sql);
sql = "ALTER TABLE hyc_" + dt.Rows[i]["ID"].ToString();
sql += " ADD hy_cyrylist text ";
//Hyoa_global.ExcuteSQL(sql); //第一次要执行一下添加字段
//处理数据
sql = "select * from hyc_" + dt.Rows[i]["ID"].ToString();
DataTable dt2 = Hyoa_global.GetDataTable(sql);
if (dt2.Rows.Count > 0)
{
for (int j = 0; j < dt2.Rows.Count; j++)
{
//先置为,
sql = "update hyc_" + dt.Rows[i]["ID"].ToString() + " set hy_clrylist=',',hy_cyrylist=',' where DOCID='" + dt2.Rows[j]["DOCID"].ToString() + "'";
Hyoa_global.ExcuteSQL(sql);
//再根据cl表更新
sql = "select * from hyp_flowhistoryinfo_cl where DOCID='" + dt2.Rows[j]["DOCID"].ToString() + "'";
DataTable dt3 = Hyoa_global.GetDataTable(sql);
if (dt3.Rows.Count > 0)
{
for (int m = 0; m < dt3.Rows.Count; m++)
{
//得到初始值
sql = "select * from hyc_" + dt.Rows[i]["ID"].ToString() + " where DOCID='" + dt2.Rows[j]["DOCID"].ToString() + "'";
DataTable dt4 = Hyoa_global.GetDataTable(sql);
string ls_value = dt4.Rows[0]["hy_clrylist"].ToString() + dt3.Rows[m]["hy_clrid"].ToString() + ",";
sql = "update hyc_" + dt.Rows[i]["ID"].ToString() + " set hy_clrylist='" + ls_value + "',hy_cyrylist=',' where DOCID='" + dt2.Rows[j]["DOCID"].ToString() + "'";
//Response.Write(sql);
Hyoa_global.ExcuteSQL(sql);
}
}
}
}
}
}
Response.Write("更新完成");
}
示例3: Button_Save_Click
protected void Button_Save_Click(object sender, EventArgs e)
{
if (txtsql.Text != "")
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string sql = this.txtsql.Text;
Hyoa_global.ExcuteSQL(sql);
Response.Write("<script>alert('提交成功');window.location='excutesql.aspx'</script>");
}
else
{
Response.Write("<script>alert('请填写SQL语句');window.location='excutesql.aspx'</script>");
}
}
示例4: Button_Save_Click
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>");
}
}
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string ls_fsrid = "";
string ls_fsrname = "";
string ls_jsrid = "";
string ls_jsrname = "";
string ls_content = "";
string ls_id = "";
string ls_txfs = "";
string lssql = "";
string ls_update = "";
lssql = "select * from hyp_wjcd where hy_type='收件' and hy_ifyhf='0' and hy_txstatus='0' ";
DataTable dt = Hyoa_global.GetDataTable(lssql);
if (dt.Rows.Count > 0)
{
for (var i = 0; i < dt.Rows.Count; i++)
{
if (dt.Rows[i]["hy_txfs"].ToString() != "")
{
System.TimeSpan ts = System.DateTime.Parse(dt.Rows[i]["hy_jzsj"].ToString()) - System.DateTime.Parse(System.DateTime.Now.ToString("yyyy-MM-dd"));
int day = ts.Days;
//距离一天且是下午进行提醒
if (day == 1)
{
//string.Compare(DateTime.Now.ToString("HH:mm").ToString(), "11:00") > 0 & string.Compare(DateTime.Now.ToString("HH:mm").ToString(), "13:00") < 0
if (string.Compare(DateTime.Now.ToString("HH:mm").ToString(), "14:00") > 0)
{
ls_fsrid = dt.Rows[i]["hy_fsrid"].ToString();
ls_fsrname = dt.Rows[i]["hy_fsrname"].ToString();
ls_jsrid = dt.Rows[i]["hy_jsrid"].ToString();
ls_jsrname = dt.Rows[i]["hy_jsrname"].ToString();
ls_content = "请尽快办理[工作联系单]-" + dt.Rows[i]["hy_title"].ToString();
ls_id = dt.Rows[i]["ID"].ToString();
ls_txfs = dt.Rows[i]["hy_txfs"].ToString();
hysendxx2(ls_fsrid, ls_fsrname,ls_jsrid, ls_jsrname, ls_content, ls_id, ls_txfs);
ls_update = "update hyp_wjcd set hy_txstatus='1' where hy_type='收件' and ID='" + ls_id + "' ";
Hyoa_global.ExcuteSQL(ls_update);
}
}
}
}
}
}
示例6: btndelinfo_Click
protected void btndelinfo_Click(object sender, EventArgs e)
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
String[] v_uids = this.txtuids.Value.Split(',');
string sql = "";
for (var i = 0; i < v_uids.Length; i++)
{
if (v_uids[i] != "")
{
sql = "update hyc_" + this.txttableid.Value + " set hy_readuserlist=hy_readuserlist+','+'" + Session["hyuid"].ToString() + "' ,hy_readdatelist = hy_readdatelist + ','+'" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "'";
sql += " where DOCID='" + v_uids[i].ToString() + "' and hy_readuserlist+',' not like '%," + Session["hyuid"].ToString() + ",%' ";
Hyoa_global.ExcuteSQL(sql);
}
}
this.txtuids.Value = "";
DataPlay(System.Int32.Parse(this.curpage.Text));
}
示例7: btndelinfo_Click
protected void btndelinfo_Click(object sender, EventArgs e)
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
String[] v_uids = this.txtuids.Value.Split(',');
for(var i=0;i<v_uids.Length;i++)
{
if (v_uids[i] != "")
{
string sql = "delete from hyt_blzt where ID='" + v_uids[i] + "'";
Hyoa_global.ExcuteSQL(sql);
}
}
this.txtuids.Value = "";
//DataPlay(1);
DataPlay(System.Int32.Parse(this.curpage.Text));
}
示例8: DataPlay
private void DataPlay()
{
//hy_json = "{\"success\":true,\"total\":\"60\",\"rows\":[{\"hy_mudelid\":\"111\",\"hy_mudelname\":\"1111\",\"hy_roleid\":\"111111\",\"hy_qqroleid\":\"111111\",\"hy_isenabled\":\"111111\"}]}";
string hy_json = "";
string ls_success = "true"; //调用方法成功
string ls_flag = "0"; //删除失败
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string txtuids = "";
if (this.Request.Form["txtuids"] != null)
txtuids = this.Request.Form["txtuids"].ToString();
String[] v_uids = txtuids.Split(',');
for (var i = 0; i < v_uids.Length; i++)
{
if (v_uids[i] != "")
{
string sql = "delete from hyt_dbsy where ID='" + v_uids[i] + "'";
Hyoa_global.ExcuteSQL(sql);
//生成删除日志 start
string ls_oppcontent = "表名:hyt_dbsy;文档ID:" + v_uids[i] + "被删除。";
HyoaClass.Hyoa_log Hyoa_log = new HyoaClass.Hyoa_log();
Hyoa_log.ID = System.Guid.NewGuid().ToString();
Hyoa_log.hy_createtime = System.DateTime.Now.ToString();
string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (userip == null || userip == "")
{
userip = Request.ServerVariables["REMOTE_ADDR"];
}
Hyoa_log.hy_oppip = userip;
Hyoa_log.hy_opptype = "删除";
Hyoa_log.hy_oppcontent = ls_oppcontent;
Hyoa_log.hy_oppuserid = this.Session["hyuid"].ToString();
Hyoa_log.hy_oppusername = this.Session["hyuname"].ToString();
Hyoa_log.Insert();
//生成删除日志end
ls_flag = "1";
}
}
hy_json = "{\"success\":" + ls_success + ",\"flag\":\"" + ls_flag + "\"}";
Response.Write(hy_json);
}
示例9: btndelinfo_Click
protected void btndelinfo_Click(object sender, EventArgs e)
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (txtmid.Text == "dbsy" || txtmid.Text == "dysy" || txtmid.Text == "ybsy" || txtmid.Text == "yysy")
{
HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
Hyoa_dbsy.ID = this.txtuids.Value;
Hyoa_dbsy.Delete();
}
if (this.Request.QueryString["mid"] == "mail")
{
HyoaClass.Hyoa_mail Hyoa_mail = new HyoaClass.Hyoa_mail();
Hyoa_mail.ID = this.txtuids.Value;
Hyoa_mail.Delete();
}
if (this.Request.QueryString["mid"] == "Mudelrcap")
{
string sql = "delete from hyc_Tablercap where DOCID='" + this.txtuids.Value + "'";
Hyoa_global.ExcuteSQL(sql);
//删除文档时将待办事宜删除start
HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
Hyoa_dbsy.DOCID = this.txtuids.Value;
Hyoa_dbsy.Deletebydocid(this.txtuids.Value);
//删除文档时将待办事宜删除end
}
if (this.Request.QueryString["mid"] == "Mudelgrtxl" || this.Request.QueryString["mid"] == "Mudelgrtxllb" || this.Request.QueryString["mid"] == "Mudeltzgg" || this.Request.QueryString["mid"] == "Mudelgzrz" || this.Request.QueryString["mid"] == "Mudelqjsq")
{
string sql = "delete from hyc_" + this.Request.QueryString["tableid"] + " where DOCID='" + this.txtuids.Value + "'";
Hyoa_global.ExcuteSQL(sql);
}
if (this.Request.QueryString["mid"] == "gwk")
{
string sql = "delete from hyp_gwk where ID='" + this.txtuids.Value + "'";
Hyoa_global.ExcuteSQL(sql);
}
this.txtuids.Value = "";
DataPlay(System.Int32.Parse(this.curpage.Text));
}
示例10: btndelinfo_Click
protected void btndelinfo_Click(object sender, EventArgs e)
{
//HyoaClass.Hyoa_flowmain Hyoa_flowmain = new HyoaClass.Hyoa_flowmain();
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
String[] v_uids = this.txtuids.Value.Split(',');
for (var i = 0; i < v_uids.Length; i++)
{
if (v_uids[i] != "")
{
//Hyoa_flowmain.DOCID = v_uids[i];
//Hyoa_flowmain.Delete();
string lssqldel = "delete hyc_" + this.txttableid.Value + " where DOCID='" + v_uids[i] + "'";
Hyoa_global.ExcuteSQL(lssqldel);
//删除文档时将待办事宜删除start
HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
Hyoa_dbsy.DOCID = v_uids[i];
Hyoa_dbsy.Deletebydocid(v_uids[i]);
//删除文档时将待办事宜删除end
}
}
this.txtuids.Value = "";
DataPlay(System.Int32.Parse(this.curpage.Text));
}
示例11: btndelinfo_Click
protected void btndelinfo_Click(object sender, EventArgs e)
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
String[] v_uids = this.txtuids.Value.Split(',');
for (var i = 0; i < v_uids.Length; i++)
{
if (v_uids[i] != "")
{
//找到字段配置信息
DataTable dt = Hyoa_flowfield.Getflowfield(v_uids[i]);
//删除SQL中的字段
string sql = "ALTER TABLE hyc_" + this.txttableid.Value;
sql += " DROP COLUMN hyc_" + dt.Rows[0]["hy_fieldid"].ToString();
Hyoa_global.ExcuteSQL(sql);
Hyoa_flowfield.ID = v_uids[i];
Hyoa_flowfield.Delete();
}
}
this.txtuids.Value = "";
//DataPlay(1);
DataPlay(System.Int32.Parse(this.curpage.Text));
}
示例12: btndelinfo_Click
protected void btndelinfo_Click(object sender, EventArgs e)
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
String[] v_uids = this.txtuids.Value.Split(',');
string ls_filepath = "";
for (var i = 0; i < v_uids.Length; i++)
{
if (v_uids[i] != "")
{
string sql = "delete from hyc_" + txttableid.Value + " where DOCID='" + v_uids[i] + "'";
Hyoa_global.ExcuteSQL(sql);
//删除文档时将待办事宜删除start
HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
Hyoa_dbsy.DOCID = v_uids[i];
Hyoa_dbsy.Deletebydocid(v_uids[i]);
//删除文档时将待办事宜删除end
//删除文档对应的hyp_flowhistoryinfo_cl hyp_flowhistoryinfo_cy start add by xf 20121016
HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
Hyoa_flowhistoryinfo_cl.DOCID = v_uids[i];
Hyoa_flowhistoryinfo_cl.DeleteByDOCID();
HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy();
Hyoa_flowhistoryinfo_cy.DOCID = v_uids[i];
Hyoa_flowhistoryinfo_cy.DeleteByDOCID();
//删除文档对应的hyp_flowhistoryinfo_cl hyp_flowhistoryinfo_cy end
//删的时候将附件也删除start
HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
DataTable dtfileatt = Hyoa_fileatt.GetfileattByFatherid(v_uids[i]);
if (dtfileatt.Rows.Count > 0)
{
for (int k = 0; k < dtfileatt.Rows.Count; k++)
{
ls_filepath = Server.MapPath("~/") + dtfileatt.Rows[k]["hy_filepath"].ToString();
if (File.Exists(ls_filepath))
{
System.IO.File.Delete(ls_filepath);
}
Hyoa_fileatt.ID = dtfileatt.Rows[k]["ID"].ToString();
Hyoa_fileatt.Delete();
}
}
//删的时候将附件也删除end
//生成删除日志 start
string ls_oppcontent = "表名:hyc_" + txttableid.Value + ";文档ID:" + v_uids[i] + "被删除。";
HyoaClass.Hyoa_log Hyoa_log = new HyoaClass.Hyoa_log();
Hyoa_log.ID = System.Guid.NewGuid().ToString();
Hyoa_log.hy_createtime = System.DateTime.Now.ToString();
string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (userip == null || userip == "")
{
userip = Request.ServerVariables["REMOTE_ADDR"];
}
Hyoa_log.hy_oppip = userip;
Hyoa_log.hy_opptype = "删除";
Hyoa_log.hy_oppcontent = ls_oppcontent;
Hyoa_log.hy_oppuserid = this.Session["hyuid"].ToString();
Hyoa_log.hy_oppusername = this.Session["hyuname"].ToString();
Hyoa_log.Insert();
//生成删除日志end
}
}
this.txtuids.Value = "";
//DataPlay(1);
DataPlay(System.Int32.Parse(this.curpage.Text));
}
示例13: Button_Save_Click
//.........这里部分代码省略.........
Hyoa_flowfield.hy_onblur = flowfielddt.Rows[i]["hy_onblur"].ToString();
Hyoa_flowfield.hy_sqlfield = flowfielddt.Rows[i]["hy_sqlfield"].ToString();
Hyoa_flowfield.hy_class = flowfielddt.Rows[i]["hy_class"].ToString();
Hyoa_flowfield.hy_width = flowfielddt.Rows[i]["hy_width"].ToString();
Hyoa_flowfield.hy_height = flowfielddt.Rows[i]["hy_height"].ToString();
Hyoa_flowfield.hy_tdnums = System.Int32.Parse(flowfielddt.Rows[i]["hy_tdnums"].ToString());
Hyoa_flowfield.hy_config = flowfielddt.Rows[i]["hy_config"].ToString();
Hyoa_flowfield.hy_sort = float.Parse(flowfielddt.Rows[i]["hy_sort"].ToString());
Hyoa_flowfield.hy_wordlimit = System.Int32.Parse(flowfielddt.Rows[i]["hy_wordlimit"].ToString());
Hyoa_flowfield.hy_required = flowfielddt.Rows[i]["hy_required"].ToString();
Hyoa_flowfield.hy_align = flowfielddt.Rows[i]["hy_align"].ToString();
Hyoa_flowfield.hy_ifhiddle = flowfielddt.Rows[i]["hy_ifhiddle"].ToString();
Hyoa_flowfield.hy_ifdbsybt = flowfielddt.Rows[i]["hy_ifdbsybt"].ToString();
Hyoa_flowfield.hy_field1 = flowfielddt.Rows[i]["hy_field1"].ToString();
Hyoa_flowfield.hy_field2 = flowfielddt.Rows[i]["hy_field2"].ToString();
Hyoa_flowfield.hy_field3 = flowfielddt.Rows[i]["hy_field3"].ToString();
Hyoa_flowfield.hy_field4 = flowfielddt.Rows[i]["hy_field4"].ToString();
Hyoa_flowfield.hy_field5 = flowfielddt.Rows[i]["hy_field5"].ToString();
Hyoa_flowfield.Insert();
}
}
#endregion
#region 生成SQL/ORACLE中的表
string sql = "";
if (Session["conntype"].ToString() == "SQL")
{
sql = "select * into hyc_Table" + this.txtmudelid.Text + " from hyc_" + this.ddltableid.SelectedValue + " where 1=0";
}
if (Session["conntype"].ToString() == "ORACLE")
{
sql = "create table hyc_Table" + this.txtmudelid.Text + " as select * from hyc_" + this.ddltableid.SelectedValue + " where 1=2";
}
Hyoa_global.ExcuteSQL(sql);
#endregion
#region 生成列表
DataTable listconfigdt = Hyoa_listconfig.GetlistconfigsbyMudelidAndTableid(this.ddlmudelid.SelectedValue, this.ddltableid.SelectedValue);
//列表ID
string strListId = Hyoa_global.GetRandom();
if (listconfigdt.Rows.Count > 0)
{
Hyoa_listconfig.hy_mudelid = "Mudel" + this.txtmudelid.Text;
Hyoa_listconfig.hy_tableid = "Table" + this.txtmudelid.Text;
Hyoa_listconfig.hy_ifflowdoc = listconfigdt.Rows[0]["hy_ifflowdoc"].ToString();
Hyoa_listconfig.hy_sort = System.Int32.Parse(this.txtno.Value);
Hyoa_listconfig.hy_columnshowid = listconfigdt.Rows[0]["hy_columnshowid"].ToString();
Hyoa_listconfig.hy_columnshow = listconfigdt.Rows[0]["hy_columnshow"].ToString();
Hyoa_listconfig.hy_ifsearch = listconfigdt.Rows[0]["hy_ifsearch"].ToString();
Hyoa_listconfig.hy_ifshowsearch = listconfigdt.Rows[0]["hy_ifshowsearch"].ToString();
Hyoa_listconfig.hy_width = listconfigdt.Rows[0]["hy_width"].ToString();
Hyoa_listconfig.hy_listname = this.txtmudelname.Text;
Hyoa_listconfig.hy_sortfield1 = listconfigdt.Rows[0]["hy_sortfield1"].ToString();
Hyoa_listconfig.hy_sorttype1 = listconfigdt.Rows[0]["hy_sorttype1"].ToString();
Hyoa_listconfig.hy_sortfield2 = listconfigdt.Rows[0]["hy_sortfield2"].ToString();
Hyoa_listconfig.hy_sorttype2 = listconfigdt.Rows[0]["hy_sorttype2"].ToString();
Hyoa_listconfig.hy_sortfield3 = listconfigdt.Rows[0]["hy_sortfield3"].ToString();
Hyoa_listconfig.hy_sorttype3 = listconfigdt.Rows[0]["hy_sorttype3"].ToString();
Hyoa_listconfig.hy_fieldid_fl1 = listconfigdt.Rows[0]["hy_fieldid_fl1"].ToString();
Hyoa_listconfig.hy_fieldname_fl1 = listconfigdt.Rows[0]["hy_fieldname_fl1"].ToString();
Hyoa_listconfig.hy_sql_fl1 = listconfigdt.Rows[0]["hy_sql_fl1"].ToString();
Hyoa_listconfig.hy_fieldid_fl2 = listconfigdt.Rows[0]["hy_fieldid_fl2"].ToString();
Hyoa_listconfig.hy_fieldname_fl2 = listconfigdt.Rows[0]["hy_fieldname_fl2"].ToString();
Hyoa_listconfig.hy_sql_fl2 = listconfigdt.Rows[0]["hy_sql_fl2"].ToString();
Hyoa_listconfig.hy_fieldid_fl3 = listconfigdt.Rows[0]["hy_fieldid_fl3"].ToString();
Hyoa_listconfig.hy_fieldname_fl3 = listconfigdt.Rows[0]["hy_fieldname_fl3"].ToString();
示例14: btndelinfo_my_Click
protected void btndelinfo_my_Click(object sender, EventArgs e)
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
String[] v_uids = this.txtuids.Value.Split(',');
string ls_filepath = "";
for (var i = 0; i < v_uids.Length; i++)
{
if (v_uids[i] != "")
{
//判断是否是当前用户的文档
string sql = "select * from hyc_" + txttableid.Value + " where DOCID='" + v_uids[i] + "'";
DataTable dt_judge = Hyoa_global.GetDataTable(sql);
if (dt_judge.Rows.Count > 0)
{
if (dt_judge.Rows[0]["hy_djrid"].ToString() == Session["hyuid"].ToString())
{
sql = "delete from hyc_" + txttableid.Value + " where DOCID='" + v_uids[i] + "'";
Hyoa_global.ExcuteSQL(sql);
//删除文档时将待办事宜删除start
HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
Hyoa_dbsy.DOCID = v_uids[i];
Hyoa_dbsy.Deletebydocid(v_uids[i]);
//删除文档时将待办事宜删除end
//删除文档对应的hyp_flowhistoryinfo_cl hyp_flowhistoryinfo_cy start add by xf 20121016
HyoaClass.Hyoa_flowhistoryinfo_cl Hyoa_flowhistoryinfo_cl = new HyoaClass.Hyoa_flowhistoryinfo_cl();
Hyoa_flowhistoryinfo_cl.DOCID = v_uids[i];
Hyoa_flowhistoryinfo_cl.DeleteByDOCID();
HyoaClass.Hyoa_flowhistoryinfo_cy Hyoa_flowhistoryinfo_cy = new HyoaClass.Hyoa_flowhistoryinfo_cy();
Hyoa_flowhistoryinfo_cy.DOCID = v_uids[i];
Hyoa_flowhistoryinfo_cy.DeleteByDOCID();
//删除文档对应的hyp_flowhistoryinfo_cl hyp_flowhistoryinfo_cy end
//删的时候将附件也删除start
HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
DataTable dtfileatt = Hyoa_fileatt.GetfileattByFatherid(v_uids[i]);
if (dtfileatt.Rows.Count > 0)
{
for (int k = 0; k < dtfileatt.Rows.Count; k++)
{
ls_filepath = Server.MapPath("~/") + dtfileatt.Rows[k]["hy_filepath"].ToString();
if (File.Exists(ls_filepath))
{
System.IO.File.Delete(ls_filepath);
}
Hyoa_fileatt.ID = dtfileatt.Rows[k]["ID"].ToString();
Hyoa_fileatt.Delete();
}
}
//删的时候将附件也删除end
}
}
}
}
this.txtuids.Value = "";
//DataPlay(1);
DataPlay(System.Int32.Parse(this.curpage.Text));
}
示例15: btndelinfo_Click
protected void btndelinfo_Click(object sender, EventArgs e)
{
HyoaClass.Hyoa_wjcd Hyoa_wjcd = new HyoaClass.Hyoa_wjcd();
String[] v_uids = this.txtuids.Value.Split(',');
for (var i = 0; i < v_uids.Length; i++)
{
if (v_uids[i] != "")
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string ls_fssql = "select * from hyp_wjcd where hy_type='发件' and ID='" + v_uids[i] + "' ";
DataTable dt_fs = Hyoa_global.GetDataTable(ls_fssql);
if (dt_fs.Rows.Count > 0)
{
//得到属于此发件的所有收件
string ls_sjsql = "select * from hyp_wjcd where hy_type='收件' and DOCID='" + dt_fs.Rows[0]["DOCID"].ToString() + "' ";
DataTable dt_sj = Hyoa_global.GetDataTable(ls_sjsql);
if (dt_sj.Rows.Count > 0)
{
for (var j = 0; j < dt_sj.Rows.Count; j++)
{
//删除文档时将收件人的待办事宜删除start
HyoaClass.Hyoa_dbsy Hyoa_dbsy = new HyoaClass.Hyoa_dbsy();
Hyoa_dbsy.DOCID = dt_sj.Rows[j]["ID"].ToString();
Hyoa_dbsy.Deletebydocid(dt_sj.Rows[j]["ID"].ToString());
//删除文档时将收件人的待办事宜删除end
//删除文档时将收件删除start
string ls_sjdel = "delete from hyp_wjcd where ID='" + dt_sj.Rows[j]["ID"].ToString() + "' ";
Hyoa_global.ExcuteSQL(ls_sjdel);
//删除文档时将收件删除end
}
}
}
Hyoa_wjcd.ID = v_uids[i];
Hyoa_wjcd.Delete();
//生成删除日志 start
string ls_oppcontent = "工作联系单(已发送的);文档ID:" + v_uids[i] + "被删除。同时该工作联系单的所有收件已删除。";
HyoaClass.Hyoa_log Hyoa_log = new HyoaClass.Hyoa_log();
Hyoa_log.ID = System.Guid.NewGuid().ToString();
Hyoa_log.hy_createtime = System.DateTime.Now.ToString();
string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (userip == null || userip == "")
{
userip = Request.ServerVariables["REMOTE_ADDR"];
}
Hyoa_log.hy_oppip = userip;
Hyoa_log.hy_opptype = "删除";
Hyoa_log.hy_oppcontent = ls_oppcontent;
Hyoa_log.hy_oppuserid = this.Session["hyuid"].ToString();
Hyoa_log.hy_oppusername = this.Session["hyuname"].ToString();
Hyoa_log.Insert();
//生成删除日志end
}
}
this.txtuids.Value = "";
//DataPlay(1);
DataPlay(System.Int32.Parse(this.curpage.Text));
}