/// <summary> /// 提交按钮处理事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void SubmitBtn_Click(object sender, EventArgs e) { try { //提交动作 base.SubAction = ((Button)sender).Text.Trim(); string strErrorMessage = string.Empty; //保存 if (base.SubAction == ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT) { B_FinanceCCBX entity = ControlToEntity(true) as B_FinanceCCBX; entity.SubmitAction = base.SubAction; base.FormSubmit(true, base.SubAction, null, entity); } else { B_FinanceCCBX entity = ControlToEntity(false) as B_FinanceCCBX; entity.SubmitAction = base.SubAction; //撤销 if (base.SubAction == ProcessConstString.SubmitAction.ACTION_CANCEL) { base.FormCancel(entity); } else { //返回验证提示和流程提示 entity.GetSubmitMessage(base.StepName, base.SubAction, ref strErrorMessage); if (!string.IsNullOrEmpty(strErrorMessage)) { JScript.Alert(strErrorMessage, true); return; } else { //调用工作流 Hashtable nValues = entity.GetProcNameValue(base.StepName, base.SubAction); base.FormSubmit(false, base.SubAction, nValues, entity); //财务审核通过后调用 if (base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_CWVERIFY) { if (base.SubAction == btnCaiWuPass.ToolTip) { CaiWuFeiYong(); } } } } } } catch (Exception ex) { JScript.Alert(ex.Message, true); return; } }
/// <summary> /// 实体赋值 /// </summary> /// <param name="IsSave"></param> /// <returns></returns> protected override EntityBase ControlToEntity(bool IsSave) { B_FinanceCCBX entity = base.EntityData != null ? base.EntityData as B_FinanceCCBX : new B_FinanceCCBX(); switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: entity.Type = ddlType.SelectedValue; entity.ChuChaDanHao = txtChuChaDanHao.Text; entity.DocumentNo = txtBianHao.Text; //拟稿日期 entity.DraftDate = DateTime.Now; //拟稿人 entity.Drafter = this.txtNiGaoRen.Text; entity.DrafterID = this.txtNiGaoRenID.Text; //标题、主题 entity.DocumentTitle = entity.Drafter + "-" + ddlType.SelectedValue + "报销单"; if (ddlZhiCheng.SelectedItem != null) { entity.ZhiWuZhiCheng = ddlZhiCheng.SelectedItem.Text; } entity.ZhiWuZhiChengID = ddlZhiCheng.SelectedValue; //编制部门 if (this.ddlBianZhiBuMen.Items.Count > 0) { entity.Department = this.ddlBianZhiBuMen.SelectedItem.Text; entity.DepartmentID = this.ddlBianZhiBuMen.SelectedValue; } entity.GeRenJieKuan = ddlJieKuan.SelectedValue; entity.Phone = txtPhone.Text; entity.DanJuZhangShu = SysConvert.ToInt32(txtDanJuZhangShu.Text); entity.ShiYou = txtShiYou.Text; //主管领导 entity.BuMenZhuGuan = this.ddlBuMenZhuGuan.SelectedItem.Text; entity.BuMenZhuGuanID = this.ddlBuMenZhuGuan.SelectedValue; //公司领导 if (this.ddlGSLingDao.SelectedItem != null) { entity.GongSiLingDao = this.ddlGSLingDao.SelectedItem.Text; } entity.GongSiLingDaoID = this.ddlGSLingDao.SelectedValue; //提交后产生报销单编号 报销单的编号为BX+部门代码+年度+四位流水号。 if (IsSave == false && entity.DocumentNo == "") { string year = DateTime.Now.Year.ToString(); string deptNo = OADept.GetDeptByDeptID(entity.DepartmentID).No; if (ddlType.SelectedValue == "出差") { entity.DocumentNo = "CCBX" + "-" + deptNo + "-" + entity.GenerateBianHao(year, "出差报销单"); } else { entity.DocumentNo = "PXBX" + "-" + deptNo + "-" + entity.GenerateBianHao(year, "培训报销单"); } } break; #endregion #region 主管领导审核 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_DEPTVERIFY: if (base.SubAction == ProcessConstString.SubmitAction.ACTION_DENY) { entity.IsBack = true; } else { entity.IsBack = false; entity.BuMenZhuGuanRiQi = DateTime.Now.ToString("yyyy-MM-dd"); //公司领导 if (this.ddlGSLingDao.SelectedItem != null) { entity.GongSiLingDao = this.ddlGSLingDao.SelectedItem.Text; entity.GongSiLingDaoID = this.ddlGSLingDao.SelectedValue; } //财务 if (this.ddlCaiWu.SelectedItem != null) { entity.CaiWu = this.ddlCaiWu.SelectedItem.Text; entity.CaiWuID = this.ddlCaiWu.SelectedValue; } //归口部门主管 培训处领导 if (this.ddlPeiXunChu.SelectedItem != null) { entity.PeiXunChuLingDao = this.ddlPeiXunChu.SelectedItem.Text; entity.PeiXunChuLingDaoID = this.ddlPeiXunChu.SelectedValue; } } break; #endregion #region 培训处审核 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_PXCVERIFY: if (base.SubAction == ProcessConstString.SubmitAction.ACTION_DENY) { entity.IsBack = true; } else { entity.IsBack = false; entity.PeiXunChuLingDaoRiQi = DateTime.Now.ToString("yyyy-MM-dd"); //公司领导 if (this.ddlGSLingDao.SelectedItem != null) { entity.GongSiLingDao = this.ddlGSLingDao.SelectedItem.Text; entity.GongSiLingDaoID = this.ddlGSLingDao.SelectedValue; } //财务 if (this.ddlCaiWu.SelectedItem != null) { entity.CaiWu = this.ddlCaiWu.SelectedItem.Text; entity.CaiWuID = this.ddlCaiWu.SelectedValue; } } break; #endregion #region 公司领导 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_GSLDVERIFY: if (base.SubAction == ProcessConstString.SubmitAction.ACTION_DENY) { entity.IsBack = true; } else { entity.IsBack = false; entity.GongSiLingDaoRiQi = DateTime.Now.ToString("yyyy-MM-dd"); //财务 if (this.ddlCaiWu.SelectedItem != null) { entity.CaiWu = this.ddlCaiWu.SelectedItem.Text; entity.CaiWuID = this.ddlCaiWu.SelectedValue; } } break; #endregion #region 财务 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_CWVERIFY: if (base.SubAction == ProcessConstString.SubmitAction.ACTION_DENY) { entity.IsBack = true; } else { entity.IsBack = false; entity.CaiWuRiQi = DateTime.Now.ToString("yyyy-MM-dd"); } break; #endregion } //费用相关 拟稿人和财务都会改 if (base.StepName == ProcessConstString.StepName.STEP_DRAFT || base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_CWVERIFY) { entity.LiXiangHao = txtLiXiangHao.Text; entity.LiXiangJE = txtLiXiangJE.Text.ToString(); entity.YuSuanNei = ddlYuSuanNei.SelectedValue; #region 费用 entity.ChuXingDetails = ucChuXingMingXi.UCGetCXList(); //其他费用 entity.QiTaFeiYongDetails = new List <M_FinanceCCBX.QiTaFeiYongDetail>(); M_FinanceCCBX.QiTaFeiYongDetail qiTaFeiYongDetail = new M_FinanceCCBX.QiTaFeiYongDetail(); qiTaFeiYongDetail.Name = "住宿费"; qiTaFeiYongDetail.RenTian = SysConvert.ToDecimal(txtZhuSuRT.Text); qiTaFeiYongDetail.JinE = SysConvert.ToDecimal(txtZhuSuJE.Text); entity.QiTaFeiYongDetails.Add(qiTaFeiYongDetail); qiTaFeiYongDetail = new M_FinanceCCBX.QiTaFeiYongDetail(); qiTaFeiYongDetail.Name = "托运费"; qiTaFeiYongDetail.RenTian = SysConvert.ToDecimal(txtTuoYunRT.Text); qiTaFeiYongDetail.JinE = SysConvert.ToDecimal(txtTuoYunJE.Text); entity.QiTaFeiYongDetails.Add(qiTaFeiYongDetail); qiTaFeiYongDetail = new M_FinanceCCBX.QiTaFeiYongDetail(); qiTaFeiYongDetail.Name = "其他"; qiTaFeiYongDetail.RenTian = SysConvert.ToDecimal(txtQiTaRT.Text); qiTaFeiYongDetail.JinE = SysConvert.ToDecimal(txtQiTaJE.Text); entity.QiTaFeiYongDetails.Add(qiTaFeiYongDetail); //其他费用小计 Decimal qiTaXiaoJi = 0; foreach (var item in entity.QiTaFeiYongDetails) { qiTaXiaoJi += item.JinE; } entity.QiTaFeiYongXiaoJi = qiTaXiaoJi; //出差补贴 entity.BuTieDetails = new List <M_FinanceCCBX.BuTieDetail>(); M_FinanceCCBX.BuTieDetail buTieDetail = new M_FinanceCCBX.BuTieDetail(); buTieDetail.Name = "住勤补贴"; buTieDetail.RenTian = SysConvert.ToDecimal(txtZhuQinRT.Text); buTieDetail.JinE = SysConvert.ToDecimal(txtZhuQinJE.Text); entity.BuTieDetails.Add(buTieDetail); buTieDetail = new M_FinanceCCBX.BuTieDetail(); buTieDetail.Name = "住宿节约补贴"; buTieDetail.RenTian = SysConvert.ToDecimal(txtZhuSuJYRT.Text); buTieDetail.JinE = SysConvert.ToDecimal(txtZhuSuJYJE.Text); entity.BuTieDetails.Add(buTieDetail); buTieDetail = new M_FinanceCCBX.BuTieDetail(); buTieDetail.Name = "未乘坐卧铺补贴"; buTieDetail.RenTian = SysConvert.ToDecimal(txtWeiWoPuRT.Text); buTieDetail.JinE = SysConvert.ToDecimal(txtWeiWoPuBuJE.Text); entity.BuTieDetails.Add(buTieDetail); buTieDetail = new M_FinanceCCBX.BuTieDetail(); buTieDetail.Name = "在途补贴"; buTieDetail.RenTian = SysConvert.ToDecimal(txtZaiTuRT.Text); buTieDetail.JinE = SysConvert.ToDecimal(txtZaiTuJE.Text); entity.BuTieDetails.Add(buTieDetail); //出差补贴小计 Decimal chuChaXiaoJi = 0; foreach (var item in entity.BuTieDetails) { chuChaXiaoJi += item.JinE; } entity.BuTieXiaoJi = chuChaXiaoJi; //合计 entity.HeJi = SysConvert.ToDecimal(txtHeJi.Text); entity.CaiWuShenHeJinE = txtCaiWuJE.Text; entity.ZhuQinToolTip = txtZhuQinJE.ToolTip; entity.ZhuSuToolTip = txtZhuSuJE.ToolTip; entity.ZiXingToolTip = txtZiXingJinE.ToolTip; #endregion entity.ChangQiBuTie = txtChangQiBuTie.Text; entity.ZiXingTianShu = SysConvert.ToInt32(txtZiXingTianShu1.Text); entity.ZiXingJinE = SysConvert.ToDecimal(txtZiXingJinE.Text); } #region 提示信息、意见 if (!IsSave) { if (!string.IsNullOrEmpty(this.txtTianJia.Text)) { entity.MessageAdd = string.Empty; entity.Message = this.txtTiShiXinXi.Text + (string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName) + "[" + DateTime.Now.ToString(ConstString.DateFormat.Long) + "]:(" + base.StepName + ")" + SysString.InputText(this.txtTianJia.Text) + "\n"; } } else { entity.Message = this.txtTiShiXinXi.Text; entity.MessageAdd = this.txtTianJia.Text; } #endregion return(entity); }
/// <summary> /// 控件初始设置 /// </summary> protected override void SetControlStatus() { B_FinanceCCBX entity = base.EntityData != null ? base.EntityData as B_FinanceCCBX : new B_FinanceCCBX(); if (this.ddlType.SelectedValue == "出差") { FileTitle = "海南核电有限公司出差报销单"; } else { FileTitle = "海南核电有限公司培训报销单"; } OAControl controls = new OAControl(); if (!base.IsPreview) { switch (base.StepName) { #region 拟稿 case ProcessConstString.StepName.STEP_DRAFT: this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}"); //控制撤销按钮显示 this.btnCancel.Visible = this.txtIsBack.Text == "True"; this.txtNiGaoRen.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtNiGaoRenID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; //控件状态控制 controls.DisEnableControls = new Control[] { this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.txtQiTaXiaoJi, this.txtBuTieXiaoJi, this.txtHeJi, this.txtZhuQinRT, this.txtZhuQinJE, this.txtZhuSuJYRT, this.txtZhuSuJYJE, this.txtWeiWoPuBuJE, this.txtWeiWoPuRT, this.txtZaiTuRT, this.txtZaiTuJE, this.txtCaiWuJE, this.ddlCaiWu, this.ddlPeiXunChu, this.txtChangQiBuTie, this.txtZiXingTianShu2, this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal2, this.btnPeiXunChu, this.btnGongSiLingDao, this.btnCaiWu, this.btnTuiHui, this.ucPrint, this.btnCaiWuPass, this.btnWanCheng, }; this.txtBianHao.ToolTip = "提交后生成"; if (entity.IsBack == true) { btnCancel.Visible = true; } break; #endregion #region 主管领导 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_DEPTVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao, this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.ddlZhiCheng, this.ddlBianZhiBuMen, this.ddlJieKuan, this.txtPhone, this.txtDanJuZhangShu, this.txtShiYou, this.txtZhuSuRT, this.txtZhuSuJE, this.txtTuoYunRT, this.txtTuoYunJE, this.txtQiTaRT, this.txtQiTaJE, this.txtQiTaXiaoJi, this.txtZhuQinRT, this.txtZhuQinJE, this.txtZhuSuJYRT, this.txtZhuSuJYJE, this.txtWeiWoPuRT, this.txtWeiWoPuBuJE, this.txtZaiTuRT, this.txtZaiTuJE, this.txtBuTieXiaoJi, this.txtHeJi, this.txtCaiWuJE, this.ddlBuMenZhuGuan, this.txtLiXiangHao, this.txtLiXiangJE, this.ddlYuSuanNei, this.txtChangQiBuTie, this.txtZiXingTianShu1, this.txtZiXingTianShu2, this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal1, this.btnCal2, this.btnBuMenZhuGuan, this.ucPrint, this.btnCaiWuPass, this.btnCancel, this.btnWanCheng, }; ucChuXingMingXi.UCIsDisEnable = true; this.tableCCCS.Visible = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } else { this.btnGongSiLingDao.Visible = false; this.btnCaiWu.Visible = false; } break; #endregion #region 培训处 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_PXCVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao, this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.ddlZhiCheng, this.ddlBianZhiBuMen, this.ddlJieKuan, this.txtPhone, this.txtDanJuZhangShu, this.txtShiYou, this.txtZhuSuRT, this.txtZhuSuJE, this.txtTuoYunRT, this.txtTuoYunJE, this.txtQiTaRT, this.txtQiTaJE, this.txtQiTaXiaoJi, this.txtZhuQinRT, this.txtZhuQinJE, this.txtZhuSuJYRT, this.txtZhuSuJYJE, this.txtWeiWoPuRT, this.txtWeiWoPuBuJE, this.txtZaiTuRT, this.txtZaiTuJE, this.txtBuTieXiaoJi, this.txtHeJi, this.txtCaiWuJE, this.ddlBuMenZhuGuan, this.ddlPeiXunChu, this.txtLiXiangHao, this.txtLiXiangJE, this.ddlYuSuanNei, this.txtChangQiBuTie, this.txtZiXingTianShu1, this.txtZiXingTianShu2, this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal1, this.btnCal2, this.btnPeiXunChu, this.btnBuMenZhuGuan, this.ucPrint, this.btnCaiWuPass, this.btnCancel, this.btnWanCheng, }; ucChuXingMingXi.UCIsDisEnable = true; this.tableCCCS.Visible = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } break; #endregion #region 公司领导 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_GSLDVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao, this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.ddlZhiCheng, this.ddlBianZhiBuMen, this.ddlJieKuan, this.txtPhone, this.txtDanJuZhangShu, this.txtShiYou, this.txtZhuSuRT, this.txtZhuSuJE, this.txtTuoYunRT, this.txtTuoYunJE, this.txtQiTaRT, this.txtQiTaJE, this.txtQiTaXiaoJi, this.txtZhuQinRT, this.txtZhuQinJE, this.txtZhuSuJYRT, this.txtZhuSuJYJE, this.txtWeiWoPuRT, this.txtWeiWoPuBuJE, this.txtZaiTuRT, this.txtZaiTuJE, this.txtBuTieXiaoJi, this.txtHeJi, this.txtCaiWuJE, this.ddlBuMenZhuGuan, this.ddlGSLingDao, this.ddlPeiXunChu, this.txtLiXiangHao, this.txtLiXiangJE, this.ddlYuSuanNei, this.txtChangQiBuTie, this.txtZiXingTianShu1, this.txtZiXingTianShu2, this.txtZiXingJinE, }; controls.DisVisibleControls = new Control[] { this.btnCal1, this.btnCal2, this.btnBuMenZhuGuan, this.btnPeiXunChu, this.btnGongSiLingDao, this.ucPrint, this.btnCaiWuPass, this.btnCancel, this.btnWanCheng, }; ucChuXingMingXi.UCIsDisEnable = true; this.tableCCCS.Visible = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } break; #endregion #region 财务 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_CWVERIFY: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao, this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.ddlZhiCheng, this.ddlBianZhiBuMen, this.ddlJieKuan, this.txtPhone, this.txtDanJuZhangShu, this.txtShiYou, this.ddlBuMenZhuGuan, this.ddlGSLingDao, this.ddlCaiWu, this.ddlPeiXunChu, }; controls.DisVisibleControls = new Control[] { this.btnBuMenZhuGuan, this.btnPeiXunChu, this.btnGongSiLingDao, this.btnCaiWu, this.ucPrint, this.btnCancel, this.btnWanCheng, }; break; #endregion #region 反馈报销人 case ProcessConstString.StepName.FinanceCCBXStepName.STEP_FANKUI: //控件状态控制 controls.DisEnableControls = new Control[] { this.txtChuChaDanHao, this.txtNiGaoRen, this.txtNiGaoRiQi, this.txtBianHao, this.ddlZhiCheng, this.ddlBianZhiBuMen, this.ddlJieKuan, this.txtPhone, this.txtDanJuZhangShu, this.txtShiYou, this.txtZhuSuRT, this.txtZhuSuJE, this.txtTuoYunRT, this.txtTuoYunJE, this.txtQiTaRT, this.txtQiTaJE, this.txtQiTaXiaoJi, this.txtZhuQinRT, this.txtZhuQinJE, this.txtZhuSuJYRT, this.txtZhuSuJYJE, this.txtWeiWoPuRT, this.txtWeiWoPuBuJE, this.txtZaiTuRT, this.txtZaiTuJE, this.txtBuTieXiaoJi, this.txtHeJi, this.txtCaiWuJE, this.ddlBuMenZhuGuan, this.ddlGSLingDao, this.ddlCaiWu, this.ddlPeiXunChu, this.txtLiXiangHao, this.txtLiXiangJE, this.ddlYuSuanNei, this.txtZiXingTianShu1, this.txtZiXingTianShu2, this.txtZiXingJinE, this.txtChangQiBuTie, }; controls.DisVisibleControls = new Control[] { this.btnCal1, this.btnCal2, this.btnBuMenZhuGuan, this.btnPeiXunChu, this.btnGongSiLingDao, this.btnCaiWu, this.btnTuiHui, this.ucPrint, this.btnCaiWuPass, this.btnCancel, this.btnSave, }; ucChuXingMingXi.UCIsDisEnable = true; this.chkIsYiXian.Enabled = false; if (this.ddlType.SelectedValue == "出差") { this.btnPeiXunChu.Visible = false; } break; #endregion } //设置所有控件状态 controls.SetControls(); } else { FormsMethod.SetControlAll(this); } }
/// <summary> /// 实体加载 /// </summary> protected override void EntityToControl() { B_FinanceCCBX entity = base.EntityData != null ? base.EntityData as B_FinanceCCBX : new B_FinanceCCBX(); //拟稿 if (base.StepName == ProcessConstString.StepName.STEP_DRAFT && !base.IsPreview) { //编制部门 OADept.GetDeptByUser(this.ddlBianZhiBuMen, CurrentUserInfo.UserName, 1, true, false); //部门负责人 if (this.ddlBianZhiBuMen.Items.Count > 0) { ddlBianZhiBuMen_SelectedIndexChanged(null, null); } //拟稿日期 txtNiGaoRiQi.Text = DateTime.Now.ToString("yyyy-MM-dd"); //拟稿人 this.txtNiGaoRen.Text = CurrentUserInfo.DisplayName; this.txtNiGaoRenID.Text = CurrentUserInfo.UserName; this.txtPhone.Text = CurrentUserInfo.OfficePhone; if (entity.ChuXingDetails.Count == 0) //默认加载一行 不然日期控件会失效 { ucChuXingMingXi.UCIsFirst = true; } OAUser.GetUserByRole(this.ddlGSLingDao, OUConstString.RoleName.COMPANY_LEADER); if (base.StepName == ProcessConstString.StepName.STEP_DRAFT && !base.IsPreview) { if (string.IsNullOrEmpty(base.WorkItemID)) { this.lbJs.Text = "<script>ShowMyDiv();</script>"; } } } else { FormsMethod.SetDropDownList(this.ddlBianZhiBuMen, entity.DepartmentID, entity.Department); FormsMethod.SetDropDownList(this.ddlBuMenZhuGuan, entity.BuMenZhuGuanID, entity.BuMenZhuGuan); FormsMethod.SetDropDownList(this.ddlGSLingDao, entity.GongSiLingDaoID, entity.GongSiLingDao); this.txtNiGaoRen.Text = entity.Drafter; this.txtNiGaoRenID.Text = entity.DrafterID; } //主管领导 if (base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_DEPTVERIFY) { OAUser.GetUserByRole(this.ddlGSLingDao, OUConstString.RoleName.COMPANY_LEADER); OAUser.GetUserByRole(this.ddlCaiWu, OUConstString.RoleName.CaiWu); OAUser.GetUserByRole(this.ddlPeiXunChu, OUConstString.RoleName.PeiXunChuLD); } //培训处 if (base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_PXCVERIFY) { OAUser.GetUserByRole(this.ddlGSLingDao, OUConstString.RoleName.COMPANY_LEADER); OAUser.GetUserByRole(this.ddlCaiWu, OUConstString.RoleName.CaiWu); } //公司领导 if (base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_GSLDVERIFY) { OAUser.GetUserByRole(this.ddlCaiWu, OUConstString.RoleName.CaiWu); } //财务 if (base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_CWVERIFY) { } //反馈报销人 if (base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_FANKUI) { } if (txtNiGaoRen.Text == "") { txtNiGaoRen.Text = entity.Drafter; } if (txtPhone.Text == "") { txtPhone.Text = entity.Phone; } if (txtNiGaoRiQi.Text == "") { txtNiGaoRiQi.Text = entity.DraftDate.ToString("yyyy-MM-dd"); } FormsMethod.SelectedDropDownList(this.ddlType, entity.Type); txtType.Text = entity.Type; if (txtType.Text != "") { ddlType_SelectedIndexChanged(null, null); } txtChuChaDanHao.Text = entity.ChuChaDanHao; txtBianHao.Text = entity.DocumentNo; FormsMethod.SelectedDropDownList(this.ddlZhiCheng, entity.ZhiWuZhiChengID, entity.ZhiWuZhiCheng); FormsMethod.SelectedDropDownList(this.ddlBianZhiBuMen, entity.DepartmentID, entity.Department); FormsMethod.SelectedDropDownList(this.ddlJieKuan, entity.GeRenJieKuan); if (entity.DanJuZhangShu == Int32.MinValue) { txtDanJuZhangShu.Text = ""; } else { txtDanJuZhangShu.Text = entity.DanJuZhangShu.ToString(); } txtShiYou.Text = entity.ShiYou; ucChuXingMingXi.UCCXList = entity.ChuXingDetails; foreach (var item in entity.QiTaFeiYongDetails) { if (item.Name == "住宿费") { txtZhuSuRT.Text = item.RenTian.ToString(); txtZhuSuJE.Text = item.JinE.ToString(); } else if (item.Name == "托运费") { txtTuoYunRT.Text = item.RenTian.ToString(); txtTuoYunJE.Text = item.JinE.ToString(); } else if (item.Name == "其他") { txtQiTaRT.Text = item.RenTian.ToString(); txtQiTaJE.Text = item.JinE.ToString(); } } //其他费用小计 if (entity.QiTaFeiYongXiaoJi == Decimal.MinValue) { txtQiTaXiaoJi.Text = ""; } else { txtQiTaXiaoJi.Text = entity.QiTaFeiYongXiaoJi.ToString(); } foreach (var item in entity.BuTieDetails) { if (item.Name == "住勤补贴") { txtZhuQinRT.Text = item.RenTian.ToString(); txtZhuQinJE.Text = item.JinE.ToString(); } else if (item.Name == "住宿节约补贴") { txtZhuSuJYRT.Text = item.RenTian.ToString(); txtZhuSuJYJE.Text = item.JinE.ToString(); } else if (item.Name == "未乘坐卧铺补贴") { txtWeiWoPuRT.Text = item.RenTian.ToString(); txtWeiWoPuBuJE.Text = item.JinE.ToString(); } else if (item.Name == "在途补贴") { txtZaiTuRT.Text = item.RenTian.ToString(); txtZaiTuJE.Text = item.JinE.ToString(); } } if (entity.BuTieXiaoJi == Decimal.MinValue) { txtBuTieXiaoJi.Text = ""; } else { txtBuTieXiaoJi.Text = entity.BuTieXiaoJi.ToString(); } //培训特有 txtLiXiangHao.Text = entity.LiXiangHao; FormsMethod.SelectedDropDownList(this.ddlYuSuanNei, entity.YuSuanNei); txtLiXiangJE.Text = entity.LiXiangJE.ToString(); if (entity.HeJi == Decimal.MinValue) { txtHeJi.Text = ""; } else { txtHeJi.Text = entity.HeJi.ToString(); } txtCaiWuJE.Text = entity.CaiWuShenHeJinE.ToString(); txtZhuQinJE.ToolTip = entity.ZhuQinToolTip; txtZhuSuJE.ToolTip = entity.ZhuSuToolTip; txtZiXingJinE.ToolTip = entity.ZiXingToolTip; FormsMethod.SelectedDropDownList(this.ddlBuMenZhuGuan, entity.BuMenZhuGuanID, entity.BuMenZhuGuan); FormsMethod.SelectedDropDownList(this.ddlGSLingDao, entity.GongSiLingDaoID, entity.GongSiLingDao); FormsMethod.SelectedDropDownList(this.ddlCaiWu, entity.CaiWuID, entity.CaiWu); FormsMethod.SelectedDropDownList(this.ddlPeiXunChu, entity.PeiXunChuLingDaoID, entity.PeiXunChuLingDao); txtChangQiBuTie.Text = entity.ChangQiBuTie; if (entity.ZiXingTianShu == Int32.MinValue) { txtZiXingTianShu1.Text = ""; txtZiXingTianShu2.Text = ""; } else { txtZiXingTianShu1.Text = entity.ZiXingTianShu.ToString(); txtZiXingTianShu2.Text = entity.ZiXingTianShu.ToString(); } if (entity.ZiXingJinE == Decimal.MinValue) { txtZiXingJinE.Text = ""; } else { txtZiXingJinE.Text = entity.ZiXingJinE.ToString(); } //提示信息 this.txtTiShiXinXi.Text = entity.Message; this.txtTianJia.Text = entity.MessageAdd; }