protected void ddlBianZhiBuMen_SelectedIndexChanged(object sender, EventArgs e) { if (this.ddlBianZhiBuMen.Items.Count > 0) { //GetChildDeptIDSConSelf OAUser.GetUserByDeptPost(this.ddlYanShouRen, this.ddlBianZhiBuMen.SelectedValue, OUConstString.PostName.FUKEZHANG, true, true, -1); } }
protected void ddlBianZhiBuMen_SelectedIndexChanged(object sender, EventArgs e) { //部门负责人 if (this.ddlBianZhiBuMen.Items.Count > 0) { OAUser.GetUserByDeptPost(this.ddlFuZeRen, this.ddlBianZhiBuMen.SelectedValue, OUConstString.PostName.CHUZHANG, true, true); } }
protected void ddlBianZhiBuMen_SelectedIndexChanged(object sender, EventArgs e) { //部门负责人 if (this.ddlBianZhiBuMen.Items.Count > 0) { OAUser.GetUserByDeptPost(this.ddlBuMenZhuGuan, this.ddlBianZhiBuMen.SelectedValue, OUConstString.PostName.FUCHUZHANG, true, true); if (this.ddlBuMenZhuGuan.Items.Count == 2) { if (this.ddlBuMenZhuGuan.Items[1].Value == CurrentUserInfo.UserName) { ddlBuMenZhuGuan.Items.Clear(); OAUser.GetUserByRole(this.ddlBuMenZhuGuan, OUConstString.RoleName.COMPANY_LEADER); } } } }
/// <summary> /// 实体加载 /// </summary> protected override void EntityToControl() { B_FinanceHWBX entity = base.EntityData != null ? base.EntityData as B_FinanceHWBX : new B_FinanceHWBX(); //拟稿 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; } else { FormsMethod.SetDropDownList(this.ddlBianZhiBuMen, entity.DepartmentID, entity.Department); FormsMethod.SetDropDownList(this.ddlYanShouRen, entity.YanShouRenID, entity.YanShouRen); FormsMethod.SetDropDownList(this.ddlShenQianRen, entity.ShenQianRenID, entity.ShenQianRen); FormsMethod.SetDropDownList(this.ddlShenHe, entity.ShenHeRenID, entity.ShenHeRen); FormsMethod.SetDropDownList(this.ddlShenPi, entity.ShenPiRenID, entity.ShenPiRen); this.txtNiGaoRen.Text = entity.Drafter; this.txtNiGaoRenID.Text = entity.DrafterID; } //验收 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_YANSHOU) { OAUser.GetUserByRole(this.ddlShenQianRen, "立项审签"); } //立项审签 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_LIXIANGSHENQIAN) { if (this.ddlBianZhiBuMen.Items.Count > 0) { OAUser.GetUserByDeptPost(this.ddlShenHe, this.ddlBianZhiBuMen.SelectedValue, OUConstString.PostName.FUCHUZHANG, true, true); } } //审核 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_SHENHE) { OAUser.GetUserByRole(this.ddlShenPi, OUConstString.RoleName.COMPANY_LEADER); OAUser.GetUserByRole(this.ddlCaiWu, OUConstString.RoleName.CaiWu); } //审批 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_SHENPI) { OAUser.GetUserByRole(this.ddlCaiWu, OUConstString.RoleName.CaiWu); } //财务 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_CAIWUSHENHE) { } //反馈报销人 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_FANKUI) { } if (txtNiGaoRen.Text == "") { txtNiGaoRen.Text = entity.Drafter; } if (txtNiGaoRiQi.Text == "") { txtNiGaoRiQi.Text = entity.DraftDate.ToString("yyyy-MM-dd"); } txtDocumentNo.Text = entity.DocumentNo; FormsMethod.SelectedDropDownList(this.ddlBianZhiBuMen, entity.DepartmentID, entity.Department); if (entity.DanJuZhangShu == Int32.MinValue) { txtDanJuZhangShu.Text = ""; } else { txtDanJuZhangShu.Text = entity.DanJuZhangShu.ToString(); } txtYongTu.Text = entity.YongTu; txtShouKuanYinHang.Text = entity.ShouKuanYinHang; txtShouKuanDanWei.Text = entity.ShouKuanDanWei; txtShouKuanZhangHao.Text = entity.ShouKuanZhangHao; txtBaoXiaoJinE.Text = entity.BaoXiaoJinE; txtBaoXiaoJinEDaXie.Text = entity.BaoXiaoJinEDaXie; txtLiXiangHao.Text = entity.LiXiangHao; txtLiXiangJinE.Text = entity.LiXiangJinE.ToString(); txtLiXiangLeiJiJinE.Text = entity.LiXiangLeiJiJinE.ToString(); FormsMethod.SelectedDropDownList(this.ddlYanShouRen, entity.YanShouRenID, entity.YanShouRen); FormsMethod.SelectedDropDownList(this.ddlShenQianRen, entity.ShenQianRenID, entity.ShenQianRen); FormsMethod.SelectedDropDownList(this.ddlShenHe, entity.ShenHeRenID, entity.ShenHeRen); FormsMethod.SelectedDropDownList(this.ddlShenPi, entity.ShenPiRenID, entity.ShenPiRen); FormsMethod.SelectedDropDownList(this.ddlCaiWu, entity.CaiWuID, entity.CaiWu); //提示信息 this.txtTiShiXinXi.Text = entity.Message; this.txtTianJia.Text = entity.MessageAdd; }
/// <summary> /// 实体加载 /// </summary> protected override void EntityToControl() { B_Finance entity = base.EntityData != null ? base.EntityData as B_Finance : new B_Finance(); //拟稿人 this.txtNiGaoRen.Text = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName; this.txtNiGaoRenID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; //新版OA时间精确到秒(控制时间的显示格式) //bool isOld = entity.DraftDate < base.OAStartTime; //职务 drpZhiWu.DataSource = GetPostList(); drpZhiWu.DataBind(); drpZhiCheng.DataSource = GetTitleList(); drpZhiCheng.DataBind(); //附件 ucAttachment.UCDataList = entity.FileList; this.txtFeeYuSuan.Text = entity.FeeYuSuan; this.txtFeeFaSheng.Text = entity.FeeFaSheng; this.txtShenPiYiJian.Text = entity.ShenPiYiJian; //编制部门及预算 if (base.StepName == ProcessConstString.StepName.STEP_DRAFT && !base.IsPreview) { OADept.GetDeptByUser(this.ddlBianZhiBuMen, string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID, 1, true, false); FormsMethod.SelectedDropDownList(this.ddlBianZhiBuMen, entity.BianZhiBuMenID); B_FinanceDeptInfo bllInfo = new B_FinanceDeptInfo(); M_FinanceDeptInfo info = bllInfo.GetFinanceDeptInfoByDeptID(DateTime.Now.Year.ToString(), this.ddlBianZhiBuMen.SelectedValue); this.txtFeeYuSuan.Text = info.TripBudgetCost; this.txtFeeFaSheng.Text = info.TripUseCost; string ManagerDeptID = OADept.GetDeptID("总经理部"); Double FeeFa = Convert.ToDouble(string.IsNullOrEmpty(txtFeeFaSheng.Text) ? "0" : txtFeeFaSheng.Text); Double FeeYu = Convert.ToDouble(string.IsNullOrEmpty(txtFeeYuSuan.Text) ? "0" : txtFeeYuSuan.Text); Double Rate = (string.IsNullOrEmpty(FeeRate) == true ? 0.1 : Convert.ToDouble(FeeRate)); if ((FeeFa - FeeYu) / FeeYu > Rate) { OAUser.GetUserByDeptPost(ddlZongJingLi, ManagerDeptID, OUConstString.PostName.ZONGJINGLI, true, false, 1); ddlZongJingLi.Enabled = true; this.SubmitStatus = 1; } else if (FeeFa > FeeYu) { OAUser.GetUserByDeptPost(ddlZhuGuanLingDao, ManagerDeptID, OUConstString.PostName.FUZONGJINGLI, true, false, 1); ddlZhuGuanLingDao.Enabled = true; this.SubmitStatus = 2; } else if (FeeFa <= FeeYu) { OAUser.GetUserByDeptPost(ddlChuLingDao, this.ddlBianZhiBuMen.SelectedValue, OUConstString.PostName.CHUZHANG, false, true, 0); ddlChuLingDao.Enabled = true; this.SubmitStatus = 3; } ListItem item = new ListItem(this.txtNiGaoRen.Text, this.txtNiGaoRenID.Text); if (ddlChuLingDao.Items.Contains(item)) { ddlChuLingDao.Items.Clear(); OAUser.GetUserByDeptPost(ddlZhuGuanLingDao, ManagerDeptID, OUConstString.PostName.FUZONGJINGLI, true, false, 1); ddlZhuGuanLingDao.Enabled = true; this.SubmitStatus = 2; } else if (ddlZhuGuanLingDao.Items.Contains(item)) { ddlZhuGuanLingDao.Items.Clear(); OAUser.GetUserByDeptPost(ddlZongJingLi, ManagerDeptID, OUConstString.PostName.ZONGJINGLI, true, false, 1); ddlZongJingLi.Enabled = true; this.SubmitStatus = 1; } } else { FormsMethod.SetDropDownList(this.ddlBianZhiBuMen, entity.BianZhiBuMenID, entity.Department); FormsMethod.SetDropDownList(this.ddlZongJingLi, entity.GeneralManagerID, entity.GeneralManager); FormsMethod.SetDropDownList(this.ddlZhuGuanLingDao, entity.ChargeLeaderID, entity.ChargeLeader); FormsMethod.SetDropDownList(this.ddlChuLingDao, entity.DepartmentLeaderID, entity.DepartmentLeader); } //申请单编号 this.txtBianHao.Text = entity.DocumentNo; FormsMethod.SelectedDropDownList(this.drpZhiWu, entity.ZhiWu); FormsMethod.SelectedDropDownList(this.drpZhiCheng, entity.ZhiCheng); //部门负责人 if (base.StepName == ProcessConstString.StepName.STEP_DRAFT && !base.IsPreview) { if (this.ddlBianZhiBuMen.Items.Count > 0) { OAUser.GetUserByDeptPost(this.ddlFuZeRen, this.ddlBianZhiBuMen.SelectedValue, OUConstString.PostName.CHUZHANG, true, true); } FormsMethod.SelectedDropDownList(this.ddlFuZeRen, entity.FuZeRenID); } else { FormsMethod.SetDropDownList(this.ddlFuZeRen, entity.FuZeRenID, entity.DeptPrincipal); } //订票处 if (base.StepName == ProcessConstString.StepName.FinanceStepName.STEP_DepartLeader || base.StepName == ProcessConstString.StepName.FinanceStepName.STEP_ChargeLeader || base.StepName == ProcessConstString.StepName.FinanceStepName.STEP_GeneralManager && !base.IsPreview) { string[] arrayBookingOffice = OAUser.GetUserByRoleName(OUConstString.RoleName.BookingOffice); this.txtBookingOfficeID.Text = arrayBookingOffice[0]; } //是否退回 if (base.StepName == ProcessConstString.StepName.STEP_DRAFT) { this.txtIsBack.Text = entity.IsBack.ToString(); } //拟稿人及日期 if (entity.DraftDate != DateTime.MinValue) { this.lblNiGaoRiQi.Text = entity.DraftDate.ToString(DateFormat); //拟稿人显示非下拉列表框形式 this.txtNiGaoRen.Visible = false; this.lbNiGaoRen.Visible = true; //this.lbNiGaoRen.Text = entity.Drafter + strNewLine + entity.DraftDate.ToString(ConstString.DateFormat.Long); this.lbNiGaoRen.Text = entity.Drafter; } else { this.lblNiGaoRiQi.Text = DateTime.Now.ToString(DateFormat); } //抄送 this.txtChaoSong.Text = entity.CopySend; this.txtChaoSongID.Text = entity.ChaoSongID; this.txtChaoSongDeptID.Text = entity.ChaoSongDeptID; //主题 this.txtZhuTi.Text = entity.DocumentTitle; this.txtTongXing.Text = entity.TongXingRenYuan; //出差任务 //this.txtNeiRong.Text = SysString.HtmlToTextCode(entity.Content); this.txtChuChaiRenWu.Text = entity.ChuChaiRenWu; this.timeChuFa.Text = entity.ChuFaShiJian; this.timeHuiCheng.Text = entity.HuiChengShiJian; //商务信息 this.txtShangWu.Text = entity.ShangWuXinXi; //目的地 this.txtDestination.Text = entity.Destination; //拟稿人 //this.txtNiGaoRen.Text = entity.Drafter; //this.txtNiGaoRenID.Text = entity.NiGaoRenID; //提示信息 this.txtTiShiXinXi.Text = entity.Message; this.txtBanShuiXinXi.Text = entity.Message; //提示信息添加 this.txtTianJia.Text = entity.MessageAdd; this.txtGeneralManagerID.Text = entity.GeneralManagerID; this.txtChargeLeaderID.Text = entity.ChargeLeaderID; this.txtDepartmentLeaderID.Text = entity.DepartmentLeaderID; }
/// <summary> /// 实体加载 /// </summary> protected override void EntityToControl() { B_FinanceZDBX entity = base.EntityData != null ? base.EntityData as B_FinanceZDBX : new B_FinanceZDBX(); //附件 ucAttachment.UCDataList = entity.FileList; this.txtYuSuanJinE.Text = entity.YuSuanJinE; this.txtLeiJiBaoXiaoJinE.Text = entity.LeiJiBaoXiaoJinE; this.txtIsChaoYuSuan.Text = entity.IsChaoYuSuan == true ? "1" : ""; this.txtIsManager.Text = entity.IsLeader == true ? "1" : ""; string userID = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; if (base.StepName == ProcessConstString.StepName.STEP_DRAFT && !base.IsPreview) { //拟稿日期 txtNiGaoRiQi.Text = DateTime.Now.ToString("yyyy-MM-dd"); //拟稿人 this.txtNiGaoRen.Text = CurrentUserInfo.DisplayName; this.txtNiGaoRenID.Text = CurrentUserInfo.UserName; OADept.GetDeptByUser(this.ddlDepartment, userID, 1, true, false); FormsMethod.SelectedDropDownList(this.ddlDepartment, entity.DepartmentID); string[] ManagerIds = OAUser.GetDeptManagerArray(this.ddlDepartment.SelectedValue, -1); if (ManagerIds[0].Contains(CurrentUserInfo.UserName)) { txtIsManager.Text = "1"; } if (txtIsManager.Text == "1") { OAUser.GetUserByDeptPost(ddlChuLingDao, this.ddlDepartment.SelectedValue, OUConstString.PostName.FUCHUZHANG, false, true, 0); } else { FounderSoftware.Framework.Business.ViewBase vDept = OADept.GetDeptByDeptUser(this.ddlDepartment.SelectedValue, userID, 2); //根据处室部门的ID和用户账号找出用户所属该处室下的科室-修改bug if (!string.IsNullOrEmpty(vDept.IDs)) { OAUser.GetUserByDeptPost(ddlYanShouRen, vDept.IDs, OUConstString.PostName.FUKEZHANG, false, true, 2); } } B_FinanceDeptInfo bllInfo = new B_FinanceDeptInfo(); M_FinanceDeptInfo info = bllInfo.GetFinanceDeptInfoByDeptID(DateTime.Now.Year.ToString(), this.ddlDepartment.SelectedValue); this.txtYuSuanJinE.Text = info.ZDBudgetCost; this.txtLeiJiBaoXiaoJinE.Text = info.ZDUseCost; if (!string.IsNullOrEmpty(entity.ChuLingDaoID)) { FormsMethod.SelectedDropDownList(this.ddlChuLingDao, entity.ChuLingDaoID); } if (!string.IsNullOrEmpty(entity.YanShouRenID)) { FormsMethod.SelectedDropDownList(this.ddlYanShouRen, entity.YanShouRenID); } } else { FormsMethod.SetDropDownList(this.ddlDepartment, entity.DepartmentID, entity.Department); FormsMethod.SetDropDownList(this.ddlZongJingLi, entity.ZongJingLiID, entity.ZongJingLi); FormsMethod.SetDropDownList(this.ddlZhuGuanLingDao, entity.ZhuGuanLingDaoID, entity.ZhuGuanLingDao); FormsMethod.SetDropDownList(this.ddlChuLingDao, entity.ChuLingDaoID, entity.ChuLingDao); FormsMethod.SetDropDownList(this.ddlYanShouRen, entity.YanShouRenID, entity.YanShouRen); FormsMethod.SetDropDownList(this.ddlJingShouRen, entity.JingShouRenID, entity.JingShouRen); } //验收 if (base.StepName == ProcessConstString.StepName.FinanceZDBXStepName.STEP_KeZhang && !base.IsPreview) { OAUser.GetUserByDeptPost(ddlChuLingDao, this.ddlDepartment.SelectedValue, OUConstString.PostName.CHUZHANG, false, true, 0); } //处长审核 if (base.StepName == ProcessConstString.StepName.FinanceZDBXStepName.STEP_ChuZhang && !base.IsPreview) { OAUser.GetUserByRole(this.ddlZongJingLi, OUConstString.RoleName.COMPANY_LEADER); OAUser.GetUserByRole(this.ddlZhuGuanLingDao, OUConstString.RoleName.COMPANY_LEADER); OAUser.GetUserByRole(this.ddlJingShouRen, OUConstString.RoleName.CaiWu); if (txtIsManager.Text != "1") { B_FinanceDeptInfo bllInfo = new B_FinanceDeptInfo(); M_FinanceDeptInfo info = bllInfo.GetFinanceDeptInfoByDeptID(DateTime.Now.Year.ToString(), this.ddlDepartment.SelectedValue); this.txtYuSuanJinE.Text = info.ZDBudgetCost; this.txtLeiJiBaoXiaoJinE.Text = info.ZDUseCost; Double FeeFa = Convert.ToDouble(string.IsNullOrEmpty(txtLeiJiBaoXiaoJinE.Text) ? "0" : txtLeiJiBaoXiaoJinE.Text); Double FeeYu = Convert.ToDouble(string.IsNullOrEmpty(txtYuSuanJinE.Text) ? "0" : txtYuSuanJinE.Text); Double Rate = (string.IsNullOrEmpty(FeeRate) == true ? 0.1 : Convert.ToDouble(FeeRate)); if (FeeFa > FeeYu) { txtIsChaoYuSuan.Text = "1"; } } } //领导审核 if (base.StepName == ProcessConstString.StepName.FinanceZDBXStepName.STEP_LingDao && !base.IsPreview) { OAUser.GetUserByRole(this.ddlJingShouRen, OUConstString.RoleName.CaiWu); } //是否退回 if (base.StepName == ProcessConstString.StepName.STEP_DRAFT) { //this.txtIsBack.Text = entity.IsBack.ToString(); } //拟稿人及日期 if (entity.DraftDate != DateTime.MinValue) { this.txtNiGaoRiQi.Text = entity.DraftDate.ToString(DateFormat); //拟稿人显示非下拉列表框形式 this.txtNiGaoRen.Visible = false; this.lblNiGaoRen.Visible = true; //this.lbNiGaoRen.Text = entity.Drafter + strNewLine + entity.DraftDate.ToString(ConstString.DateFormat.Long); this.lblNiGaoRen.Text = entity.Drafter; } else { this.txtNiGaoRiQi.Text = DateTime.Now.ToString(DateFormat); } //申请单编号 this.txtDocumentNo.Text = entity.DocumentNo; this.txtDanJuZhangShu.Text = entity.DanJuZhangShu == Int32.MinValue ? "" : entity.DanJuZhangShu.ToString(); this.txtYongTu.Text = entity.YongTu; txtBaoXiaoJinE.Text = entity.BaoXiaoJinE; txtBaoXiaoJinEDaXie.Text = entity.BaoXiaoJinEDaXie; this.txtShouKuanDanWei.Text = entity.ShouKuanDanWei; this.txtShouKuanZhangHao.Text = entity.ShouKuanZhangHao; this.txtShouKuanYinHang.Text = entity.ShouKuanYinHang; this.txtShouKuanZhangHao.Text = entity.ShouKuanZhangHao; this.txtYanQingRenShu.Text = entity.YanQingRenShu; this.txtRenJunXiaoFeiE.Text = entity.RenJunXiaoFeiE; ////拟稿人 //this.txtNiGaoRen.Text = entity.Drafter; //this.txtNiGaoRenID.Text = entity.NiGaoRenID; //提示信息 this.txtTiShiXinXi.Text = entity.Message; //提示信息添加 this.txtTianJia.Text = entity.MessageAdd; //this.txtGeneralManagerID.Text = entity.GeneralManagerID; //this.txtChargeLeaderID.Text = entity.ChargeLeaderID; //this.txtDepartmentLeaderID.Text = entity.DepartmentLeaderID; }