protected void btnDelete_Click(object sender, System.EventArgs e) { try { Grade grade = new Grade(); grade.GradeMessageCode = this.ucOperationControl.GradeMessageCode; EntityData entityGrade = grade.GetGrade(); if (entityGrade.HasRecord()) { entityGrade.DeleteAllTableRow("Grade"); RmsPM.BLL.GradeMessage.DeleteStandard_Grade(entityGrade); } GradeMessage gm = new GradeMessage(); EntityData entityGradeMessage = gm.GetGradeMessageByCode(this.ucOperationControl.GradeMessageCode); if (entityGradeMessage.HasRecord()) { entityGradeMessage.DeleteAllTableRow("GradeMessage"); RmsPM.BLL.GradeMessage.DeleteStandard_GradeMessage(entityGradeMessage); } Response.Write(Rms.Web.JavaScript.ScriptStart); Response.Write(Rms.Web.JavaScript.OpenerReload(false)); Response.Write(Rms.Web.JavaScript.WinClose(false)); Response.Write(Rms.Web.JavaScript.ScriptEnd); //Response.End(); } catch (Exception ex) { ApplicationLog.WriteLog(this.ToString(), ex, "删除评分错误"); Response.Write(Rms.Web.JavaScript.Alert(true, "删除评分出错:" + ex.Message)); } }
override protected void OperationControlInit() { base.OperationControlInit(); GradeMessageGrade = Request["gradeMessageCode"] + ""; Projectcode = Request["projectcode"] + ""; SupplierCode = Request["suppliercode"] + ""; GradeMessage gm = new GradeMessage(); EntityData entity = gm.GetGradeMessageByCode(GradeMessageGrade); if (entity.HasRecord()) { int state = entity.GetInt("State"); // 评分状态: 0: 正常; 1 待审核,当前评分; // 3 申请不通过 ; 6 历史记录 ; 7 合同申请中 // 8 预审;9 预审中 this.lblState.Text = RmsPM.BLL.GradeMessage.GetContractStatusName(state.ToString()); switch (state) { case 0: break; case 1: //this.btnModify.Visible = true; //this.btnDelete.Visible = true; //this.btnCheck.Visible = true; break; } } this.ucOperationControl.ApplicationCode = this.wftToolbar.ApplicationCode; this.ucOperationControl.SupplierCode = SupplierCode; this.ucOperationControl.GradeMessageCode = GradeMessageGrade; this.ucOperationControl.ProjectCode = Projectcode; this.ucOperationControl.State = ModuleState.Operable; this.ucOperationControl.StateProject = ModuleState.Operable; this.ucOperationControl.InitControl(); }
/// <summary> /// 业务审核 /// </summary> public override bool Audit(string pm_sOpinionConfirm) { base.Audit(pm_sOpinionConfirm); try { GradeMessage gm = new GradeMessage(); string ErrMsg = ""; if (pm_sOpinionConfirm != "") { EntityData Entity = gm.GetGradeMessageByCode(this.GradeMessageCode); Entity.SetCurrentTable("GradeMessage"); if (Entity.HasRecord()) { DataRow dr = Entity.CurrentRow; switch (pm_sOpinionConfirm) { case "Approve": dr["state"] = 0; break; case "Reject": dr["state"] = 1; break; case "Unknow": ErrMsg = "请选择评审结果!"; break; default: ErrMsg = "请选择评审结果!"; break; } if (ErrMsg != "") { Response.Write(Rms.Web.JavaScript.Alert(true, ErrMsg)); return(false); } gm.SubmitAllGradeMessage(Entity); } Entity.Dispose(); } return(true); } catch (Exception ex) { RmsPM.Web.ApplicationLog.WriteLog(this.ToString(), ex, ""); Response.Write(Rms.Web.JavaScript.Alert(true, "业务审核出错:" + ex.Message)); throw ex; } }
protected void OperationControlInit() { GradeMessageCode = Request["gradeMessageCode"] + ""; Projectcode = Request["projectcode"] + ""; SupplierCode = Request["suppliercode"] + ""; string ApplicationCode = Request["ApplicationCode"] + ""; string viewstate = Request["view"] + ""; GradeMessage gm = new GradeMessage(); EntityData entity = gm.GetGradeMessageByCode(GradeMessageCode); if (entity.HasRecord()) { int state = entity.GetInt("State"); // 评分状态: 0: 正常; 1 待审核,当前评分; // 3 申请不通过 ; 6 历史记录 ; 7 合同申请中 // 8 预审;9 预审中 this.lblState.Text = RmsPM.BLL.GradeMessage.GetContractStatusName(state.ToString()); switch (state) { case 0: break; case 1: this.btnCheck.Visible = this.user.HasRight("2705"); this.btnModify.Visible = this.user.HasRight("2704"); this.btnDelete.Visible = this.user.HasRight("2707"); break; } this.ucOperationControl.State = ModuleState.Eyeable; this.ucOperationControl.StateProject = ModuleState.Eyeable; this.ucOperationControl.StatePersentage = ModuleState.Eyeable; if (this.user.HasRight("2708")) { this.ucOperationControl.StateProject = ModuleState.Sightless; this.ucGradeOpinionControl.ApplicationCode = this.wftToolbar.ApplicationCode; this.ucGradeOpinionControl.SupplierCode = SupplierCode; this.ucGradeOpinionControl.GradeMessageCode = this.GradeMessageCode; this.ucGradeOpinionControl.ProjectCode = this.ProjectCode; this.ucGradeOpinionControl.State = ModuleState.Operable; this.ucGradeOpinionControl.StateProject = ModuleState.Operable; this.ucGradeOpinionControl.InitControl(); } else { this.ucGradeOpinionControl.Visible = false; } } else { this.ucGradeOpinionControl.Visible = false; this.btnSave.Visible = this.user.HasRight("2701"); this.ucOperationControl.State = ModuleState.Operable; this.ucOperationControl.StateProject = ModuleState.Operable; this.ucOperationControl.StatePersentage = ModuleState.Operable; } this.ucOperationControl.ApplicationCode = this.wftToolbar.ApplicationCode; this.ucOperationControl.SupplierCode = SupplierCode; this.ucOperationControl.GradeMessageCode = GradeMessageCode; this.ucOperationControl.ProjectCode = Projectcode; if (this.user.HasRight("2703")) { this.ucOperationControl.InitControl(); } else { if (viewstate == "add") { this.ucOperationControl.InitControl(); } else { this.ucOperationControl.Visible = false; } } this.WorkFlowList1.ProcedureNameAndApplicationCodeList = GetWorkFlowListString(); this.WorkFlowList1.DataBound(); }