本文整理汇总了C#中HyoaClass.Hyoa_mudel.GetMaxmudelsort方法的典型用法代码示例。如果您正苦于以下问题:C# HyoaClass.Hyoa_mudel.GetMaxmudelsort方法的具体用法?C# HyoaClass.Hyoa_mudel.GetMaxmudelsort怎么用?C# HyoaClass.Hyoa_mudel.GetMaxmudelsort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HyoaClass.Hyoa_mudel
的用法示例。
在下文中一共展示了HyoaClass.Hyoa_mudel.GetMaxmudelsort方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DataPlay
private void DataPlay()
{
this.ddlisenabled.Items.Insert(0, "是");
this.ddlisenabled.Items.Insert(1, "否");
//加载权限和全权用户
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, new ListItem("--请选择--", ""));
this.ddlrole.SelectedIndex = 0;
this.ddlqqrole.DataSource = dtrole;
this.ddlqqrole.DataTextField = "hy_rolename";
this.ddlqqrole.DataValueField = "hy_roleid";
this.ddlqqrole.DataBind();
this.ddlqqrole.Items.Insert(0, new ListItem("--请选择--", ""));
this.ddlqqrole.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)
{
//根据roleid得到信息
this.txtmudelid.Value = this.Request.QueryString["id"].ToString();
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dt = Hyoa_mudel.Getmudel(this.txtmudelid.Value);
if (dt.Rows.Count > 0)
{
this.txtid.Text = this.Request.QueryString["id"].ToString();
this.txtname.Value = dt.Rows[0]["hy_mudelname"].ToString();
this.txtsort.Value = dt.Rows[0]["hy_sort"].ToString();
if (dt.Rows[0]["hy_isenabled"].ToString() == "是")
this.ddlisenabled.SelectedIndex = 0;
else
this.ddlisenabled.SelectedIndex = 1;
this.ddlrole.SelectedValue = dt.Rows[0]["hy_roleid"].ToString();
this.ddlqqrole.SelectedValue = dt.Rows[0]["hy_qqroleid"].ToString();
}
dt.Clear();
this.txtid.Enabled = false;
}
}
else
{
this.txtid.Text = "Mudel";
//自动获取最大排序号,然后+2
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dt_maxsort = Hyoa_mudel.GetMaxmudelsort();
if (dt_maxsort.Rows.Count > 0)
txtsort.Value = (int.Parse(dt_maxsort.Rows[0]["hy_sort"].ToString()) + 2).ToString();
else
txtsort.Value = "1";
}
}
}