276 lines
13 KiB
C#
276 lines
13 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using BLL;
|
|
|
|
namespace FineUIPro.Web.Perfomance
|
|
{
|
|
public partial class PersonPerfomanceView : PageBase
|
|
{
|
|
#region 定义项
|
|
/// <summary>
|
|
/// 主键
|
|
/// </summary>
|
|
private string PersonPerfomanceId
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["PersonPerfomanceId"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["PersonPerfomanceId"] = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 附件路径
|
|
/// </summary>
|
|
public string AttachUrl
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["AttachUrl"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["AttachUrl"] = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 加载
|
|
/// <summary>
|
|
/// 加载页面
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
|
this.PersonPerfomanceId = Request.Params["PersonPerfomanceId"];
|
|
initContent();
|
|
if (!string.IsNullOrEmpty(this.PersonPerfomanceId))
|
|
{
|
|
Model.Perfomance_PersonPerfomance personPerfomance = BLL.PersonPerfomanceService.GetPersonPerfomanceById(this.PersonPerfomanceId);
|
|
if (personPerfomance != null)
|
|
{
|
|
this.txtPersonPerfomanceCode.Text = CodeRecordsService.ReturnCodeByDataId(this.PersonPerfomanceId);
|
|
if (!string.IsNullOrEmpty(personPerfomance.UnitId))
|
|
{
|
|
var unit = BLL.UnitService.GetUnitByUnitId(personPerfomance.UnitId);
|
|
if (unit != null)
|
|
{
|
|
this.txtUnitName.Text = unit.UnitName;
|
|
}
|
|
}
|
|
if (!string.IsNullOrEmpty(personPerfomance.TeamGroupId))
|
|
{
|
|
var teamGroup = BLL.TeamGroupService.GetTeamGroupById(personPerfomance.TeamGroupId);
|
|
if (teamGroup != null)
|
|
{
|
|
this.txtTeamGroupName.Text = teamGroup.TeamGroupName;
|
|
}
|
|
}
|
|
if (!string.IsNullOrEmpty(personPerfomance.PersonId))
|
|
{
|
|
var person = BLL.PersonService.GetPersonById(personPerfomance.PersonId);
|
|
if (person != null)
|
|
{
|
|
this.txtPersonName.Text = person.PersonName;
|
|
}
|
|
}
|
|
this.txtSubContractNum.Text = personPerfomance.SubContractNum;
|
|
if (personPerfomance.EvaluationDate != null)
|
|
{
|
|
this.txtEvaluationDate.Text = string.Format("{0:yyyy-MM-dd}", personPerfomance.EvaluationDate);
|
|
}
|
|
this.txtEvaluationDef.Text = personPerfomance.EvaluationDef;
|
|
if (!string.IsNullOrEmpty(personPerfomance.RewardOrPunish))
|
|
{
|
|
if (personPerfomance.RewardOrPunish == "1")
|
|
{
|
|
this.txtRewardOrPunish.Text = "奖励";
|
|
}
|
|
else if (personPerfomance.RewardOrPunish == "2")
|
|
{
|
|
this.txtRewardOrPunish.Text = "处罚";
|
|
}
|
|
}
|
|
if (personPerfomance.RPMoney != null)
|
|
{
|
|
this.txtRPMoney.Text = Convert.ToString(personPerfomance.RPMoney);
|
|
}
|
|
this.txtAssessmentGroup.Text = personPerfomance.AssessmentGroup;
|
|
this.txtBehavior_1.Text = personPerfomance.Behavior_1;
|
|
this.txtBehavior_2.Text = personPerfomance.Behavior_2;
|
|
this.txtBehavior_3.Text = personPerfomance.Behavior_3;
|
|
this.txtBehavior_4.Text = personPerfomance.Behavior_4;
|
|
this.txtBehavior_5.Text = personPerfomance.Behavior_5;
|
|
this.txtBehavior_6.Text = personPerfomance.Behavior_6;
|
|
this.txtBehavior_7.Text = personPerfomance.Behavior_7;
|
|
this.txtBehavior_8.Text = personPerfomance.Behavior_8;
|
|
this.txtBehavior_9.Text = personPerfomance.Behavior_9;
|
|
this.txtBehavior_10.Text = personPerfomance.Behavior_10;
|
|
this.txtScore_1.Text = Convert.ToString(personPerfomance.Score_1);
|
|
this.txtScore_2.Text = Convert.ToString(personPerfomance.Score_2);
|
|
this.txtScore_3.Text = Convert.ToString(personPerfomance.Score_3);
|
|
this.txtScore_4.Text = Convert.ToString(personPerfomance.Score_4);
|
|
this.txtScore_5.Text = Convert.ToString(personPerfomance.Score_5);
|
|
this.txtScore_6.Text = Convert.ToString(personPerfomance.Score_6);
|
|
this.txtScore_7.Text = Convert.ToString(personPerfomance.Score_7);
|
|
this.txtScore_8.Text = Convert.ToString(personPerfomance.Score_8);
|
|
this.txtScore_9.Text = Convert.ToString(personPerfomance.Score_9);
|
|
this.txtScore_10.Text = Convert.ToString(personPerfomance.Score_10);
|
|
this.txtTotalJudging.Text = personPerfomance.TotalJudging;
|
|
this.txtTotalScore.Text = Convert.ToString(personPerfomance.TotalScore);
|
|
this.AttachUrl = personPerfomance.AttachUrl;
|
|
this.divFile1.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../", this.AttachUrl);
|
|
}
|
|
}
|
|
///初始化审核菜单
|
|
this.ctlAuditFlow.MenuId = BLL.Const.PersonPerfomanceMenuId;
|
|
this.ctlAuditFlow.DataId = this.PersonPerfomanceId;
|
|
}
|
|
}
|
|
#endregion
|
|
protected void initContent()
|
|
{
|
|
var contents = Funs.DB.Perfomance_PerfomanceContent.Where(x => x.PerfomanceType == 2).OrderBy(x => x.ShowIndex).ToList();
|
|
int i = 1;
|
|
foreach (var content in contents)
|
|
{
|
|
switch (i)
|
|
{
|
|
case 1:
|
|
row1.Hidden = false;
|
|
txtValue_1.Text = content.PerfomanceValue;
|
|
txtContent_1.Text = content.PerfomanceContent;
|
|
txtScore_1.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 2:
|
|
row2.Hidden = false;
|
|
txtValue_2.Text = content.PerfomanceValue;
|
|
txtContent_2.Text = content.PerfomanceContent;
|
|
txtScore_2.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 3:
|
|
row3.Hidden = false;
|
|
txtValue_3.Text = content.PerfomanceValue;
|
|
txtContent_3.Text = content.PerfomanceContent;
|
|
txtScore_3.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 4:
|
|
row4.Hidden = false;
|
|
txtValue_4.Text = content.PerfomanceValue;
|
|
txtContent_4.Text = content.PerfomanceContent;
|
|
txtScore_4.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 5:
|
|
row5.Hidden = false;
|
|
txtValue_5.Text = content.PerfomanceValue;
|
|
txtContent_5.Text = content.PerfomanceContent;
|
|
txtScore_5.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 6:
|
|
row6.Hidden = false;
|
|
txtValue_6.Text = content.PerfomanceValue;
|
|
txtContent_6.Text = content.PerfomanceContent;
|
|
txtScore_6.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 7:
|
|
row7.Hidden = false;
|
|
txtValue_7.Text = content.PerfomanceValue;
|
|
txtContent_7.Text = content.PerfomanceContent;
|
|
txtScore_7.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 8:
|
|
row8.Hidden = false;
|
|
txtValue_8.Text = content.PerfomanceValue;
|
|
txtContent_8.Text = content.PerfomanceContent;
|
|
txtScore_8.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 9:
|
|
row9.Hidden = false;
|
|
txtValue_9.Text = content.PerfomanceValue;
|
|
txtContent_9.Text = content.PerfomanceContent;
|
|
txtScore_9.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 10:
|
|
row10.Hidden = false;
|
|
txtValue_10.Text = content.PerfomanceValue;
|
|
txtContent_10.Text = content.PerfomanceContent;
|
|
txtScore_10.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 11:
|
|
row11.Hidden = false;
|
|
txtValue_11.Text = content.PerfomanceValue;
|
|
txtContent_11.Text = content.PerfomanceContent;
|
|
txtScore_11.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 12:
|
|
row12.Hidden = false;
|
|
txtValue_12.Text = content.PerfomanceValue;
|
|
txtContent_12.Text = content.PerfomanceContent;
|
|
txtScore_12.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 13:
|
|
row13.Hidden = false;
|
|
txtValue_13.Text = content.PerfomanceValue;
|
|
txtContent_13.Text = content.PerfomanceContent;
|
|
txtScore_13.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 14:
|
|
row14.Hidden = false;
|
|
txtValue_14.Text = content.PerfomanceValue;
|
|
txtContent_14.Text = content.PerfomanceContent;
|
|
txtScore_14.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 15:
|
|
row15.Hidden = false;
|
|
txtValue_15.Text = content.PerfomanceValue;
|
|
txtContent_15.Text = content.PerfomanceContent;
|
|
txtScore_15.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 16:
|
|
row16.Hidden = false;
|
|
txtValue_16.Text = content.PerfomanceValue;
|
|
txtContent_16.Text = content.PerfomanceContent;
|
|
txtScore_16.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 17:
|
|
row17.Hidden = false;
|
|
txtValue_17.Text = content.PerfomanceValue;
|
|
txtContent_17.Text = content.PerfomanceContent;
|
|
txtScore_17.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 18:
|
|
row18.Hidden = false;
|
|
txtValue_18.Text = content.PerfomanceValue;
|
|
txtContent_18.Text = content.PerfomanceContent;
|
|
txtScore_18.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 19:
|
|
row19.Hidden = false;
|
|
txtValue_19.Text = content.PerfomanceValue;
|
|
txtContent_19.Text = content.PerfomanceContent;
|
|
txtScore_19.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
case 20:
|
|
row20.Hidden = false;
|
|
txtValue_20.Text = content.PerfomanceValue;
|
|
txtContent_20.Text = content.PerfomanceContent;
|
|
txtScore_20.MaxValue = double.Parse(content.PerfomanceValue);
|
|
break;
|
|
|
|
}
|
|
i++;
|
|
}
|
|
}
|
|
}
|
|
} |