本文整理汇总了C#中HyoaClass.Hyoa_mudel.Getmudels方法的典型用法代码示例。如果您正苦于以下问题:C# HyoaClass.Hyoa_mudel.Getmudels方法的具体用法?C# HyoaClass.Hyoa_mudel.Getmudels怎么用?C# HyoaClass.Hyoa_mudel.Getmudels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HyoaClass.Hyoa_mudel
的用法示例。
在下文中一共展示了HyoaClass.Hyoa_mudel.Getmudels方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DataPlay
private void DataPlay()
{
//加载一级目录ID、一级目录名称、每个一级目录最大的二级目录
HyoaClass.Hyoa_ml Hyoa_firstml = new HyoaClass.Hyoa_ml();
DataTable dtfirstml = Hyoa_firstml.GetFirstmls();
if (dtfirstml.Rows.Count > 0)
{
this.ddlfirstmlid.DataSource = dtfirstml;
this.ddlfirstmlid.DataTextField = "MLID";
this.ddlfirstmlid.DataValueField = "MLID";
this.ddlfirstmlid.DataBind();
this.ddlfirstmlid.Items.Insert(0, "--请选择--");
this.ddlfirstmlid.SelectedIndex = 0;
this.ddlfirstmlname.DataSource = dtfirstml;
this.ddlfirstmlname.DataTextField = "MLName";
this.ddlfirstmlname.DataValueField = "MLName";
this.ddlfirstmlname.DataBind();
this.ddlfirstmlname.Items.Insert(0, "--请选择--");
this.ddlfirstmlname.SelectedIndex = 0;
//加载每个一级目录最大的二级目录
string ls_id;
for (var i = 0; i < dtfirstml.Rows.Count; i++)
{
ls_id = Hyoa_firstml.GetMaxMLID(dtfirstml.Rows[i]["MLID"].ToString());
this.ddlsecondmlid.Items.Insert(i, ls_id);
}
this.ddlsecondmlid.Items.Insert(0, "--请选择--");
this.ddlsecondmlid.SelectedIndex = 0;
}
//加载模块信息
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dtmudel = Hyoa_mudel.Getmudels();
if (dtmudel.Rows.Count > 0)
{
this.ddlmudelid.DataSource = dtmudel;
this.ddlmudelid.DataTextField = "hy_mudelname";
this.ddlmudelid.DataValueField = "hy_mudelid";
this.ddlmudelid.DataBind();
this.ddlmudelid.Items.Insert(0, "--请选择--");
this.ddlmudelid.SelectedIndex = 0;
}
//加载权限
HyoaClass.Hyoa_role Hyoa_role = new HyoaClass.Hyoa_role();
DataTable dtrole = Hyoa_role.Getroles();
if (dtrole.Rows.Count > 0)
{
this.ddlrole.DataSource = dtrole;
this.ddlrole.DataTextField = "hy_rolename";
this.ddlrole.DataValueField = "hy_roleid";
this.ddlrole.DataBind();
this.ddlrole.Items.Insert(0, "--请选择--");
this.ddlrole.SelectedIndex = 0;
}
this.ddlisenabled.Items.Insert(0, "是");
this.ddlisenabled.Items.Insert(1, "否");
if (this.Request.QueryString["op"] != null)
{
this.txtop.Value = this.Request.QueryString["op"].ToString(); //新增还是修改
//判断当前用户是否有保存的权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
{
this.btn_submit.Visible = true; //保存
}
else
{
this.btn_submit.Visible = false; //保存
}
HyoaClass.Hyoa_ml Hyoa_ml = new HyoaClass.Hyoa_ml();
//旧文档
if (this.Request.QueryString["op"] == "modify")
{
if (this.Request.QueryString["id"] != null)
{
//根据id得到信息
this.lblid.Value = this.Request.QueryString["id"].ToString();
this.txtMLID.Value = this.Request.QueryString["id"].ToString();
DataTable dt = Hyoa_ml.Getml(this.lblid.Value);
if (dt.Rows.Count > 0)
{
this.txtname.Value = dt.Rows[0]["MLName"].ToString();
this.txtlink.Value = dt.Rows[0]["hy_link"].ToString();
this.ddltarget.SelectedValue = dt.Rows[0]["hy_target"].ToString();
this.ddlrole.SelectedValue = dt.Rows[0]["hy_role"].ToString();
this.txtsort.Value = dt.Rows[0]["hy_sort"].ToString();
//模块信息定位
for (var i = 0; i < this.ddlmudelid.Items.Count; i++)
{
if (this.ddlmudelid.Items[i].Value == dt.Rows[0]["hy_mudelid"].ToString())
{
this.ddlmudelid.SelectedIndex = i;
}
}
//.........这里部分代码省略.........
示例2: DataPlay
private void DataPlay()
{
this.btn_submit.Visible = false; //保存
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (Hyoa_global.isHaveRole("Role9999", (this.Session["hyuid"].ToString())))
{
this.btn_submit.Visible = true; //保存
}
//加载模块信息
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dtmudel = Hyoa_mudel.Getmudels();
if (dtmudel.Rows.Count > 0)
{
this.ddlmudelid.DataSource = dtmudel;
this.ddlmudelid.DataTextField = "hy_mudelname";
this.ddlmudelid.DataValueField = "hy_mudelid";
this.ddlmudelid.DataBind();
this.ddlmudelid.Items.Insert(0, "--请选择--");
this.ddlmudelid.SelectedIndex = 0;
}
//获取排序号
HyoaClass.Hyoa_role Hyoa_role = new HyoaClass.Hyoa_role();
DataTable dt = Hyoa_role.GetMaxrolesort();
if (dt.Rows.Count > 0)
this.txtno.Value = (System.Int32.Parse(dt.Rows[0]["hy_sort"].ToString()) + 2).ToString();
else
this.txtno.Value = "1";
}
示例3: DataPlay
private void DataPlay()
{
//是否流程文档
this.ddlifflowdoc.Items.Insert(0, "否");
this.ddlifflowdoc.Items.Insert(1, "是");
//是否显示所有文档非流程
this.ddlifdisplayall.Items.Insert(0, "否");
this.ddlifdisplayall.Items.Insert(1, "是");
//是否进行评论
this.ddlifcomment.Items.Insert(0, "否");
this.ddlifcomment.Items.Insert(1, "是");
//主表单显示的列数
this.ddldisplaycol.Items.Insert(0, "4");
this.ddldisplaycol.Items.Insert(1, "6");
this.ddldisplaycol.Items.Insert(2, "8");
this.ddldisplaycol.Items.Insert(3, "10");
//只对流程模块起作用,流程完成后是否公开,是表示大家都能看,否表示不公开
this.ddlispuballByflowYB.Items.Insert(0, "否");
this.ddlispuballByflowYB.Items.Insert(1, "是");
//加载模块
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dtmudel = Hyoa_mudel.Getmudels();
if (dtmudel.Rows.Count > 0)
{
this.ddlmudelid.DataSource = dtmudel;
this.ddlmudelid.DataTextField = "hy_mudelname";
this.ddlmudelid.DataValueField = "hy_mudelid";
this.ddlmudelid.DataBind();
this.ddlmudelid.Items.Insert(0, "--请选择--");
this.ddlmudelid.SelectedIndex = 0;
}
if (this.Request.QueryString["op"] != null)
{
this.txtop.Value = this.Request.QueryString["op"].ToString(); //新增还是修改
//判断当前用户是否有保存的权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
{
this.btn_submit.Visible = true; //保存
}
else
{
this.btn_submit.Visible = false; //保存
}
//旧文档
HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
if (this.Request.QueryString["op"] == "modify")
{
if (this.Request.QueryString["id"] != null)
{
//根据id得到信息
this.txtdocid.Text = this.Request.QueryString["id"].ToString();
this.txtdocid.Enabled = false;
DataTable dt = Hyoa_tableconfig.GetTable(this.txtdocid.Text);
if (dt.Rows.Count > 0)
{
this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
this.txtname.Value = dt.Rows[0]["hy_name"].ToString();
this.txtsort.Value = dt.Rows[0]["hy_sort"].ToString();
this.ddlifflowdoc.SelectedValue = dt.Rows[0]["hy_ifflowdoc"].ToString();
this.ddlifdisplayall.SelectedValue = dt.Rows[0]["hy_ifdisplayall"].ToString();
this.ddlifcomment.SelectedValue = dt.Rows[0]["hy_ifcomment"].ToString();
this.ddlispuballByflowYB.SelectedValue = dt.Rows[0]["hy_ispuballByflowYB"].ToString();
this.txthy_onload.Text = dt.Rows[0]["hy_onload"].ToString();
this.ddltablerole.SelectedValue = dt.Rows[0]["hy_tablerole"].ToString();
this.ddldisplaycol.SelectedValue = dt.Rows[0]["hy_colnum"].ToString();
}
}
}
else
{
this.txtdocid.Text = "Table";
//自动获取最大排序号,然后+2
DataTable dt_maxsort = Hyoa_tableconfig.GetMaxtableconfigsort();
if (dt_maxsort.Rows.Count > 0)
txtsort.Value = (int.Parse(dt_maxsort.Rows[0]["hy_sort"].ToString()) + 2).ToString();
else
txtsort.Value = "1";
}
}
}
示例4: DataPlay
private void DataPlay()
{
//是否启用
this.ddlifsearch.Items.Insert(0, "是");
this.ddlifsearch.Items.Insert(1, "否");
this.ddlifflowdoc.Items.Insert(0, "是");
this.ddlifflowdoc.Items.Insert(1, "否");
this.ddlifshowsearch.Items.Insert(0, "是");
this.ddlifshowsearch.Items.Insert(1, "否");
//模块编号
//加载模块信息
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dtmudel = Hyoa_mudel.Getmudels();
if (dtmudel.Rows.Count > 0)
{
this.ddlmudelid.DataSource = dtmudel;
this.ddlmudelid.DataTextField = "hy_mudelname";
this.ddlmudelid.DataValueField = "hy_mudelid";
this.ddlmudelid.DataBind();
this.ddlmudelid.Items.Insert(0, new ListItem("请选择", "请选择"));
this.ddlmudelid.SelectedIndex = 0;
}
if (this.Request.QueryString["op"] != null)
{
this.txtop.Value = this.Request.QueryString["op"].ToString(); //新增还是修改
//判断当前用户是否有保存的权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
{
this.btn_submit.Visible = true; //保存
}
else
{
this.btn_submit.Visible = false; //保存
}
//旧文档
HyoaClass.Hyoa_listconfig Hyoa_listconfig = new HyoaClass.Hyoa_listconfig();
if (this.Request.QueryString["op"] == "modify")
{
if (this.Request.QueryString["id"] != null)
{
//根据id得到信息
this.txtdocid.Value = this.Request.QueryString["id"].ToString();
DataTable dt = Hyoa_listconfig.Getlistconfig(this.txtdocid.Value);
if (dt.Rows.Count > 0)
{
this.txtsort.Text = dt.Rows[0]["hy_sort"].ToString();
if (dt.Rows[0]["hy_ifsearch"].ToString() == "是")
{
this.ddlifsearch.SelectedIndex = 0;
}
else
{
this.ddlifsearch.SelectedIndex = 1;
}
if (dt.Rows[0]["hy_ifshowsearch"].ToString() != "否")
{
this.ddlifshowsearch.SelectedIndex = 0;
}
else
{
this.ddlifshowsearch.SelectedIndex = 1;
}
this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
if (dt.Rows[0]["hy_ifflowdoc"].ToString() == "是")
{
this.ddlifflowdoc.SelectedIndex = 0;
}
else
{
this.ddlifflowdoc.SelectedIndex = 1;
}
this.txthy_listname.Text = dt.Rows[0]["hy_listname"].ToString();
this.txtwidth.Text = dt.Rows[0]["hy_width"].ToString();
//加载所有列信息
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
DataTable dtflowfield;
//dtflowfield = Hyoa_flowfield.Getflowfields();
dtflowfield = Hyoa_flowfield.GetflowfieldsbyMudelidAndTableid(dt.Rows[0]["hy_mudelid"].ToString(), dt.Rows[0]["hy_tableid"].ToString());
if (dtflowfield.Rows.Count > 0)
{
this.ddlcolumnshow.DataSource = dtflowfield;
this.ddlcolumnshow.DataTextField = "hy_fieldname";
this.ddlcolumnshow.DataValueField = "hy_fieldid";
this.ddlcolumnshow.DataBind();
this.ddlcolumnshow.SelectedIndex = 0;
}
dtflowfield.Clear();
//将列都列出来
string[] lv_columnshowselect;
string[] lv_columnshowselectid;
lv_columnshowselect = dt.Rows[0]["hy_columnshow"].ToString().Split(',');
lv_columnshowselectid = dt.Rows[0]["hy_columnshowid"].ToString().Split(',');
for (int j = 0; j < lv_columnshowselect.Length; j++)
//.........这里部分代码省略.........
示例5: DataPlay
private void DataPlay()
{
//是否启用
this.ddlifsearch.Items.Insert(0, "是");
this.ddlifsearch.Items.Insert(1, "否");
//this.ddlifflowdoc.Items.Insert(0, "是");
//this.ddlifflowdoc.Items.Insert(1, "否");
//模块编号
//加载模块信息
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dtmudel = Hyoa_mudel.Getmudels();
if (dtmudel.Rows.Count > 0)
{
this.ddlmudelid.DataSource = dtmudel;
this.ddlmudelid.DataTextField = "hy_mudelname";
this.ddlmudelid.DataValueField = "hy_mudelid";
this.ddlmudelid.DataBind();
this.ddlmudelid.Items.Insert(0, new ListItem("请选择", "请选择"));
this.ddlmudelid.SelectedIndex = 0;
//this.ddlmudelid.Items.Insert(0, new ListItem(lsmudel, lsmudelid));
}
//dtmudel.Clear();
//加载列信息
HyoaClass.Hyoa_flowfield Hyoa_flowfield = new HyoaClass.Hyoa_flowfield();
DataTable dtflowfield;
dtflowfield = Hyoa_flowfield.Getflowfields();
if (dtflowfield.Rows.Count > 0)
{
this.ddlcolumnshow.DataSource = dtflowfield;
this.ddlcolumnshow.DataTextField = "hy_fieldname";
this.ddlcolumnshow.DataValueField = "hy_fieldid";
this.ddlcolumnshow.DataBind();
this.ddlcolumnshow.SelectedIndex = 0;
}
dtflowfield.Clear();
if (this.Request.QueryString["op"] != null)
{
this.txtop.Value = this.Request.QueryString["op"].ToString(); //新增还是修改
//判断当前用户是否有保存的权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
{
this.btn_submit.Visible = true; //保存
}
else
{
this.btn_submit.Visible = false; //保存
}
//旧文档
if (this.Request.QueryString["op"] == "modify")
{
string ls_xszd="";
string ls_xszdid="";
if (this.Request.QueryString["id"] != null)
{
//根据id得到信息
this.txtdocid.Value = this.Request.QueryString["id"].ToString();
HyoaClass.DAO db = new HyoaClass.DAO();
string sql = "select * from hyt_searchconfig where ID='" + this.txtdocid.Value + "'";
DataTable dt = db.GetDataTable(sql);
if (dt.Rows.Count > 0)
{
this.txtsort.Text = dt.Rows[0]["hy_sort"].ToString();
//this.txtwidth.Text = dt.Rows[0]["hy_width"].ToString();
if (dt.Rows[0]["hy_ifsearch"].ToString() == "是")
this.ddlifsearch.SelectedIndex = 0;
else
this.ddlifsearch.SelectedIndex = 1;
this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
this.hy_field41_1.Value = dt.Rows[0]["hy_kckry"].ToString();
this.hy_field43_1.Value = dt.Rows[0]["hy_kckryid"].ToString();
//将列都列出来
string[] lv_columnshowselect;
string[] lv_columnshowselectid;
lv_columnshowselect = dt.Rows[0]["hy_columnshow"].ToString().Split(',');
lv_columnshowselectid = dt.Rows[0]["hy_columnshowid"].ToString().Split(',');
for (int j = 0; j < lv_columnshowselect.Length; j++)
{
this.ddlcolumnshowselect.Items.Insert(j, new ListItem(lv_columnshowselect[j], lv_columnshowselectid[j]));
}
//根据模块信息得到对应的选择表单值
if (dt.Rows[0]["hy_tableid"] != "" && dt.Rows[0]["hy_tableid"] != null)
{
this.ddltableid.Items.Clear();
//根据模块ID得到表单ID
HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
DataTable dtgettableid = Hyoa_tableconfig.GetTablesbymudelid(dt.Rows[0]["hy_mudelid"].ToString());
if (dtgettableid.Rows.Count > 0)
{
for (var i = 0; i < dtgettableid.Rows.Count; i++)
{
this.ddltableid.Items.Insert(i, new ListItem(dtgettableid.Rows[i]["hy_name"].ToString(), dtgettableid.Rows[i]["ID"].ToString()));
//.........这里部分代码省略.........
示例6: DataPlay
private void DataPlay()
{
if (this.Request.QueryString["op"] != null)
{
this.txtop.Value = this.Request.QueryString["op"].ToString(); //新增还是修改
//判断当前用户是否有保存的权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
{
this.btn_submit.Visible = true; //保存
}
else
{
this.btn_submit.Visible = false; //保存
}
//加载模块
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dtmudel = Hyoa_mudel.Getmudels();
if (dtmudel.Rows.Count > 0)
{
this.ddlmudelid.DataSource = dtmudel;
this.ddlmudelid.DataTextField = "hy_mudelname";
this.ddlmudelid.DataValueField = "hy_mudelid";
this.ddlmudelid.DataBind();
this.ddlmudelid.Items.Insert(0, "--请选择--");
this.ddlmudelid.SelectedIndex = 0;
}
//旧文档
if (this.Request.QueryString["op"] == "modify")
{
if (this.Request.QueryString["id"] != null)
{
//根据id得到信息
this.txtid.Text = this.Request.QueryString["id"].ToString();
HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
DataTable dt = Hyoa_flowinfor.Getflowinfor(this.txtid.Text);
if (dt.Rows.Count > 0)
{
this.txtname.Value = dt.Rows[0]["hy_flowname"].ToString();
this.txtsort.Value = dt.Rows[0]["hy_sort"].ToString();
this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
}
dt.Clear();
this.txtid.Enabled = false;
}
}
}
}
示例7: DataPlay
private void DataPlay()
{
//是否流程文档
this.ddlifflowdoc.Items.Insert(0, "否");
this.ddlifflowdoc.Items.Insert(1, "是");
//加载模块
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dtmudel = Hyoa_mudel.Getmudels();
if (dtmudel.Rows.Count > 0)
{
this.ddlmudelidbymd.DataSource = dtmudel;
this.ddlmudelidbymd.DataTextField = "hy_mudelname";
this.ddlmudelidbymd.DataValueField = "hy_mudelid";
this.ddlmudelidbymd.DataBind();
this.ddlmudelidbymd.Items.Insert(0, "--请选择--");
this.ddlmudelidbymd.SelectedIndex = 0;
}
//判断当前用户是否有保存的权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
{
this.btn_submit.Visible = true; //保存
}
else
{
this.btn_submit.Visible = false; //保存
}
if (this.Request.QueryString["id"] != null)
{
//根据id得到信息
this.txtdocid.Value = this.Request.QueryString["id"].ToString();
HyoaClass.Hyoa_tableconfig Hyoa_tableconfig = new HyoaClass.Hyoa_tableconfig();
DataTable dt = Hyoa_tableconfig.GetTable(this.txtdocid.Value);
if (dt.Rows.Count > 0)
{
this.lbtableidbysorce.Text = this.txtdocid.Value;
this.lbmudelnamebysource.Text = dt.Rows[0]["hy_name"].ToString();
this.lbmudelidbysource.Text = dt.Rows[0]["hy_mudelid"].ToString();
this.ddlifflowdoc.SelectedValue = dt.Rows[0]["hy_ifflowdoc"].ToString();
}
dt.Clear();
}
}
示例8: DataPlay
private void DataPlay()
{
//是否启用
this.ddlisenabled.Items.Insert(0, "是");
this.ddlisenabled.Items.Insert(1, "否");
//模块编号
//加载模块
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dtmudel = Hyoa_mudel.Getmudels();
if (dtmudel.Rows.Count > 0)
{
this.ddlmudelid.DataSource = dtmudel;
this.ddlmudelid.DataTextField = "hy_mudelname";
this.ddlmudelid.DataValueField = "hy_mudelid";
this.ddlmudelid.DataBind();
this.ddlmudelid.Items.Insert(0, "--请选择--");
this.ddlmudelid.SelectedIndex = 0;
}
if (this.Request.QueryString["op"] != null)
{
this.txtop.Value = this.Request.QueryString["op"].ToString(); //新增还是修改
//判断当前用户是否有保存的权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
{
this.btn_submit.Visible = true; //保存
}
else
{
this.btn_submit.Visible = false; //保存
}
//旧文档
if (this.Request.QueryString["op"] == "modify")
{
if (this.Request.QueryString["id"] != null)
{
//根据id得到信息
this.txtdocid.Value = this.Request.QueryString["id"].ToString();
HyoaClass.Hyoa_iplimit Hyoa_iplimit = new HyoaClass.Hyoa_iplimit();
DataTable dt = Hyoa_iplimit.Getiplimit(this.txtdocid.Value);
if (dt.Rows.Count > 0)
{
this.txtiplists.Value = dt.Rows[0]["hy_iplists"].ToString();
if (dt.Rows[0]["hy_isenabled"].ToString() == "是")
this.ddlisenabled.SelectedIndex = 0;
else
this.ddlisenabled.SelectedIndex = 1;
this.ddlmudelid.SelectedValue = dt.Rows[0]["hy_mudelid"].ToString();
}
dt.Clear();
}
}
}
}
示例9: DataPlay
private void DataPlay(int PageNo)
{
//判断当前用户是否有新建删除权限
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_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dt;
dt = Hyoa_mudel.Getmudels();
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();
}
示例10: DataPlay
private void DataPlay()
{
//判断当前用户是否有保存的权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (Hyoa_global.isHaveRole("Role9999", this.Session["hyuid"].ToString()))
{
this.btn_submit.Visible = true; //保存
}
else
{
this.btn_submit.Visible = false; //保存
}
//加载模块
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dtmudel = Hyoa_mudel.Getmudels();
if (dtmudel.Rows.Count > 0)
{
this.ddlmudelid.DataSource = dtmudel;
this.ddlmudelid.DataTextField = "hy_mudelname";
this.ddlmudelid.DataValueField = "hy_mudelid";
this.ddlmudelid.DataBind();
this.ddlmudelid.Items.Insert(0, "--请选择--");
this.ddlmudelid.SelectedIndex = 0;
}
//根据流程ID得到流程名称
if (this.txtSrcFlowID.Value != "")
{
HyoaClass.Hyoa_flowinfor Hyoa_flowinfor = new HyoaClass.Hyoa_flowinfor();
DataTable dt = Hyoa_flowinfor.Getflowinfor(this.txtSrcFlowID.Value);
if(dt.Rows.Count>0)
{
this.lblSrcFlowID.Text = this.txtSrcFlowID.Value;
this.lblSrcFlowName.Text = dt.Rows[0]["hy_flowname"].ToString();
}
}
}