/// **************************************************************************** /// <summary> /// 删除按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// **************************************************************************** protected void btnDel_ServerClick(object sender, System.EventArgs e) { /****************************************************************************/ using (StandardEntityDAO dao = new StandardEntityDAO("Leave")) { dao.BeginTrans(); try { this.BiddingEmitModify1.dao = dao; this.BiddingEmitModify1.Delete(); this.BiddingReturnModify1.dao = dao; this.BiddingReturnModify1.Delete(); /*******************************************************/ dao.CommitTrans(); } catch (Exception ex) { dao.RollBackTrans(); throw ex; } } /*******************************************************************/ 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); }
private bool GetShowInfoForbtnReturn() { //网上招投标的招标计划发标后隐藏手工回标按钮 RmsPM.BLL.BiddingManage cBllBiddingManage = new RmsPM.BLL.BiddingManage(); cBllBiddingManage.BiddingCode = this.ApplicationCode; RmsPM.BLL.BiddingEmit cBiddingEmitR = new RmsPM.BLL.BiddingEmit(); StandardEntityDAO dao = new StandardEntityDAO("BiddingEmit"); EntityData entity = cBiddingEmitR.GetBiddingEmitByCode(dao, cBllBiddingManage.GetLastBiddingEmitCode()); if (entity.HasRecord()) { if (entity.GetInt("IsWSZTB") == 0) { return(true); } else { return(false); } } else { return(false); } }
/// **************************************************************************** /// <summary> /// 业务审核 /// </summary> /// **************************************************************************** virtual protected Boolean Audit(StandardEntityDAO dao) { /**************************判断当前辅助控制项所对应的辅助控制是否有同意/否决 ******************************/ string opinionType = RmsPM.BLL.WorkFlowRule.GetTaskOpinionTypeByActCode(this.up_wftToolbar.ActCode); int ud_iOpinionStateCount = 2; string ud_sOpinionConfirm = ""; ModuleState[] ud_wfmaWorkFlowModuleState = new ModuleState[ud_iOpinionStateCount]; for (int i = 0; i < ud_iOpinionStateCount; i++) { ud_wfmaWorkFlowModuleState[i] = this.up_wftToolbar.GetModuleState(opinionType, i); } if (ud_wfmaWorkFlowModuleState[1] == ModuleState.Operable) //当前如果有同意/否决选项 则做验证 { ud_sOpinionConfirm = this.up_wftToolbar.AuditValue; if (ud_sOpinionConfirm == "") { ud_sOpinionConfirm = "Unknow"; } } else { ud_sOpinionConfirm = this.up_wftToolbar.AuditValue; } /******************************************************************/ //string ud_sOpinionConfirm = GetOpinionConfirm(); return(this.up_ucOperationControl.Audit(ud_sOpinionConfirm)); }
/// <summary> /// 表单意见保存 /// </summary> virtual protected void ToolBarOpinionForward(StandardEntityDAO dao) { this.OpinionDataSubmit(dao, true); this.up_wftToolbar.SaveOpinion(); this.up_wfcCaseState.Toobar = this.up_wftToolbar; this.up_wfcCaseState.ControlDataBind(); }
public static void SaveWorkCaseEx(DataSet workCaseDs, string caseCode, string ActCode) { try { EntityData entitydata = WorkFlowRule.SaveWorkFlowCaseData(workCaseDs, caseCode); StandardEntityDAO ydao = new StandardEntityDAO("Standard_WorkFlowCase"); ydao.BeginTrans(); try { if (entitydata != null) { for (int i = entitydata.Tables["WorkFlowAct"].Rows.Count - 1; i >= 0; i--) { if (ActCode == entitydata.Tables["WorkFlowAct"].Rows[i]["ActCode"].ToString()) { entitydata.Tables["WorkFlowAct"].Rows[i].Delete(); } } ydao.SubmitEntity(entitydata); } ydao.CommitTrans(); } catch (Exception exception) { ydao.RollBackTrans(); throw exception; } entitydata.Dispose(); } catch { throw; } }
public static EntityData GetStandard_SupplierByCode(string code, StandardEntityDAO dao) { EntityData data2; try { if (dao == null) { dao = new StandardEntityDAO("Standard_Supplier"); } else { dao.EntityName = "Standard_Supplier"; } EntityData entitydata = new EntityData("Standard_Supplier"); dao.FillEntity(SqlManager.GetSqlStruct("Supplier", "Select").SqlString, "@SupplierCode", code, entitydata, "Supplier"); dao.FillEntity(SqlManager.GetSqlStruct("SupplierOpinion", "SelectBySupplierCode").SqlString, "@SupplierCode", code, entitydata, "SupplierOpinion"); dao.FillEntity(SqlManager.GetSqlStruct("SupplierSubjectSet", "SelectBySupplierCode").SqlString, "@SupplierCode", code, entitydata, "SupplierSubjectSet"); dao.FillEntity(SqlManager.GetSqlStruct("ContractBiddingSupplier", "SelectBySupplierCode").SqlString, "@SupplierCode", code, entitydata, "ContractBiddingSupplier"); data2 = entitydata; } catch (Exception exception) { throw exception; } return(data2); }
/// **************************************************************************** /// <summary> /// 流程意见控件数据保存 /// 特殊 /// </summary> /// **************************************************************************** override protected Boolean OpinionDataSubmit(StandardEntityDAO dao) { Boolean ReturnValue; ReturnValue = base.OpinionDataSubmit(dao); try { if (ReturnValue) { foreach (DataGridItem ud_dgItem in dgSignSheet.Items) { RmsPM.Web.WorkFlowControl.WorkFlowFormOpinion ud_wfoControl; ud_wfoControl = (RmsPM.Web.WorkFlowControl.WorkFlowFormOpinion)ud_dgItem.FindControl("wfoSignSheet"); if (ud_wfoControl.State == ModuleState.Operable) { ud_wfoControl.ApplicationCode = this.up_wftToolbar.ApplicationCode; ud_wfoControl.CaseCode = this.up_wftToolbar.CaseCode; ud_wfoControl.dao = dao; ud_wfoControl.SubmitData(); } } } } catch (Exception ex) { ApplicationLog.WriteLog(this.ToString(), ex, ""); Response.Write(Rms.Web.JavaScript.Alert(true, "审批意见保存出错:" + ex.Message)); ReturnValue = false; } return(ReturnValue); }
public static void Update(EntityData entity) { using (StandardEntityDAO ydao = new StandardEntityDAO("StampDuty")) { ydao.UpdateEntity(entity); } }
/// **************************************************************************** /// <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> /// **************************************************************************** virtual protected Boolean OpinionDataSubmit(StandardEntityDAO dao) { try { string ud_sOpinionControlName = "wfoOpinion"; for (int i = 1; i <= this.OpinionCount; i++) { RmsPM.Web.WorkFlowControl.WorkFlowFormOpinion ud_wfoContraol; ud_wfoContraol = (RmsPM.Web.WorkFlowControl.WorkFlowFormOpinion) this.Page.FindControl(ud_sOpinionControlName + i.ToString()); if (ud_wfoContraol.State == ModuleState.Operable) { ud_wfoContraol.ApplicationCode = wftToolbar.ApplicationCode; ud_wfoContraol.CaseCode = wftToolbar.CaseCode; ud_wfoContraol.dao = dao; ud_wfoContraol.SubmitData(); } } return(true); } catch (Exception ex) { throw ex; } }
protected void btnSave_ServerClick(object sender, EventArgs e) { using (StandardEntityDAO dao = new StandardEntityDAO("Leave")) { dao.BeginTrans(); try { if (!this.BiddingAuditing1.SupplierSelectedFlag && this.BiddingAuditing1.State == ModuleState.Operable) { this.RegisterStartupScript("", "<script>alert('请选择中标单位!');</script>"); return; } bool bl = DataSubmit(dao); dao.CommitTrans(); if (bl) { 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); } } catch (Exception ex) { dao.RollBackTrans(); throw ex; } } }
protected void btnSave_ServerClick(object sender, EventArgs e) { using (StandardEntityDAO dao = new StandardEntityDAO("Leave")) { dao.BeginTrans(); if (!this.UCBiddingSupplierList1.SelectedSupplierFlag && this.BiddingPrejudicationModify1.State1 == ModuleState.Operable) { this.RegisterStartupScript("", "<script>alert('请选择预审通过单位!');</script>"); return; } try { bool bl = DataSubmit(dao); dao.CommitTrans(); if (bl) { 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); } } catch (Exception ex) { dao.RollBackTrans(); if (ex.Message == "编号不能为空") { Response.Write(Rms.Web.JavaScript.Alert(true, ex.Message)); return; } throw ex; } } }
public static void SubmitAllStandard_ConstructProgress(EntityData entity) { Exception exception; try { using (StandardEntityDAO ydao = new StandardEntityDAO("Standard_ConstructProgress")) { ydao.BeginTrans(); try { ydao.SubmitEntity(entity); ydao.CommitTrans(); } catch (Exception exception1) { exception = exception1; ydao.RollBackTrans(); throw exception; } } } catch (Exception exception2) { exception = exception2; throw exception; } }
public static void UpdateDesignState(string DesignCode, string state, StandardEntityDAO dao) { Design_Message message = new Design_Message(); message.dao = dao; message.DesignState = state; message.DesignCode = DesignCode; message.Design_MessageSubmit(); }
public static void Set_BiddingState(string state, string BiddingCode, StandardEntityDAO dao) { Bidding bidding = new Bidding(); bidding.BiddingCode = BiddingCode; bidding.dao = dao; bidding.State = state; bidding.BiddingSubmit(); }
/// <summary> /// 签收 /// </summary> virtual protected void ToolBarSignIn(StandardEntityDAO dao) { this.up_wftToolbar.SignIn(dao); if (this.up_ucOperationControl.State == ModuleState.Operable) { this.up_ucOperationControl.RestoreStatus(); } this.InitPage(); }
private void ImportSalSingle(string s, string ProjectCode, string jd) { string[] m_strSub = s.Replace("\"", "").Split(','); if (m_strSub.Length < 9) // && (m_strSub[0] != "供应商代码")) { return; } //小计、合计(即客户姓名为空)不导 if (m_strSub[1].Trim() == "") { return; } //过滤基地 if (jd != "") { if (m_strSub[4] != jd) { return; } } string ContractCode = m_strSub[2]; using (StandardEntityDAO dao = new StandardEntityDAO("SalContract")) { dao.BeginTrans(); try { ImportSalContract(m_strSub, ContractCode, ProjectCode, dao); ImportSalPay(m_strSub, ContractCode, ProjectCode, dao); // ImportSalPayPlan(m_strSub, ContractCode, ProjectCode, dao); // ImportSalPayRela(m_strSub, ContractCode, ProjectCode, dao); // EntityData entitySalContract = ImportSalContract(ContractCode, ProjectCode, dsSrc, dao); // EntityData entitySalPay = ImportSalPay(ContractCode, ProjectCode, dsSrc, dao); dao.CommitTrans(); } catch (Exception ex) { try { //RollBackTrans会报错:此 SqlTransaction 已完成;它再也无法使用 dao.RollBackTrans(); } catch { } throw ex; } } }
public static bool IsOnlyNumber(StandardEntityDAO dao, string number) { BiddingPrejudication prejudication = new BiddingPrejudication(); prejudication.dao = dao; prejudication.Number = number; DataTable biddingPrejudications = prejudication.GetBiddingPrejudications(); return((biddingPrejudications != null) && (biddingPrejudications.Rows.Count == 0)); }
public static void OpinionDataSubmit(StandardEntityDAO dao, WorkFlowToolbar up_Toolbar, System.Web.UI.Page up_Page, int up_iProposerCount, int up_iDepartmentCount, int up_iDirectorCount) { try { string ud_sProposerControlName, ud_sDepartmentControlName, ud_sDirectorControlName; int i; ud_sProposerControlName = "wfoProposer"; ud_sDepartmentControlName = "wfoDepartment"; ud_sDirectorControlName = "wfoDirector"; for (i = 1; i <= up_iProposerCount; i++) { RmsPM.Web.WorkFlowControl.WorkFlowOpinion ud_wfoContraol; ud_wfoContraol = (RmsPM.Web.WorkFlowControl.WorkFlowOpinion)up_Page.FindControl(ud_sProposerControlName + i.ToString()); if (ud_wfoContraol.State == ModuleState.Operable) { ud_wfoContraol.ApplicationCode = up_Toolbar.ApplicationCode; ud_wfoContraol.dao = dao; ud_wfoContraol.SubmitData(); } } for (i = 1; i <= up_iDepartmentCount; i++) { RmsPM.Web.WorkFlowControl.WorkFlowOpinion ud_wfoContraol; ud_wfoContraol = (RmsPM.Web.WorkFlowControl.WorkFlowOpinion)up_Page.FindControl(ud_sDepartmentControlName + i.ToString()); if (ud_wfoContraol.State == ModuleState.Operable) { ud_wfoContraol.ApplicationCode = up_Toolbar.ApplicationCode; ud_wfoContraol.dao = dao; ud_wfoContraol.SubmitData(); } } for (i = 1; i <= up_iDirectorCount; i++) { RmsPM.Web.WorkFlowControl.WorkFlowOpinion ud_wfoContraol; ud_wfoContraol = (RmsPM.Web.WorkFlowControl.WorkFlowOpinion)up_Page.FindControl(ud_sDirectorControlName + i.ToString()); if (ud_wfoContraol.State == ModuleState.Operable) { ud_wfoContraol.ApplicationCode = up_Toolbar.ApplicationCode; ud_wfoContraol.dao = dao; ud_wfoContraol.SubmitData(); } } } catch (Exception ex) { throw ex; } }
/// **************************************************************************** /// <summary> /// 业务数据操作 /// </summary> /// **************************************************************************** override protected Boolean DataSubmit(StandardEntityDAO dao) { //if(this.BiddingAuditing1.State == ModuleState.Operable) //{ //this.BiddingAuditing1.ApplicationCode = WorkFlowToolbar1.ApplicationCode; this.BiddingAuditing1.dao = dao; this.BiddingAuditing1.SubmitData(); //} return(true); }
/// <summary> /// 完成 /// </summary> virtual protected void ToolBarTaskFinish(StandardEntityDAO dao) { if (DataSubmit(dao)) { this.up_wftToolbar.TaskFinish(); } else { dao.RollBackTrans(); this.up_wftToolbar.IsNew = false; } }
/// <summary> /// 抄送 /// </summary> virtual protected void ToolBarMakeCopy(StandardEntityDAO dao) { if (DataSubmit(dao)) { wftToolbar.MakeCopy(); } else { dao.RollBackTrans(); wftToolbar.IsNew = false; } }
/// <summary> /// 结束 /// </summary> virtual protected void ToolBarFinish(StandardEntityDAO dao) { if (DataSubmit(dao, true)) { wftToolbar.Finish(); } else { dao.RollBackTrans(); wftToolbar.IsNew = false; } }
/// <summary> /// 流程删除 /// </summary> /// <param name="dao">流程删除</param> virtual protected void ToolBarDelete(StandardEntityDAO dao) { if (this.up_ucOperationControl.Delete(dao)) { this.up_wftToolbar.Delete(); } else { dao.RollBackTrans(); this.up_wftToolbar.IsNew = false; } }
/// <summary> /// 退返经办人 /// </summary> virtual protected void ToolBarBackTop(StandardEntityDAO dao) { if (DataSubmit(dao) && OpinionDataSubmit(dao)) { this.up_wftToolbar.BackTop(); } else { dao.RollBackTrans(); this.up_wftToolbar.IsNew = false; } }
/// **************************************************************************** /// <summary> /// 业务数据操作 /// </summary> /// **************************************************************************** override protected Boolean DataSubmit(StandardEntityDAO dao) { if (this.BiddingMessageModify1.State == ModuleState.Operable) { //this.BiddingMessageModify1.ApplicationCode = WorkFlowToolbar1.ApplicationCode; this.BiddingMessageModify1.dao = dao; this.BiddingMessageModify1.SubmitData(); RmsPM.BLL.BiddingSystem.Set_BiddingState("42", this.BiddingMessageModify1.BiddingCode); } return(true); }
/// <summary> /// 编辑数据 /// </summary> public void ModifyData() { try { BiddingSupplier cbiddingSupplier = new BiddingSupplier(); cbiddingSupplier.dao = this.dao; cbiddingSupplier.BiddingPrejudicationCode = this.BiddingForwardPrejudicationCode; cbiddingSupplier.Flag = "1"; EntityData entitydata = cbiddingSupplier._GetBiddingSuppliers(); foreach (DataRow dr in entitydata.CurrentTable.Select()) { dr["flag"] = "0"; } if (dao != null) { dao.SubmitEntity(entitydata); } else { using (dao = new StandardEntityDAO("BiddingSupplier")) { dao.SubmitEntity(entitydata); } } int iCount = this.dgList.Items.Count; for (int i = 0; i < iCount; i++) { string strCode = this.dgList.Items[i].Cells[0].Text.Trim(); string strValue = ((HtmlInputText)this.dgList.Items[i].Cells[11].FindControl("txtNominateUser")).Value.Trim(); //if( ""==strValue ) //{ // Response.Write( Rms.Web.JavaScript.Alert(true,"请填写提名人!") ); // return; //} BLL.BiddingSupplier cbs = new RmsPM.BLL.BiddingSupplier(); cbs.dao = dao; cbs.BiddingSupplierCode = strCode; cbs.NominateUser = strValue; cbs.BiddingSupplierUpdate(); } } catch (Exception ex) { ApplicationLog.WriteLog(this.ToString(), ex, ""); } }
public static void DtsPaySingleByClient(string ClientCode) { Exception exception; try { SalService srv = new SalService(); DataSet dsSrc = srv.GetSalDataByClient(ClientCode); DataTable table = dsSrc.Tables["Client"]; if (table.Rows.Count > 0) { string projectCode = ProjectRule.GetProjectCodeBySalProjectCode(table.Rows[0]["proj_code"].ToString()); switch (projectCode) { case null: case "": throw new Exception("该客户在项目管理系统中无对应的项目"); } using (StandardEntityDAO dao = new StandardEntityDAO("SalClient")) { dao.BeginTrans(); try { EntityData data = ImportSalClientByClient(ClientCode, projectCode, dsSrc, dao); EntityData data2 = ImportSalContractByClient(ClientCode, projectCode, dsSrc, dao); EntityData data3 = ImportSalPayByClient(ClientCode, projectCode, dsSrc, dao); EntityData data4 = ImportSalPayPlanByClient(ClientCode, projectCode, dsSrc, dao); EntityData data5 = ImportSalPayRelaByClient(ClientCode, projectCode, dsSrc, dao); dao.CommitTrans(); } catch (Exception exception1) { exception = exception1; try { dao.RollBackTrans(); } catch { } throw exception; } SetSalImpFlag(srv, dsSrc); } } } catch (Exception exception2) { exception = exception2; throw exception; } }
/// <summary> /// 发送 /// </summary> virtual protected void ToolBarSend(StandardEntityDAO dao) { if (DataSubmit(dao, true)) { wftToolbar.Send(); WorkFlowPropertySave(); } else { dao.RollBackTrans(); wftToolbar.IsNew = false; } }
/// <summary> /// 抄送 /// </summary> virtual protected void ToolBarMakeCopy(StandardEntityDAO dao) { if (DataSubmit(dao) && OpinionDataSubmit(dao)) { this.up_wftToolbar.MakeCopy(); WorkFlowPropertySave(); } else { dao.RollBackTrans(); this.up_wftToolbar.IsNew = false; } }