20230626 人员信息增加员工考核
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace FineUIPro.Web.Person
|
||||
{
|
||||
@@ -163,6 +166,7 @@ namespace FineUIPro.Web.Person
|
||||
getInitGridTrain();
|
||||
getInitGridDuty();
|
||||
getInitGridInOut();
|
||||
getInitGridQuarterCheck();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -366,6 +370,133 @@ namespace FineUIPro.Web.Person
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 员工考核
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private void getInitGridQuarterCheck()
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSizeGridQuarterCheck);
|
||||
BindGridQuarterCheck();
|
||||
}
|
||||
|
||||
#region 绑定数据
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGridQuarterCheck()
|
||||
{
|
||||
string strSql = @"select QuarterCheckId, QuarterCheckName, C.UserId, C.ProjectId,
|
||||
StartTime,EndTime,State,R.RoleName,P.ProjectName,(case when c.State ='1' then '考核结束' else '正在考核' end) as StateName
|
||||
from [dbo].[Person_QuarterCheck] C
|
||||
left join Sys_Role R on C.RoleId=R.RoleId
|
||||
left join Base_Project P on C.ProjectId=P.ProjectId
|
||||
where 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.CurrUser.PersonId != BLL.Const.sysglyId && this.CurrUser.PersonId != BLL.Const.hfnbdId)
|
||||
{
|
||||
strSql += " AND C.UserId=@UserId ";
|
||||
listStr.Add(new SqlParameter("@UserId", this.PersonId));
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
GridQuarterCheck.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(GridQuarterCheck, tb);
|
||||
GridQuarterCheck.DataSource = table;
|
||||
GridQuarterCheck.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region gv字段转换
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="QuarterCheckId"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertGrade(object QuarterCheckId)
|
||||
{
|
||||
decimal grade = 0;
|
||||
if (!string.IsNullOrEmpty(QuarterCheckId.ToString()))
|
||||
{
|
||||
var list = BLL.Person_QuarterCheckItemService.GetCheckItemListById(QuarterCheckId.ToString());
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item.Grade != null)
|
||||
{
|
||||
grade += item.Grade.Value * item.StandardGrade.Value / 100;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return grade.ToString("0.##");
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void GridQuarterCheck_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGridQuarterCheck();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSizeGridQuarterCheck_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
GridQuarterCheck.PageSize = Convert.ToInt32(ddlPageSizeGridQuarterCheck.SelectedValue);
|
||||
BindGridQuarterCheck();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void GridQuarterCheck_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
BindGridQuarterCheck();
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void GridQuarterCheck_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.EditDataQuarterCheck();
|
||||
}
|
||||
protected void btnQuarterCheckEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.EditDataQuarterCheck();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑数据方法
|
||||
/// </summary>
|
||||
private void EditDataQuarterCheck()
|
||||
{
|
||||
if (GridQuarterCheck.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartPersonCheckingView.aspx?QuarterCheckId={0}", GridQuarterCheck.SelectedRowID, "编辑 - ")));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 员工责任书
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user