/// **************************************************************************** /// <summary> /// 业务数据操作 /// </summary> /// **************************************************************************** override protected Boolean DataSubmit(StandardEntityDAO dao) { this.WorkFlowCaseState1.SubmitData(); if (this.BiddingPrejudicationModify1.State == ModuleState.Operable) { this.BiddingPrejudicationModify1.ApplicationCode = WorkFlowToolbar1.ApplicationCode; this.BiddingPrejudicationModify1.dao = dao; this.BiddingPrejudicationModify1.SubmitData(); //this.UCBiddingSupplierList1.InsertDepartMent(); WorkFlowToolbar1.ApplicationCode = this.BiddingPrejudicationModify1.ApplicationCode; } if (this.BiddingPrejudicationModify1.State1 == ModuleState.Operable) { this.BiddingPrejudicationModify1.ApplicationCode = WorkFlowToolbar1.ApplicationCode; this.BiddingPrejudicationModify1.dao = dao; this.BiddingPrejudicationModify1.SubmitBiddingState(); } if (this.UCBiddingSupplierList1.CanModify) { this.UCBiddingSupplierList1.dao = dao; this.UCBiddingSupplierList1.ModifyData(); } if (this.UCBiddingSupplierList1.CanSelect) { this.UCBiddingSupplierList1.dao = dao; this.UCBiddingSupplierList1.SaveData(); } //DataGridShowState(); UCBiddingSupplierList1.UpdateDepartMentSelect(); SaveMeetMessage(dao, this.rptMeetSign); return(base.DataSubmit(dao)); //OpinionDataSubmit(dao); }
/// **************************************************************************** /// <summary> /// 工具栏事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// **************************************************************************** override protected void WorkFlowToolbar1_ToolbarCommand(object sender, System.EventArgs e) { /****************************************************************************/ using (StandardEntityDAO dao = new StandardEntityDAO("Leave")) { dao.BeginTrans(); try { /***********************************************************/ //签收 if (WorkFlowToolbar1.CommandType == ToolbarCommandType.SignIn) { WorkFlowToolbar1.SignIn(dao); if (this.WorkFlowToolbar1.GetModuleState("Opinion4") == ModuleState.Operable) { WorkFlowToolbar1.SaveCasePropertyValue("用户类别", user.GetOperationType()); } InitPage(); this.DataGridShowState(); UCBiddingSupplierList1.LoadEditData(); } //发送 if (WorkFlowToolbar1.CommandType == ToolbarCommandType.Send) { //this.RegisterStartupScript("","<script>alert('请选择预审通过单位!');</script>"); if (!this.UCBiddingSupplierList1.SelectedSupplierFlag && this.BiddingPrejudicationModify1.State1 == ModuleState.Operable) { this.RegisterStartupScript("", "<script>alert('请选择预审通过单位!');</script>"); return; } try { DataSubmit(dao); //UCBiddingSupplierList1.UpdateDepartMentSelect(); } catch (Exception ex) { Response.Write(Rms.Web.JavaScript.Alert(true, ex.Message)); } WorkFlowToolbar1.Send(); } //退回 if (WorkFlowToolbar1.CommandType == ToolbarCommandType.Back) { DataSubmit(dao); WorkFlowToolbar1.Back(); } //收回 if (WorkFlowToolbar1.CommandType == ToolbarCommandType.Return) { WorkFlowToolbar1.Return(); } //送经办人 if (WorkFlowToolbar1.CommandType == ToolbarCommandType.BackTop) { DataSubmit(dao); WorkFlowToolbar1.BackTop(); } //保存意见 if (WorkFlowToolbar1.CommandType == ToolbarCommandType.Opinion) { WorkFlowToolbar1.SaveOpinion(); this.WorkFlowCaseState1.ControlDataBind(); //UCBiddingSupplierList1.UpdateDepartMentSelect(); } //保存 if (WorkFlowToolbar1.CommandType == ToolbarCommandType.Save) { ///if(!this.UCBiddingSupplierList1.SelectedSupplierFlag && this.BiddingPrejudicationModify1.State1 == ModuleState.Operable) //{ // this.RegisterStartupScript("","<script>alert('请选择预审通过单位!');</script>"); // return; //} try { DataSubmit(dao); //UCBiddingSupplierList1.UpdateDepartMentSelect(); } catch (Exception ex) { Response.Write(Rms.Web.JavaScript.Alert(true, ex.Message)); } WorkFlowToolbar1.Save(); WorkFlowPropertySave(); if (!this.WorkFlowToolbar1.IsNew) { 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); } } //完成 if (WorkFlowToolbar1.CommandType == ToolbarCommandType.TaskFinish) { if (!this.UCBiddingSupplierList1.SelectedSupplierFlag && this.BiddingPrejudicationModify1.State1 == ModuleState.Operable) { this.RegisterStartupScript("", "<script>alert('请选择预审通过单位!');</script>"); return; } DataSubmit(dao); WorkFlowToolbar1.TaskFinish(); } //结束 if (WorkFlowToolbar1.CommandType == ToolbarCommandType.Finish) { if (!this.UCBiddingSupplierList1.SelectedSupplierFlag && this.BiddingPrejudicationModify1.State1 == ModuleState.Operable) { this.RegisterStartupScript("", "<script>alert('请选择预审通过单位!');</script>"); return; } DataSubmit(dao); WorkFlowToolbar1.Finish(); } //抄送 if (WorkFlowToolbar1.CommandType == ToolbarCommandType.MakeCopy) { DataSubmit(dao); WorkFlowToolbar1.MakeCopy(); } //删除 if (WorkFlowToolbar1.CommandType == ToolbarCommandType.Delete) { WorkFlowToolbar1.Delete(); UCBiddingSupplierList1.DeleteAll(dao); } /*******************************************************/ dao.CommitTrans(); } catch (Exception ex) { dao.RollBackTrans(); throw ex; } } /*******************************************************************/ }
/// **************************************************************************** /// <summary> /// 提交数据 /// </summary> /// **************************************************************************** public override string SubmitData() { try { string ErrMsg = ""; if (txtNumber.Value == "") { //Response.Write(Rms.Web.JavaScript.Alert(true,"合同编号不能为空")); ErrMsg = "编号不能为空"; return(ErrMsg); } if (!this.UCBiddingSupplierList1.SelectedSupplierFlag && this.State1 == ModuleState.Operable) { ErrMsg = "请选择预审通过单位"; return(ErrMsg); } if (this.State == ModuleState.Operable) { RmsPM.BLL.Bidding cBidding = new RmsPM.BLL.Bidding(); cBidding.BiddingCode = this.BiddingCode; cBidding.ConfirmDate = this.TxtEmitDate.Text; cBidding.BiddingSubmit(); RmsPM.BLL.BiddingPrejudication cBiddingPrejudication = new RmsPM.BLL.BiddingPrejudication(); cBiddingPrejudication.BiddingPrejudicationCode = this.ApplicationCode; cBiddingPrejudication.BiddingCode = this.BiddingCode; cBiddingPrejudication.Number = this.txtNumber.Value; cBiddingPrejudication.UserCode = this.UserCode; cBiddingPrejudication.CreateDate = DateTime.Now.ToShortDateString(); cBiddingPrejudication.State = ""; cBiddingPrejudication.Flag = ""; cBiddingPrejudication.dao = this.dao; cBiddingPrejudication.BiddingPrejudicationSubmit(); if (this.ApplicationCode == "") { RmsPM.BLL.BiddingSupplier cBiddingSupplier = new RmsPM.BLL.BiddingSupplier(); cBiddingSupplier.BiddingPrejudicationCode = this.ViewState["tempCode"].ToString(); cBiddingSupplier.dao = dao; EntityData entity = cBiddingSupplier._GetBiddingSuppliers(); for (int i = 0; i < entity.CurrentTable.Rows.Count; i++) { entity.CurrentTable.Rows[i]["BiddingPrejudicationCode"] = cBiddingPrejudication.BiddingPrejudicationCode; } dao.SubmitEntity(entity); this.ApplicationCode = cBiddingPrejudication.BiddingPrejudicationCode; RmsPM.BLL.BiddingSystem.UpDataPrejudicationCode(cBiddingPrejudication.BiddingPrejudicationCode, this.ViewState["tempCode"].ToString()); } } if (SetAttachList1 == ModuleState.Operable) { this.AttachMentAdd1.SaveAttachMent(this.ApplicationCode); } if (SetAttachList2 == ModuleState.Operable) { this.AttachMentAdd2.SaveAttachMent(this.ApplicationCode); } if (SetAttachList3 == ModuleState.Operable) { this.AttachMentAdd3.SaveAttachMent(this.ApplicationCode); } if (this.State1 == ModuleState.Operable) { //this.BiddingPrejudicationModify1.ApplicationCode = this.ApplicationCode; //this.BiddingPrejudicationModify1.dao = dao; //this.SubmitBiddingState(); this.UCBiddingSupplierList1.BiddingPrejudicationCode = this.ApplicationCode; } if (this.UCBiddingSupplierList1.CanModify) { this.UCBiddingSupplierList1.dao = this.dao; this.UCBiddingSupplierList1.ModifyData(); } if (this.UCBiddingSupplierList1.CanSelect) { this.UCBiddingSupplierList1.dao = this.dao; this.UCBiddingSupplierList1.SaveData(); } //DataGridShowState(); UCBiddingSupplierList1.UpdateDepartMentSelect(); //ErrMsg += this.BiddingSupplierGrade1.SubmitGradeData(); return(ErrMsg); } catch (Exception ex) { ApplicationLog.WriteLog(this.ToString(), ex, ""); Response.Write(Rms.Web.JavaScript.Alert(true, "保存出错:" + ex.Message)); throw ex; } }