202306131、新增项目级消息待办页面功能。2、新增项目单位是否同步实名制设置功能。3、优化考试合格自动生成卡号功能。
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.DataShow;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.SysManage
|
||||
{
|
||||
public partial class ProjectToDo : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack && this.CurrUser != null)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var getDataList = Funs.DB.Sp_Project_GetToDoItems( this.CurrUser.LoginProjectId, this.CurrUser.PersonId).ToList();
|
||||
Grid1.RecordCount = getDataList.Count();
|
||||
Grid1.DataSource = getDataList;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键编辑事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑数据方法
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var getData = Funs.DB.Sp_Project_GetToDoItems(this.CurrUser.LoginProjectId, this.CurrUser.PersonId).FirstOrDefault(x => x.DataId == Grid1.SelectedRowID);
|
||||
|
||||
if (getData != null) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("{0}", getData.PCUrl, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user