20240523 菜单精简

This commit is contained in:
2024-05-23 09:41:47 +08:00
parent 3de388f25d
commit e1517d9238
70 changed files with 1029 additions and 569 deletions
@@ -16,6 +16,7 @@ namespace FineUIPro.Web.BoSheng
{
if (!IsPostBack)
{
GetButtonPower();
Funs.DropDownPageSize(this.ddlPageSize);
//this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
//this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
@@ -90,5 +91,61 @@ namespace FineUIPro.Web.BoSheng
this.GridBind();
}
#endregion
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
this.GridBind();
}
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
this.EditData();
}
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
this.EditData();
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string id = Grid1.SelectedRowID;
var person = BLL.BOSHENGService.GetBoPersonById(id);
if (person != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BoPersonEdit.aspx?id={0}", id, "编辑 - ")));
}
}
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.BoPersonMenuId);
if (buttonList.Count > 0)
{
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuEdit.Hidden = false;
}
}
}
#endregion
}
}