本文整理汇总了C#中HyoaClass.Hyoa_flowfield.Getflowfieldsbytableid方法的典型用法代码示例。如果您正苦于以下问题:C# HyoaClass.Hyoa_flowfield.Getflowfieldsbytableid方法的具体用法?C# HyoaClass.Hyoa_flowfield.Getflowfieldsbytableid怎么用?C# HyoaClass.Hyoa_flowfield.Getflowfieldsbytableid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HyoaClass.Hyoa_flowfield
的用法示例。
在下文中一共展示了HyoaClass.Hyoa_flowfield.Getflowfieldsbytableid方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 = "复制成功!";
try
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.Hyoa_role Hyoa_role = new HyoaClass.Hyoa_role();
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
HyoaClass.Hyoa_listsearchfield Hyoa_listsearchfield = new HyoaClass.Hyoa_listsearchfield();
HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
HyoaClass.Hyoa_flowtachefield Hyoa_flowtachefield = new HyoaClass.Hyoa_flowtachefield();
HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
HyoaClass.Hyoa_flowwork Hyoa_flowwork = new HyoaClass.Hyoa_flowwork();
#region 生成权限
DataTable dt = Hyoa_role.Getrole("Role" + this.txtmudelid.Text);
if (dt.Rows.Count > 0)
{
Response.Write("<script>alert('该权限编号已存在,请重新填写!');history.back();</script>");
return;
}
else
{
Hyoa_role.hy_roleid = "Role" + this.txtmudelid.Text;
Hyoa_role.hy_rolename = this.txtmudelname.Text;
Hyoa_role.hy_sort = System.Int32.Parse(this.txtno.Value);
Hyoa_role.Insert();
}
#endregion
#region 生成模块
dt = Hyoa_mudel.Getmudel("Mudel" + this.txtmudelid.Text);
if (dt.Rows.Count > 0)
{
Response.Write("<script>alert('该模块编号已存在,请重新填写!');history.back();</script>");
return;
}
else
{
Hyoa_mudel.hy_mudelid = "Mudel" + this.txtmudelid.Text;
Hyoa_mudel.hy_mudelname = this.txtmudelname.Text;
Hyoa_mudel.hy_sort = System.Int32.Parse(this.txtno.Value);
Hyoa_mudel.hy_isenabled = "是";
Hyoa_mudel.hy_roleid = "Role" + this.txtmudelid.Text;
Hyoa_mudel.hy_qqroleid = "Role" + this.txtmudelid.Text;
Hyoa_mudel.Insert();
}
#endregion
#region 生成表单
DataTable tableconfigdt = Hyoa_tableconfig.GetTablesbymudelid(this.ddlmudelid.SelectedValue);
if (tableconfigdt.Rows.Count > 0)
{
Hyoa_tableconfig.ID = "Table" + this.txtmudelid.Text;
Hyoa_tableconfig.hy_mudelid = "Mudel" + this.txtmudelid.Text;
Hyoa_tableconfig.hy_name = this.txtmudelname.Text;
Hyoa_tableconfig.hy_onload = tableconfigdt.Rows[0]["hy_onload"].ToString();
Hyoa_tableconfig.hy_sort = float.Parse(this.txtno.Value);
Hyoa_tableconfig.hy_ifflowdoc = tableconfigdt.Rows[0]["hy_ifflowdoc"].ToString();
Hyoa_tableconfig.hy_ifdisplayall = tableconfigdt.Rows[0]["hy_ifdisplayall"].ToString();
Hyoa_tableconfig.hy_ispuballByflowYB = tableconfigdt.Rows[0]["hy_ispuballByflowYB"].ToString();
Hyoa_tableconfig.hy_tablerole = tableconfigdt.Rows[0]["hy_tablerole"].ToString();
Hyoa_tableconfig.hy_ifcomment = tableconfigdt.Rows[0]["hy_ifcomment"].ToString();
Hyoa_tableconfig.hy_colnum = float.Parse(tableconfigdt.Rows[0]["hy_colnum"].ToString());
Hyoa_tableconfig.hy_field1 = tableconfigdt.Rows[0]["hy_field1"].ToString();
Hyoa_tableconfig.hy_field2 = tableconfigdt.Rows[0]["hy_field2"].ToString();
Hyoa_tableconfig.hy_field3 = tableconfigdt.Rows[0]["hy_field3"].ToString();
Hyoa_tableconfig.hy_field4 = tableconfigdt.Rows[0]["hy_field4"].ToString();
Hyoa_tableconfig.hy_field5 = tableconfigdt.Rows[0]["hy_field5"].ToString();
Hyoa_tableconfig.Insert();
}
#endregion
#region 生成表单字段
int i;
DataTable flowfielddt = Hyoa_flowfield.Getflowfieldsbytableid(this.ddltableid.SelectedValue);
if (flowfielddt.Rows.Count > 0)
{
for (i = 0; i < flowfielddt.Rows.Count; i++)
{
Hyoa_flowfield.ID = Hyoa_global.GetRandom();
Hyoa_flowfield.hy_tableid = "Table" + this.txtmudelid.Text;
Hyoa_flowfield.hy_mudelid = "Mudel" + this.txtmudelid.Text;
Hyoa_flowfield.hy_flowid = "Flow" + this.txtmudelid.Text;
Hyoa_flowfield.hy_fieldid = flowfielddt.Rows[i]["hy_fieldid"].ToString();
Hyoa_flowfield.hy_fieldname = flowfielddt.Rows[i]["hy_fieldname"].ToString();
Hyoa_flowfield.hy_fieldtype = flowfielddt.Rows[i]["hy_fieldtype"].ToString();
Hyoa_flowfield.hy_ifreadonly = flowfielddt.Rows[i]["hy_ifreadonly"].ToString();
Hyoa_flowfield.hy_defaultvaluetype = System.Int32.Parse(flowfielddt.Rows[i]["hy_defaultvaluetype"].ToString());
Hyoa_flowfield.hy_defaultvalue = flowfielddt.Rows[i]["hy_defaultvalue"].ToString();
Hyoa_flowfield.hy_optiontype = System.Int32.Parse(flowfielddt.Rows[i]["hy_optiontype"].ToString());
Hyoa_flowfield.hy_options = flowfielddt.Rows[i]["hy_options"].ToString();
//.........这里部分代码省略.........
示例2: DataPlay
private void DataPlay(int PageNo)
{
//根据表ID和模块ID得到当前传进来的模块是否有流程
HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
DataTable dttableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.txtmudelid.Value, this.txttableid.Value);
//根据表单得到对应的所有字段
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
DataTable dtflowfield = Hyoa_flowfield.Getflowfieldsbytableid(dttableconfig.Rows[0]["ID"].ToString());
//循环所有字段
string ls_flowfield = "";
if (dtflowfield.Rows.Count > 0)
{
for (int i = 0; i < dtflowfield.Rows.Count; i++)
{
string ls_fieldtype = dtflowfield.Rows[i]["hy_fieldtype"].ToString();
if (ls_fieldtype == "文本" || ls_fieldtype == "多行文本" || ls_fieldtype == "文本加按钮" || ls_fieldtype == "多行文本加按钮" || ls_fieldtype == "日期" || ls_fieldtype == "数值" || ls_fieldtype == "对话框列表" || ls_fieldtype == "复选框" || ls_fieldtype == "单选框" || ls_fieldtype == "口令")
{
ls_flowfield += ",a.hyc_" + dtflowfield.Rows[i]["hy_fieldid"].ToString();
}
}
}
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
DataTable dtlist = Hyoa_listconfig.Getlistconfig(this.txtlistid.Value); //列表配置
this.lbdisplaytitle.Text = "";
//得到当前页号
this.curpage.Text = PageNo.ToString();
//---查询条件---开始
string cmdStr_Search = "";
if (txtsearchfields.Text != "")
{
string[] lv_searchfields = txtsearchfields.Text.Split(',');
string[] lv_searchfields_sx = txtsearchfields_sx.Text.Split(',');
for (int i = 0; i < lv_searchfields.Length; i++)
{
string ls_fieldid = lv_searchfields[i].ToString();
string ls_fieldid_sx = lv_searchfields_sx[i].ToString();
string ls_searchtext = "";
if (this.Request.Form[ls_fieldid] != null)
{
ls_searchtext = this.Request.Form[ls_fieldid].ToString();
}
if (ls_searchtext != "")
{
if (ls_fieldid_sx == "0")
{
cmdStr_Search += " and hyc_" + ls_fieldid + " like '%" + ls_searchtext + "%' ";
}
else
{
if (ls_fieldid_sx == "1")
{
if (Session["conntype"].ToString() == "SQL")
{
cmdStr_Search += " and left(CONVERT(varchar, hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ", 120 ) ,10) >= '" + ls_searchtext + "' ";
}
if (Session["conntype"].ToString() == "ORACLE")
{
cmdStr_Search += " and to_char(hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ",'YYYY-MM-DD') >= '" + ls_searchtext + "' ";
}
}
if (ls_fieldid_sx == "2")
{
if (Session["conntype"].ToString() == "SQL")
{
cmdStr_Search += " and left(CONVERT(varchar, hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ", 120 ) ,10) <= '" + ls_searchtext + "' ";
}
if (Session["conntype"].ToString() == "ORACLE")
{
cmdStr_Search += " and to_char(hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ",'YYYY-MM-DD') <= '" + ls_searchtext + "' ";
}
}
if (ls_fieldid_sx == "3")
{
cmdStr_Search += " and hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + " >= " + ls_searchtext + " ";
}
if (ls_fieldid_sx == "4")
{
cmdStr_Search += " and hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + " <= " + ls_searchtext + " ";
}
}
}
}
}
//---查询条件---结束
//---排序---开始
string cmdStr_SearchSort = "";
if (dtlist.Rows[0]["hy_sortfield1"].ToString() != "")
{
if (cmdStr_SearchSort == "")
{
cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield1"].ToString() + " " + dtlist.Rows[0]["hy_sorttype1"].ToString();
}
else
{
//.........这里部分代码省略.........
示例3: 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_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
//判断目的表单ID是否重复
DataTable dt_table = Hyoa_tableconfig.GetTable(txttableidbymd.Text);
if (dt_table.Rows.Count > 0)
{
Response.Write("<script>alert('目的表单ID已存在!');</script>");
return;
}
//插入TABLE配置
DataTable tableconfigdt = Hyoa_tableconfig.GetTablesbymudelid(this.lbmudelidbysource.Text);
if (tableconfigdt.Rows.Count > 0)
{
Hyoa_tableconfig.ID = txttableidbymd.Text;
Hyoa_tableconfig.hy_mudelid = this.ddlmudelidbymd.SelectedValue;
Hyoa_tableconfig.hy_name = this.txttablenamebymd.Text;
Hyoa_tableconfig.hy_onload = tableconfigdt.Rows[0]["hy_onload"].ToString();
Hyoa_tableconfig.hy_sort = float.Parse(this.txttablesortbymd.Text);
Hyoa_tableconfig.hy_ifflowdoc = this.ddlifflowdoc.SelectedValue;
Hyoa_tableconfig.hy_ifdisplayall = tableconfigdt.Rows[0]["hy_ifdisplayall"].ToString();
Hyoa_tableconfig.hy_ispuballByflowYB = tableconfigdt.Rows[0]["hy_ispuballByflowYB"].ToString();
Hyoa_tableconfig.hy_tablerole = tableconfigdt.Rows[0]["hy_tablerole"].ToString();
Hyoa_tableconfig.hy_ifcomment = tableconfigdt.Rows[0]["hy_ifcomment"].ToString();
Hyoa_tableconfig.hy_colnum = float.Parse(tableconfigdt.Rows[0]["hy_colnum"].ToString());
Hyoa_tableconfig.hy_field1 = tableconfigdt.Rows[0]["hy_field1"].ToString();
Hyoa_tableconfig.hy_field2 = tableconfigdt.Rows[0]["hy_field2"].ToString();
Hyoa_tableconfig.hy_field3 = tableconfigdt.Rows[0]["hy_field3"].ToString();
Hyoa_tableconfig.hy_field4 = tableconfigdt.Rows[0]["hy_field4"].ToString();
Hyoa_tableconfig.hy_field5 = tableconfigdt.Rows[0]["hy_field5"].ToString();
Hyoa_tableconfig.Insert();
}
//插入FIELD配置
int i;
DataTable flowfielddt = Hyoa_flowfield.Getflowfieldsbytableid(this.lbtableidbysorce.Text);
if (flowfielddt.Rows.Count > 0)
{
for (i = 0; i < flowfielddt.Rows.Count; i++)
{
Hyoa_flowfield.ID = Hyoa_global.GetRandom();
Hyoa_flowfield.hy_tableid = txttableidbymd.Text;
Hyoa_flowfield.hy_mudelid = this.ddlmudelidbymd.SelectedValue;
Hyoa_flowfield.hy_flowid = this.txtflowidbymd.Text;
Hyoa_flowfield.hy_fieldid = flowfielddt.Rows[i]["hy_fieldid"].ToString();
Hyoa_flowfield.hy_fieldname = flowfielddt.Rows[i]["hy_fieldname"].ToString();
Hyoa_flowfield.hy_fieldtype = flowfielddt.Rows[i]["hy_fieldtype"].ToString();
Hyoa_flowfield.hy_ifreadonly = flowfielddt.Rows[i]["hy_ifreadonly"].ToString();
Hyoa_flowfield.hy_defaultvaluetype = System.Int32.Parse(flowfielddt.Rows[i]["hy_defaultvaluetype"].ToString());
Hyoa_flowfield.hy_defaultvalue = flowfielddt.Rows[i]["hy_defaultvalue"].ToString();
Hyoa_flowfield.hy_optiontype = System.Int32.Parse(flowfielddt.Rows[i]["hy_optiontype"].ToString());
Hyoa_flowfield.hy_options = flowfielddt.Rows[i]["hy_options"].ToString();
Hyoa_flowfield.hy_onclick = flowfielddt.Rows[i]["hy_onclick"].ToString();
Hyoa_flowfield.hy_ondblclick = flowfielddt.Rows[i]["hy_ondblclick"].ToString();
Hyoa_flowfield.hy_onchange = flowfielddt.Rows[i]["hy_onchange"].ToString();
Hyoa_flowfield.hy_onkeydown = flowfielddt.Rows[i]["hy_onkeydown"].ToString();
Hyoa_flowfield.hy_onkeyup = flowfielddt.Rows[i]["hy_onkeyup"].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();
}
}
//生成SQL/ORACLE中的表
string sql = "";
if (Session["conntype"].ToString() == "SQL")
{
sql = "select * into hyc_" + txttableidbymd.Text + " from hyc_" + this.lbtableidbysorce.Text + " where 1=0";
}
if (Session["conntype"].ToString() == "ORACLE")
{
sql = "create table hyc_" + txttableidbymd.Text + " as select * from hyc_" + this.lbtableidbysorce.Text + " where 1=2";
}
Hyoa_global.ExcuteSQL(sql);
//.........这里部分代码省略.........
示例4: getExcelContent
//需要导出的内容
private string getExcelContent()
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
//根据表ID和模块ID得到当前传进来的模块是否有流程
HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
DataTable dttableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.txtmudelid.Value, this.txttableid.Value);
//根据表单得到对应的所有字段
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
DataTable dtflowfield = Hyoa_flowfield.Getflowfieldsbytableid(dttableconfig.Rows[0]["ID"].ToString());
//循环所有字段
string ls_flowfield = "";
if (dtflowfield.Rows.Count > 0)
{
for (int i = 0; i < dtflowfield.Rows.Count; i++)
{
string ls_fieldtype = dtflowfield.Rows[i]["hy_fieldtype"].ToString();
if (ls_fieldtype == "文本" || ls_fieldtype == "多行文本" || ls_fieldtype == "文本加按钮" || ls_fieldtype == "多行文本加按钮" || ls_fieldtype == "日期" || ls_fieldtype == "数值" || ls_fieldtype == "对话框列表" || ls_fieldtype == "复选框" || ls_fieldtype == "单选框" || ls_fieldtype == "口令")
{
ls_flowfield += ",a.hyc_" + dtflowfield.Rows[i]["hy_fieldid"].ToString();
}
}
}
HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
DataTable dtlist = Hyoa_listconfig.Getlistconfig(this.txtlistid.Value); //列表配置
#region ---查询条件---
string cmdStr_Search = "";
if (txtsearchfields.Text != "")
{
string[] lv_searchfields = txtsearchfields.Text.Split(',');
string[] lv_searchfields_sx = txtsearchfields_sx.Text.Split(',');
for (int i = 0; i < lv_searchfields.Length; i++)
{
string ls_fieldid = lv_searchfields[i].ToString();
string ls_fieldid_sx = lv_searchfields_sx[i].ToString();
string ls_searchtext = "";
if (this.Request.Form[ls_fieldid] != null)
{
ls_searchtext = this.Request.Form[ls_fieldid].ToString();
}
if (ls_searchtext != "")
{
if (ls_fieldid_sx == "0")
{
cmdStr_Search += " and hyc_" + ls_fieldid + " like '%" + ls_searchtext + "%' ";
}
else
{
if (ls_fieldid_sx == "1")
{
if (Session["conntype"].ToString() == "SQL")
{
cmdStr_Search += " and left(CONVERT(varchar, hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ", 120 ) ,10) >= '" + ls_searchtext + "' ";
}
if (Session["conntype"].ToString() == "ORACLE")
{
cmdStr_Search += " and to_char(hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ",'YYYY-MM-DD') >= '" + ls_searchtext + "' ";
}
}
if (ls_fieldid_sx == "2")
{
if (Session["conntype"].ToString() == "SQL")
{
cmdStr_Search += " and left(CONVERT(varchar, hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ", 120 ) ,10) <= '" + ls_searchtext + "' ";
}
if (Session["conntype"].ToString() == "ORACLE")
{
cmdStr_Search += " and to_char(hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + ",'YYYY-MM-DD') <= '" + ls_searchtext + "' ";
}
}
if (ls_fieldid_sx == "3")
{
cmdStr_Search += " and hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + " >= " + ls_searchtext + " ";
}
if (ls_fieldid_sx == "4")
{
cmdStr_Search += " and hyc_" + ls_fieldid.Substring(0, ls_fieldid.Length - 2) + " <= " + ls_searchtext + " ";
}
}
}
}
}
#endregion ---查询条件---
#region ---排序---
string cmdStr_SearchSort = "";
if (dtlist.Rows[0]["hy_sortfield1"].ToString() != "")
{
if (cmdStr_SearchSort == "")
{
cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield1"].ToString() + " " + dtlist.Rows[0]["hy_sorttype1"].ToString();
}
else
{
cmdStr_SearchSort += " ,hyc_" + dtlist.Rows[0]["hy_sortfield1"].ToString() + " " + dtlist.Rows[0]["hy_sorttype1"].ToString();
}
}
//.........这里部分代码省略.........
示例5: 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 lssql1 = "SELECT * FROM hyt_flowfield WHERE hy_tableid = '" + this.lbtableidbysorce.Text + "'"; //得到配置字段
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
int i;
DataTable flowfielddt = Hyoa_flowfield.Getflowfieldsbytableid(this.lbtableidbysorce.Text);
string newtableid;
newtableid = Hyoa_global.GetRandom();
if (flowfielddt.Rows.Count > 0)
{
for (i = 0; i < flowfielddt.Rows.Count; i++)
{
Hyoa_flowfield.ID = Hyoa_global.GetRandom();
Hyoa_flowfield.hy_tableid = newtableid;
Hyoa_flowfield.hy_mudelid = this.ddlmudelidbymd.SelectedValue;
Hyoa_flowfield.hy_flowid = this.txtflowidbymd.Text;
Hyoa_flowfield.hy_fieldid = flowfielddt.Rows[i]["hy_fieldid"].ToString();
Hyoa_flowfield.hy_fieldname = flowfielddt.Rows[i]["hy_fieldname"].ToString();
Hyoa_flowfield.hy_fieldtype = flowfielddt.Rows[i]["hy_fieldtype"].ToString();
Hyoa_flowfield.hy_ifreadonly = flowfielddt.Rows[i]["hy_ifreadonly"].ToString();
Hyoa_flowfield.hy_defaultvaluetype = System.Int32.Parse(flowfielddt.Rows[i]["hy_defaultvaluetype"].ToString());
Hyoa_flowfield.hy_defaultvalue = flowfielddt.Rows[i]["hy_defaultvalue"].ToString();
Hyoa_flowfield.hy_optiontype = System.Int32.Parse(flowfielddt.Rows[i]["hy_optiontype"].ToString());
Hyoa_flowfield.hy_options = flowfielddt.Rows[i]["hy_options"].ToString();
Hyoa_flowfield.hy_onclick = flowfielddt.Rows[i]["hy_onclick"].ToString();
Hyoa_flowfield.hy_ondblclick = flowfielddt.Rows[i]["hy_ondblclick"].ToString();
Hyoa_flowfield.hy_onchange = flowfielddt.Rows[i]["hy_onchange"].ToString();
Hyoa_flowfield.hy_onkeydown = flowfielddt.Rows[i]["hy_onkeydown"].ToString();
Hyoa_flowfield.hy_onkeyup = flowfielddt.Rows[i]["hy_onkeyup"].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 = System.Int32.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.Insert();
}
}
HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig(); //hyt_tableconfig
DataTable tableconfigdt = Hyoa_tableconfig.GetTablesbymudelid(this.lbmudelidbysource.Text);
if (tableconfigdt.Rows.Count > 0)
{
Hyoa_tableconfig.ID = newtableid;
Hyoa_tableconfig.hy_mudelid = this.ddlmudelidbymd.SelectedValue;
Hyoa_tableconfig.hy_name = this.txttablenamebymd.Text;
Hyoa_tableconfig.hy_onload = tableconfigdt.Rows[0]["hy_onload"].ToString();
Hyoa_tableconfig.hy_sort = System.Int32.Parse(this.txttablesortbymd.Text);
Hyoa_tableconfig.hy_ifflowdoc = this.ddlifflowdoc.SelectedValue;
Hyoa_tableconfig.hy_ifdisplayall = tableconfigdt.Rows[0]["hy_ifdisplayall"].ToString();
Hyoa_tableconfig.hy_ispuballByflowYB = tableconfigdt.Rows[0]["hy_ispuballByflowYB"].ToString();
Hyoa_tableconfig.hy_tablerole = tableconfigdt.Rows[0]["hy_tablerole"].ToString();
Hyoa_tableconfig.Insert();
}
//以下为流程模块的功能,非流程模块不需要执行
if (this.ddlifflowdoc.SelectedValue == "是")
{
//string lssql2 = "SELECT * FROM hyt_flowinfor WHERE hy_mudelid = 'bgyply'";//得到模块对应的流程
HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
DataTable flowinfordt = Hyoa_flowinfor.Getflowinforbymudelid(this.lbmudelidbysource.Text);
string lssoureceflowid = flowfielddt.Rows[0]["hy_flowid"].ToString();//得到老模块的flowid 后面要用到
//插入流程信息start
Hyoa_flowinfor.hy_flowid = this.txtflowidbymd.Text;
Hyoa_flowinfor.hy_flowname =this.txtflownamebymd.Text;
Hyoa_flowinfor.hy_sort = System.Int32.Parse(this.txtflowsortbymd.Text);
Hyoa_flowinfor.hy_mudelid = this.ddlmudelidbymd.SelectedValue;
Hyoa_flowinfor.Insert();
//插入流程信息end
//string lssql3 = "select * from hyt_flowtache where hy_flowid = 'flow0004'";//流程对应的环节
HyoaClass.Hyoa_flowtache Hyoa_flowtache = new HyoaClass.Hyoa_flowtache();
DataTable flowtachedt = Hyoa_flowtache.Getflowtachebyflowid(lssoureceflowid);
if (flowtachedt.Rows.Count > 0)
{
for (i = 0; i < flowtachedt.Rows.Count; i++)
{
Hyoa_flowtache.ID = Hyoa_global.GetRandom();
Hyoa_flowtache.hy_flowid = this.txtflowidbymd.Text;
Hyoa_flowtache.hy_tacheid = flowtachedt.Rows[i]["hy_tacheid"].ToString();
Hyoa_flowtache.hy_tachename = flowtachedt.Rows[i]["hy_tachename"].ToString();
Hyoa_flowtache.hy_sort = System.Int32.Parse(flowtachedt.Rows[i]["hy_sort"].ToString());
Hyoa_flowtache.hy_ifshowcurdept = flowtachedt.Rows[i]["hy_ifshowcurdept"].ToString();
Hyoa_flowtache.hy_XValue = flowtachedt.Rows[i]["hy_XValue"].ToString();
Hyoa_flowtache.hy_YValue = flowtachedt.Rows[i]["hy_YValue"].ToString();
Hyoa_flowtache.hy_rdDoIsSendSms = flowtachedt.Rows[i]["hy_rdDoIsSendSms"].ToString();
Hyoa_flowtache.hy_rdDoIsSendMessage = flowtachedt.Rows[i]["hy_rdDoIsSendMessage"].ToString();
Hyoa_flowtache.hy_rdPassIsSendSms = flowtachedt.Rows[i]["hy_rdPassIsSendSms"].ToString();
Hyoa_flowtache.hy_rdPassIsSendMessage = flowtachedt.Rows[i]["hy_rdPassIsSendMessage"].ToString();
//.........这里部分代码省略.........
示例6: DataPlay
private void DataPlay(int PageNo)
{
//得到当前模块对应的role
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dt_mudel = Hyoa_mudel.Getmudel(this.txtmudelid.Value);
string ls_role = "Role9999";
if (dt_mudel.Rows.Count > 0)
{
ls_role = dt_mudel.Rows[0]["hy_roleid"].ToString();
}
//根据表ID和模块ID得到当前传进来的模块是否有流程
HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
DataTable dttableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.txtmudelid.Value, this.txttableid.Value);
//根据表单得到对应的所有字段
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
DataTable dtflowfield = Hyoa_flowfield.Getflowfieldsbytableid(dttableconfig.Rows[0]["ID"].ToString());
//循环所有字段
string ls_flowfield = "";
if (dtflowfield.Rows.Count > 0)
{
for (int i = 0; i < dtflowfield.Rows.Count; i++)
{
string ls_fieldtype = dtflowfield.Rows[i]["hy_fieldtype"].ToString();
if (ls_fieldtype == "文本" || ls_fieldtype == "多行文本" || ls_fieldtype == "文本加按钮" || ls_fieldtype == "多行文本加按钮" || ls_fieldtype == "日期" || ls_fieldtype == "数值" || ls_fieldtype == "对话框列表" || ls_fieldtype == "复选框" || ls_fieldtype == "单选框" || ls_fieldtype == "口令")
{
ls_flowfield += ",a.hyc_" + dtflowfield.Rows[i]["hy_fieldid"].ToString();
}
}
}
//判断当前用户是否有删除权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
//如果非流程(授权用户统一管理)
if (dttableconfig.Rows[0]["hy_tablerole"].ToString() == "0")
{
if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
{
this.isrole.Value = "1";
this.newcontrol.Visible = true;
this.delcontrol.Visible = true;
//this.copycontrol.Visible = true;
}
else
{
this.isrole.Value = "0";
}
}
//如果非流程(每个人管理自己的信息)
if (dttableconfig.Rows[0]["hy_tablerole"].ToString() == "1")
{
this.isrole.Value = "1";
this.newcontrol.Visible = true;
this.delcontrol_my.Visible = true;
//this.copycontrol.Visible = true;
}
//如果非流程(每个人操作自己的信息、授权用户可管理所有信息)
if (dttableconfig.Rows[0]["hy_tablerole"].ToString() == "2")
{
if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
{
this.isrole.Value = "1";
this.newcontrol.Visible = true;
this.delcontrol.Visible = true;
}
else
{
this.isrole.Value = "0";
this.newcontrol.Visible = true;
this.delcontrol_my.Visible = true;
}
}
HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
DataTable dtlist = Hyoa_listconfig.Getlistconfig(this.txtlistid.Value); //列表配置
this.lbdisplaytitle.Text = "";
//得到当前页号
this.curpage.Text = PageNo.ToString();
//---查询条件---开始
string cmdStr_Search = "";
if (txtsearchfields.Text != "")
{
string[] lv_searchfields = txtsearchfields.Text.Split(',');
string[] lv_searchfields_sx = txtsearchfields_sx.Text.Split(',');
for (int i = 0; i < lv_searchfields.Length; i++)
{
string ls_fieldid = lv_searchfields[i].ToString();
string ls_fieldid_sx = lv_searchfields_sx[i].ToString();
string ls_searchtext = "";
if (this.Request.Form[ls_fieldid] != null)
{
ls_searchtext = this.Request.Form[ls_fieldid].ToString();
}
if (ls_searchtext != "")
{
if (ls_fieldid_sx == "0")
{
cmdStr_Search += " and hyc_" + ls_fieldid + " like '%" + ls_searchtext + "%' ";
//.........这里部分代码省略.........
示例7: DataPlay
private void DataPlay(int PageNo)
{
if (this.Request.QueryString["id"] != null)
{
this.txttableid.Value = this.Request.QueryString["id"].ToString();
this.txtflowid.Value = this.Request.QueryString["id"].ToString();
}
else
{
Response.Write("<script>alert('表单信息未得到!');history.back();</script>");
}
//判断当前用户是否有新建删除权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
{
this.isrole.Value = "1";
this.tdnewdoc.Visible = true; //新建
this.tddeldoc.Visible = true; //删除
}
else
{
this.isrole.Value = "0";
this.tdnewdoc.Visible = false; //新建
this.tddeldoc.Visible = false; //删除
}
//得到当前页号
this.curpage.Text = PageNo.ToString();
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
DataTable dt;
dt = Hyoa_flowfield.Getflowfieldsbytableid(this.txtflowid.Value);
DataTable tempTable = dt.Clone();
for (int i = (PageNo - 1) * System.Int32.Parse(PageSize.Text); i < PageNo * System.Int32.Parse(PageSize.Text); i++)
{
if (i > dt.Rows.Count - 1)
break;
DataRow dr = tempTable.NewRow();
for (int j = 0; j < dt.Columns.Count; j++)
{
dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
}
tempTable.Rows.Add(dr);
}
int TotalRecord = dt.Rows.Count;
this.sumts.Text = TotalRecord.ToString();
this.sumts2.Text = TotalRecord.ToString();
this.ShowTotalRecord.Text = TotalRecord.ToString();
//计算及显示总页数
int TotalPage;
if (TotalRecord < System.Int32.Parse(PageSize.Text))
{
TotalPage = 1;
}
else
{
if (TotalRecord % System.Int32.Parse(PageSize.Text) != 0)
{
TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text) + 1;
}
else
{
TotalPage = TotalRecord / System.Int32.Parse(PageSize.Text);
}
}
this.ShowTotalPage.Text = TotalPage.ToString();
this.rptlist.DataSource = tempTable;
this.rptlist.DataBind();
dt.Clear();
}
示例8: DataPlay
private void DataPlay(int PageNo)
{
//得到当前模块对应的role
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dt_mudel = Hyoa_mudel.Getmudel(this.txtmudelid.Value);
string ls_role = "Role9999";
if (dt_mudel.Rows.Count > 0)
{
ls_role = dt_mudel.Rows[0]["hy_roleid"].ToString();
}
//根据表ID和模块ID得到当前传进来的模块是否有流程
HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
DataTable dttableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.txtmudelid.Value, this.txttableid.Value);
//根据表单得到对应的所有字段
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
DataTable dtflowfield = Hyoa_flowfield.Getflowfieldsbytableid(dttableconfig.Rows[0]["ID"].ToString());
//循环所有字段
string ls_flowfield = "";
if (dtflowfield.Rows.Count > 0)
{
for (int i = 0; i < dtflowfield.Rows.Count; i++)
{
string ls_fieldtype = dtflowfield.Rows[i]["hy_fieldtype"].ToString();
if (ls_fieldtype == "文本" || ls_fieldtype == "多行文本" || ls_fieldtype == "文本加按钮" || ls_fieldtype == "多行文本加按钮" || ls_fieldtype == "日期" || ls_fieldtype == "数值" || ls_fieldtype == "对话框列表" || ls_fieldtype == "复选框" || ls_fieldtype == "单选框" || ls_fieldtype == "口令")
{
ls_flowfield += ",a.hyc_" + dtflowfield.Rows[i]["hy_fieldid"].ToString();
}
}
}
//判断当前用户是否有删除权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
//如果非流程(授权用户可新建信息、可删除所有信息)
if (dttableconfig.Rows[0]["hy_tablerole"].ToString() == "0")
{
if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
{
this.isrole.Value = "1";
this.newcontrol.Visible = true;
this.delcontrol.Visible = true;
//this.copycontrol.Visible = true;
}
else
{
this.isrole.Value = "0";
}
}
//如果非流程(每个人管理自己的信息)
if (dttableconfig.Rows[0]["hy_tablerole"].ToString() == "1")
{
this.isrole.Value = "1";
this.newcontrol.Visible = true;
this.delcontrol_my.Visible = true;
//this.copycontrol.Visible = true;
}
//如果非流程(每个人管理自己的信息、授权用户可管理所有信息)
if (dttableconfig.Rows[0]["hy_tablerole"].ToString() == "2")
{
if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
{
this.isrole.Value = "1";
this.newcontrol.Visible = true;
this.delcontrol.Visible = true;
//this.copycontrol.Visible = true;
}
else
{
this.isrole.Value = "0";
this.newcontrol.Visible = true;
this.delcontrol_my.Visible = true;
//this.copycontrol.Visible = true;
}
}
//如果非流程(授权用户可新建、只能删自己新建的信息)
if (dttableconfig.Rows[0]["hy_tablerole"].ToString() == "3")
{
if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
{
this.isrole.Value = "1";
this.newcontrol.Visible = true;
this.delcontrol_sq.Visible = true;
//this.copycontrol.Visible = true;
}
}
HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
DataTable dtlist = Hyoa_listconfig.Getlistconfig(this.txtlistid.Value); //列表配置
this.lbdisplaytitle.Text = "";
//得到当前页号
this.curpage.Text = PageNo.ToString();
//---查询条件---开始
string cmdStr_Search = "";
if (txtsearchfields.Text != "")
{
string[] lv_searchfields = txtsearchfields.Text.Split(',');
string[] lv_searchfields_sx = txtsearchfields_sx.Text.Split(',');
for (int i = 0; i < lv_searchfields.Length; i++)
//.........这里部分代码省略.........
示例9: DataPlay
private void DataPlay(int PageNo)
{
//得到当前模块对应的全权用户组
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dt_mudel = Hyoa_mudel.Getmudel(this.txtmudelid.Value);
string ls_role = "Role9999";
if (dt_mudel.Rows.Count > 0)
{
if (dt_mudel.Rows[0]["hy_qqroleid"] == null)
{
return;
}
else
{
if (dt_mudel.Rows[0]["hy_qqroleid"] == "")
{
return;
}
else
{
ls_role = dt_mudel.Rows[0]["hy_qqroleid"].ToString();
}
}
}
//根据表ID和模块ID得到当前传进来的模块是否有流程
HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
DataTable dttableconfig = Hyoa_tableconfig.GetTablesbymudelidandtableid(this.txtmudelid.Value, this.txttableid.Value);
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
{
this.isrole.Value = "1";
}
else
{
this.isrole.Value = "0";
Response.Write("<script>alert('您无权访问此页面的数据!');self.close();</script>");
return;
}
//根据表单得到对应的所有字段
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
DataTable dtflowfield = Hyoa_flowfield.Getflowfieldsbytableid(dttableconfig.Rows[0]["ID"].ToString());
//循环所有字段
string ls_flowfield = "";
if (dtflowfield.Rows.Count > 0)
{
for (int i = 0; i < dtflowfield.Rows.Count; i++)
{
string ls_fieldtype = dtflowfield.Rows[i]["hy_fieldtype"].ToString();
if (ls_fieldtype == "文本" || ls_fieldtype == "多行文本" || ls_fieldtype == "文本加按钮" || ls_fieldtype == "多行文本加按钮" || ls_fieldtype == "日期" || ls_fieldtype == "数值" || ls_fieldtype == "对话框列表" || ls_fieldtype == "复选框" || ls_fieldtype == "单选框" || ls_fieldtype == "口令")
{
ls_flowfield += ",a.hyc_" + dtflowfield.Rows[i]["hy_fieldid"].ToString();
}
}
}
HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
DataTable dtlist = Hyoa_listconfig.Getlistconfig(this.txtlistid.Value); //列表配置
this.lbdisplaytitle.Text = "";
//---排序---开始
string cmdStr_SearchSort = "";
if (dtlist.Rows[0]["hy_sortfield1"].ToString() != "")
{
if (cmdStr_SearchSort == "")
{
cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield1"].ToString() + " " + dtlist.Rows[0]["hy_sorttype1"].ToString();
}
else
{
cmdStr_SearchSort += " ,hyc_" + dtlist.Rows[0]["hy_sortfield1"].ToString() + " " + dtlist.Rows[0]["hy_sorttype1"].ToString();
}
}
if (dtlist.Rows[0]["hy_sortfield2"].ToString() != "")
{
if (cmdStr_SearchSort == "")
{
cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield2"].ToString() + " " + dtlist.Rows[0]["hy_sorttype2"].ToString();
}
else
{
cmdStr_SearchSort += " ,hyc_" + dtlist.Rows[0]["hy_sortfield2"].ToString() + " " + dtlist.Rows[0]["hy_sorttype2"].ToString();
}
}
if (dtlist.Rows[0]["hy_sortfield3"].ToString() != "")
{
if (cmdStr_SearchSort == "")
{
cmdStr_SearchSort = " order by hyc_" + dtlist.Rows[0]["hy_sortfield3"].ToString() + " " + dtlist.Rows[0]["hy_sorttype3"].ToString();
}
else
{
cmdStr_SearchSort += " ,hyc_" + dtlist.Rows[0]["hy_sortfield3"].ToString() + " " + dtlist.Rows[0]["hy_sorttype3"].ToString();
}
}
if (cmdStr_SearchSort == "")
{
//.........这里部分代码省略.........