本文整理汇总了C#中HyoaClass.Hyoa_global.GetDataTable方法的典型用法代码示例。如果您正苦于以下问题:C# HyoaClass.Hyoa_global.GetDataTable方法的具体用法?C# HyoaClass.Hyoa_global.GetDataTable怎么用?C# HyoaClass.Hyoa_global.GetDataTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HyoaClass.Hyoa_global
的用法示例。
在下文中一共展示了HyoaClass.Hyoa_global.GetDataTable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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("更新完成");
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("../login.aspx");
if (!this.IsPostBack)
{
if (this.Request.QueryString["docid"] != null)
{
string ls_docid = this.Request.QueryString["docid"].ToString();
string ls_tableid = this.Request.QueryString["tableid"].ToString();
//根据文档ID得到记录
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string sql = "select * from hyc_" + ls_tableid + " where DOCID='" + ls_docid + "'";
DataTable dt = Hyoa_global.GetDataTable(sql);
string ls_flowid, ls_flowname, ls_mudelid, ls_curtacheid, ls_curtachename;
if (dt.Rows.Count > 0)
{
ls_flowid = dt.Rows[0]["hy_flowid"].ToString(); //流程ID
ls_flowname = dt.Rows[0]["hy_flowname"].ToString(); //流程名称
ls_mudelid = dt.Rows[0]["hy_mudelid"].ToString(); //模块ID
ls_curtacheid = dt.Rows[0]["hy_curtacheid"].ToString(); //当前环节ID
ls_curtachename = dt.Rows[0]["hy_curtachename"].ToString(); //当前环节名称
dt.Clear();
HyoaClass.Hyoa_cklc Hyoa_cklc_CurrnetDocFlow = new HyoaClass.Hyoa_cklc();
//制作表格式信息
this.txtCurrnetDocFlow.Value = Hyoa_cklc_CurrnetDocFlow.GetCurrnetDocFlow(ls_docid,ls_flowid,ls_flowname,ls_mudelid,ls_curtacheid,ls_curtachename);
//制作流程图
this.txtFlowXML.Value = Hyoa_cklc_CurrnetDocFlow.GetXmlBody(ls_docid, ls_flowid, ls_flowname, ls_mudelid, ls_curtacheid, ls_curtachename);
}
}
}
}
示例3: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string ls_value1 = "";
string ls_value2 = "";
if (this.Request.QueryString["lsvalue1"] != null)
{
ls_value1 = this.Request.QueryString["lsvalue1"].ToString(); //类别
}
if (this.Request.QueryString["lsvalue2"] != null)
{
ls_value2 = this.Request.QueryString["lsvalue2"].ToString(); //年份
}
//Response.Write(ls_value2);
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string lssql = "select hyc_lsh from hyc_TableLsh where hyc_lb='" + ls_value1 + "' and hyc_nf='" + ls_value2 + "'";
//Response.Write(lssql);
DataTable dt = Hyoa_global.GetDataTable(lssql);
if (dt.Rows.Count > 0)
{
this.Response.Write(dt.Rows[0][0].ToString());
}
else
{
this.Response.Write("1");
}
}
示例4: DataPlay
private void DataPlay()
{
//label清空
int count = 1;
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string sqlSelect = " select hyc_gzzq from hyc_Tablezbgl where 1=1 ";
if (this.txt_tjz_s.Value != "")
{
sqlSelect += " and hy_djsj >= '" + this.txt_tjz_s.Value + "' ";
}
if (this.txt_tjz_e.Value != "")
{
sqlSelect += " and hy_djsj <='" + this.txt_tjz_e.Value + "' ";
}
sqlSelect += " GROUP BY hyc_gzzq ";
DataTable dt = Hyoa_global.GetDataTable(sqlSelect);
DataTable dt3;
if(dt.Rows.Count>0)
{
sqlSelect = " select hy_userid,hy_username from hyt_user ";
DataTable dt2 = Hyoa_global.GetDataTable_USER(sqlSelect);
for(int j=0;j<dt.Rows.Count;j++)
{
if(dt2.Rows.Count>0)
{
for (int i = 0; i < dt2.Rows.Count;i++ )
{
sqlSelect = " select * from hyc_Tablezbgl where 1=1 and hyc_gzzq='" + dt.Rows[j]["hyc_gzzq"].ToString() + "' and hy_djrid='" + dt2.Rows[i]["hy_userid"].ToString() + "' ";
dt3 = Hyoa_global.GetDataTable(sqlSelect);
if(dt3.Rows.Count==0)
{
Total++;
lb_show.Text += " <tr height=\"35px\"><td width=\"5%\" class=\"TdcellHead\"><p align=\"center\">" + Total + "</p></td>";
lb_show.Text += "<td width=\"25%\" class=\"TdcellHead\"><p align=\"center\">第" + dt.Rows[j]["hyc_gzzq"].ToString() + "周</p></td>";
lb_show.Text += " <td width=\"30%\" class=\"TdcellHead\"><p align=\"center\"> " + dt2.Rows[i]["hy_username"].ToString() + "</p> </td>";
}
}
}
}
}
}
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string strDwmc = "";
string sqlSelect = "";
if (Request.QueryString["dwmc"] != null)
{
strDwmc = Request.QueryString["dwmc"].ToString();
}
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
List<DateTime> list = new List<DateTime>();
List<string> ls_key = new List<string>();
//合同表单id
string[] arryStr = new string[] { "Tablesyyhfwxy", "Tablejdhazfwht", "TableVODfwxy", "Tableffpdfwht", "TableDVBazfwdght", "Tablejwdsjsxy", "Tablejwdscsxy", "Tablekdjrht", "Tablesjcsfwht", "Tablesjgdcsfwht", "Tablesjtxyyhzxy", "Tablezdyht" };
//将所有表单的登记时间和DOCID Tableid放入集合中
for (int i = 0; i < arryStr.Length; i++)
{
sqlSelect = " select DOCID,hy_mudelid,hy_tableid,hy_djsj from hyc_" + arryStr[i] + " where hyc_jfmc='" + strDwmc + "' order by hy_djsj desc ";
DataTable dt = Hyoa_global.GetDataTable(sqlSelect);
//获取每个表单一个的表单id 表名 和登记时间
if (dt.Rows.Count > 0)
{
list.Add(Convert.ToDateTime(dt.Rows[0]["hy_djsj"].ToString()));
ls_key.Add(dt.Rows[0]["DOCID"].ToString() + "#" + dt.Rows[0]["hy_mudelid"].ToString() + "#" + dt.Rows[0]["hy_tableid"].ToString());
}
}
if ((list != null && list.Count > 0) && (ls_key != null && ls_key.Count > 0))
{
string temp_string = "";
DateTime temp_dateTime;
for (int m = 0; m < list.Count; m++)
{
for (int n = 0; n < list.Count - 1; n++)
{
if (list[n] < list[n + 1])
{
temp_dateTime = list[n];
list[n] = list[n + 1];
list[n + 1] = temp_dateTime;
temp_string = ls_key[n];
ls_key[n] = ls_key[n + 1];
ls_key[n + 1] = temp_string;
}
}
}
Response.Write(ls_key[0]);
}
else
{
Response.Write("空值");
}
}
示例6: Button_Save_Getdt_Click
protected void Button_Save_Getdt_Click(object sender, EventArgs e)
{
if (txtsql_getdt.Text != "")
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string sql = this.txtsql_getdt.Text;
DataTable dt = Hyoa_global.GetDataTable(sql);
lbldt.Text = "";
if (dt.Rows.Count > 0)
{
lbldt.Text = "<table width='100%' border='1'>";
for (int i = 0; i < dt.Rows.Count; i++)
{
if (i == 0)
{
lbldt.Text += "<tr>";
lbldt.Text += "<td>";
lbldt.Text += "序号";
lbldt.Text += "</td>";
for (int k = 0; k < dt.Columns.Count; k++)
{
lbldt.Text += "<td>";
lbldt.Text += dt.Columns[k].ColumnName.ToString();
lbldt.Text += "</td>";
}
lbldt.Text += "</tr>";
}
lbldt.Text += "<tr>";
lbldt.Text += "<td>";
lbldt.Text += (i + 1).ToString();
lbldt.Text += "</td>";
for (int j = 0; j < dt.Columns.Count; j++)
{
lbldt.Text += "<td>";
if (dt.Rows[i][j].ToString() == "")
lbldt.Text += " ";
else
lbldt.Text += dt.Rows[i][j].ToString();
lbldt.Text += "</td>";
}
lbldt.Text += "</tr>";
}
lbldt.Text += "</table>";
}
}
else
{
Response.Write("<script>alert('请填写SQL语句');window.location='excutesql.aspx'</script>");
}
}
示例7: DataPlay
private void DataPlay()
{
string lsydry="";
if (this.Request.QueryString["docid"] != null)
{
string ls_docid = this.Request.QueryString["docid"].ToString();
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string lssql = "select * from hyc_" + Request.QueryString["tableid"].ToString() + " where DOCID='" + ls_docid + "'";
DataTable dt = Hyoa_global.GetDataTable(lssql);
HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
string lsusername = "";
if(dt.Rows.Count>0)
{
lsusername = "";
string[] lvhy_readuserlist;
string[] lvhy_readdatelist;
lvhy_readuserlist = dt.Rows[0]["hy_readuserlist"].ToString().Split(',');
lvhy_readdatelist = dt.Rows[0]["hy_readdatelist"].ToString().Split(',');
for (int j = 1; j < lvhy_readuserlist.Length; j++)
{
lsydry += "<TR height=27px>";
lsydry += "<TD align=\"center\" class=\"Tdcellright\">"+j.ToString()+"</TD>";
DataTable dtuser = Hyoa_user.Getuserallinfobyloginid(lvhy_readuserlist[j]);
if (dtuser.Rows.Count > 0)
{
lsusername = dtuser.Rows[0]["hy_username"].ToString();
}
else
{
lsusername = "系统无此人员";
}
dtuser.Clear();
lsydry += "<TD align=\"center\" class=\"Tdcellright\">" + lsusername + "</TD>";
if (lvhy_readdatelist.Length > j)
{
lsydry += "<TD align=\"center\" class=\"Tdcellright\">" + lvhy_readdatelist[j] + "</TD>";
}
else
{
lsydry += "<TD align=\"center\" class=\"Tdcellright\"> </TD>";
}
lsydry += "</TR>";
}
}
this.lblydry.Text = lsydry;
}
}
示例8: Page_Load
//ntko_class db = new ntko_class();//实例ntko_class类
protected void Page_Load(object sender, EventArgs e)
{
//title = db.getdemotitle();
//attachpath = db.getattachpath();
title = "宁波合益";
newofficetype = Request.QueryString["newofficetype"];
HyoaClass.Hyoa_ntko Hyoa_ntko = new HyoaClass.Hyoa_ntko();
tableid="";
if (this.Request.QueryString["tableid"] != null)
{
tableid = this.Request.QueryString["tableid"].ToString();
}
if (this.Request.QueryString["fatherid"] != null)
{
fatherid = this.Request.QueryString["fatherid"].ToString();
DataTable dtfatherid = Hyoa_ntko.GetntkofileByfother(fatherid);
//this.Response.Write("<script>alert('" + dtfatherid.Rows.Count + "');</script>");
if (dtfatherid.Rows.Count > 0)
{
url = dtfatherid.Rows[0]["fid"].ToString();
DataTable dt = Hyoa_ntko.Getntkofile(url);
if (dt.Rows.Count > 0)
{
fileid = dt.Rows[0]["fid"].ToString();
filetitle = dt.Rows[0]["ftitle"].ToString();
fileother = dt.Rows[0]["fother"].ToString();
filename = dt.Rows[0]["fname"].ToString();
}
}
//隐藏控制(根据fatherid)
string ls_flowid = "";
string ls_currenttacheid = "";
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string sql = "select * from hyc_" + tableid + " where DOCID='" + fatherid + "' ";
DataTable dt_flowmain = Hyoa_global.GetDataTable(sql);
if (dt_flowmain.Rows.Count > 0)
{
if (dt_flowmain.Rows[0]["hy_curtacheid"].ToString() == "**")
ckhjbl.Visible = true;
}
}
}
示例9: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string strDocid = "";
if (Request.QueryString["strDocid"] != null)
{
strDocid = Request.QueryString["strDocid"].ToString();
}
string sqlSelect = " select hyc_dwmc from hyc_Tablekhda where docid='"+strDocid+"' ";
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
DataTable dt = Hyoa_global.GetDataTable(sqlSelect);
if (dt.Rows.Count > 0)
{
Response.Write(dt.Rows[0]["hyc_dwmc"].ToString());
}
}
示例10: 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);
}
}
}
}
}
}
示例11: Button_Save_Click
//查询
protected void Button_Save_Click(object sender, EventArgs e)
{
string ls_return = "";
if (txtsql.Value == "")
{
ls_return = "请填写查询语句";
}
if (ddldbconn.SelectedValue == "")
{
ls_return = "请选择连接";
}
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
DataTable dt = new DataTable();
if (ddldbconn.SelectedValue == "base")
{
dt = Hyoa_global.GetDataTable_BASE(txtsql.Value);
}
if (ddldbconn.SelectedValue == "pro")
{
dt = Hyoa_global.GetDataTable(txtsql.Value);
}
if (ddldbconn.SelectedValue == "user")
{
dt = Hyoa_global.GetDataTable_USER(txtsql.Value);
}
if (dt.Rows.Count > 0)
{
ls_return += "<table border=1 width='100%'>";
ls_return += "<tr>";
for (int j = 0; j < dt.Columns.Count; j++)
{
ls_return += "<td>" + dt.Columns[j].ToString() + "</td>";
}
ls_return += "</tr>";
for (int i = 0; i < dt.Rows.Count; i++)
{
ls_return += "<tr>";
for (int j = 0; j < dt.Columns.Count; j++)
{
ls_return += "<td>"+dt.Rows[i][dt.Columns[j].ToString()].ToString()+"</td>";
}
ls_return += "</tr>";
}
ls_return += "</table>";
}
lbljg.Text = ls_return;
}
示例12: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string sqlSelect = " select * from hyc_Tabletjjzr order by hyc_pxh desc ";
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
DataTable dt = Hyoa_global.GetDataTable(sqlSelect);
if (dt.Rows.Count > 0)
{
string[] arryTjjzd = new string[] { };
string index = DateTime.Now.DayOfWeek.ToString();
int intTjjzd = Convert.ToInt32(dt.Rows[0]["hyc_tjjzd"].ToString());
if (dt.Rows[0]["hyc_tjjzd"].ToString().Contains('+'))
{
intTjjzd = Convert.ToInt32(dt.Rows[0]["hyc_tjjzd"].ToString()) - 1;
}
Response.Write(getJzrq(index, -intTjjzd));
}
}
示例13: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string lv_jfmc = "";
string lsShow = "";
if (Request.QueryString["ls_jfmc"] != null)
{
lv_jfmc = Request.QueryString["ls_jfmc"].ToString();
}
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string sqlSelect = " select * from hyc_Tablekhda where hyc_dwmc='" + lv_jfmc + "'";
DataTable dt = Hyoa_global.GetDataTable(sqlSelect);
if (dt.Rows.Count > 0)
{
lsShow += dt.Rows[0]["hyc_lxr"].ToString() + "#" + dt.Rows[0]["hyc_sj"].ToString() + "#" + dt.Rows[0]["hyc_dwdz"].ToString();
}
Response.Write(lsShow);
}
示例14: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
hyoa = new HyoaClass.Hyoa_global();
string khdz = Request["selectValue"];
if (!string.IsNullOrEmpty(khdz))
{
string khxx = "";
string ls_sql = "SELECT * FROM hyc_Tablekhda WHERE hyc_dwmc = '" + khdz + "'";
DataTable dt= hyoa.GetDataTable(ls_sql);
if (dt.Rows.Count > 0)
{
khxx += ""+dt.Rows[0]["hyc_dwdz"].ToString()+"";
khxx += "|"+dt.Rows[0]["hyc_lxr"].ToString()+"";
khxx += "|"+dt.Rows[0]["hyc_sj"].ToString()+"";
}
Response.Write(khxx);
}
}
示例15: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string SelectValue = "";
string lsShow = "";
if (Request.QueryString["selectValue"] != null)
{
SelectValue = Request.QueryString["selectValue"].ToString();
}
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string sqlSelect= " select hyc_bxlx from hyc_Tablebxlx where hyc_bxfw='"+SelectValue+"' ";
DataTable dt = Hyoa_global.GetDataTable(sqlSelect);
if(dt.Rows.Count>0){
for (int i = 0; i < dt.Rows.Count;i++ )
{
lsShow += dt.Rows[i]["hyc_bxlx"].ToString() + "#";
}
}
Response.Write(lsShow);
}