using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using CY.Model; using CY.BLL; using CY.Infrastructure.Common; using CY.BLL.Sys; using CY.BLL.EC; using CY.Infrastructure.DESEncrypt; using CY.Infrastructure.Query; namespace CY.WebForm.Pages.work { //吴辉 //工作考评 public partial class RequestReplyAdd : BasePage { OA_WorkPlanBll oA_WorkReminderBll = null; public RequestReplyAdd() { oA_WorkReminderBll = new OA_WorkPlanBll(); } //页面加载 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InitData(); } } //数据加载 public void InitData() { OA_WorkPlan m_OA_WorkPlan = oA_WorkReminderBll.GetModelByKeyid(Request["keyid"].ToInt32()); if (m_OA_WorkPlan.EvaluationStatus != 0) { JavaScript.MessageBox("此记录已考评", this, true, true); return; } if (m_OA_WorkPlan != null) { this.spanPlanDataType.InnerText = m_OA_WorkPlan.PlanDataTypeName.ToString(); this.spanPlanMoney.InnerText = m_OA_WorkPlan.PlanMoney.Value.ToString("0.00"); this.spanPlanPeople.InnerText = m_OA_WorkPlan.PlanPeople.ToString(); this.spanPlanStartTime.InnerText = m_OA_WorkPlan.PlanStartTime.ToString(); this.spanPlanRemark.InnerText = m_OA_WorkPlan.PlanRemark.ToString(); this.spanPlanTitle.InnerText = m_OA_WorkPlan.PlanTitle.ToString(); this.spanPlanContent.InnerText = m_OA_WorkPlan.PlanContent.ToString(); } } //表单提交 protected void btn_submit_form(object sender, EventArgs e) { try { DateTime nowTime = DateTime.Now; OA_WorkPlan m_OA_WorkPlan = oA_WorkReminderBll.GetModelByKeyid(Request["keyid"].ToInt32()); m_OA_WorkPlan.ApprovalContent = this.txtApprovalContent.Value.Trim(); m_OA_WorkPlan.ApprovalStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.ApprovalStaffName = CurrentUser.TrueName; m_OA_WorkPlan.ApprovalStatus = this.selApprovalStatus.Value.ToInt32(); m_OA_WorkPlan.ApprovalTime = nowTime; m_OA_WorkPlan.PlanStatus = 2; m_OA_WorkPlan.Operator = CurrentUser.ShortName; m_OA_WorkPlan.LastUpdateTime = nowTime; if (Request["keyid"].ToInt32() > 0) { if (oA_WorkReminderBll.UpdateModel(m_OA_WorkPlan)) JavaScript.MessageBox("审批成功", this, true, true); else JavaScript.MessageBox("操作失败", this); } else JavaScript.MessageBox("操作失败", this); } catch (Exception ex) { PAGEHandleException(ex); JavaScript.MessageBox("操作失败", this); } } } }