public void AddConsultation(FLOW_CONSULTATION_T flowConsultation, SubmitData submitData) { OracleConnection con = ADOHelper.GetOracleConnection(); SMT.FlowWFService.NewFlow.Service s2 = new SMT.FlowWFService.NewFlow.Service(); s2.AddConsultation(con,flowConsultation, submitData); #region 旧代码 //if (strIsFlowEngine.ToLower() == "true") //{ // try // { // flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T = // FlowBLL.GetFLOW_FLOWRECORDMASTER_T(flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FLOWRECORDMASTERID); // FlowEngineService.EngineWcfGlobalFunctionClient FlowEngine = new FlowEngineService.EngineWcfGlobalFunctionClient(); // FlowEngineService.CustomUserMsg[] cs = new FlowEngineService.CustomUserMsg[1]; // FlowEngineService.CustomUserMsg cu = new FlowEngineService.CustomUserMsg(); // cu.FormID = flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID; // cu.UserID = flowConsultation.REPLYUSERID; // cs[0] = cu; // ModelInfo modelinfo = FlowBLL.GetSysCodeByModelCode(submitData.ModelCode); // MessageData tmpMessageData = new MessageData("Flow", modelinfo.SysCode, // flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATECOMPANYID, // submitData.ModelCode, modelinfo.ModelName, submitData.FormID, flowConsultation.FLOW_FLOWRECORDDETAIL_T.STATECODE, flowConsultation.FLOW_FLOWRECORDDETAIL_T.CHECKSTATE, "", "", "", ""); // FlowBLL flowBLL = new FlowBLL(); // StringBuilder FlowResultXml = flowBLL.BuildMessageData(tmpMessageData); // //FlowEngine = new FlowEngineService.EngineWcfGlobalFunctionClient(); // //log = FlowEngine.SaveFlowTriggerData(FlowResultXml.ToString(), submitData.XML); // if (!string.IsNullOrEmpty(flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.BUSINESSOBJECT)) // { // submitData.XML = flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.BUSINESSOBJECT; // } // bool b = FlowEngine.FlowConsultati(cs, "", FlowResultXml.ToString(), submitData.XML); // if (!b) // { // Tracer.Debug("FlowEngineService-FlowConsultati:" + flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID // + "\nsubmitData:" + submitData.XML); // } // FlowBLL bll = new FlowBLL(); // bll.AddConsultation(flowConsultation); // } // catch (Exception ex) // { // Tracer.Debug("AddConsultation: -" + flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID + "-" + ex.InnerException + ex.Message); // throw ex; // } //} #endregion }
public void AddConsultation(OracleConnection con, FLOW_CONSULTATION_T flowConsultation, SubmitData submitData) { if (strIsFlowEngine.ToLower() == "true") { try { flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T = FlowBLL2.GetFLOW_FLOWRECORDMASTER_T(con, flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FLOWRECORDMASTERID); FlowEngineService.EngineWcfGlobalFunctionClient FlowEngine = new FlowEngineService.EngineWcfGlobalFunctionClient(); FlowEngineService.CustomUserMsg[] cs = new FlowEngineService.CustomUserMsg[1]; FlowEngineService.CustomUserMsg cu = new FlowEngineService.CustomUserMsg(); cu.FormID = flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID; cu.UserID = flowConsultation.REPLYUSERID; cs[0] = cu; ModelInfo modelinfo = FlowBLL2.GetSysCodeByModelCode(con, submitData.ModelCode); MessageData tmpMessageData = new MessageData("Flow", modelinfo.SysCode, flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATECOMPANYID, submitData.ModelCode, modelinfo.ModelName, submitData.FormID, flowConsultation.FLOW_FLOWRECORDDETAIL_T.STATECODE, flowConsultation.FLOW_FLOWRECORDDETAIL_T.CHECKSTATE, "", "", "", ""); FlowBLL2 flowBLL = new FlowBLL2(); StringBuilder FlowResultXml = flowBLL.BuildMessageData(tmpMessageData); //FlowEngine = new FlowEngineService.EngineWcfGlobalFunctionClient(); //log = FlowEngine.SaveFlowTriggerData(FlowResultXml.ToString(), submitData.XML); if (!string.IsNullOrEmpty(flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.BUSINESSOBJECT)) { submitData.XML = flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.BUSINESSOBJECT; } bool b = FlowEngine.FlowConsultati(cs, "", FlowResultXml.ToString(), submitData.XML); if (!b) { Tracer.Debug("FlowEngineService-FlowConsultati:" + flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID +"\nsubmitData:"+submitData.XML); } FlowBLL2 bll = new FlowBLL2(); bll.AddConsultation(con, flowConsultation); } catch (Exception ex) { LogHelper.WriteLog("AddConsultation异常信息 :" + ex.ToString()); //Tracer.Debug("AddConsultation: -" + flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID + "-" + ex.InnerException + ex.Message); throw ex; } } }
public static void Update(FLOW_CONSULTATION_T flowConsultation) { using (OracleConnection con = new OracleConnection(ADOHelper.ContextOracleConnection)) { try { flowConsultation.REPLYDATE = DateTime.Now; flowConsultation.FLAG = "1"; //flowConsultation.CONSULTATIONDATE = DateTime.Now; string sql = @"update FLOW_CONSULTATION_T set FLOWRECORDDETAILID=:pFLOWRECORDDETAILID,CONSULTATIONUSERID=:pCONSULTATIONUSERID, CONSULTATIONCONTENT=:pCONSULTATIONCONTENT,CONSULTATIONDATE=:pCONSULTATIONDATE,REPLYUSERID=:pREPLYUSERID, REPLYCONTENT=:pREPLYCONTENT,REPLYDATE=:pREPLYDATE,FLAG=:pFLAG, CONSULTATIONUSERNAME=:pCONSULTATIONUSERNAME,REPLYUSERNAME=:pREPLYUSERNAME where CONSULTATIONID=:pCONSULTATIONID "; #region con.Open(); OracleCommand cmd = con.CreateCommand(); cmd.CommandText = sql; ADOHelper.AddParameter("CONSULTATIONID", flowConsultation.CONSULTATIONID, OracleType.NVarChar, cmd.Parameters); ADOHelper.AddParameter("FLOWRECORDDETAILID", flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID, OracleType.NVarChar, cmd.Parameters); ADOHelper.AddParameter("CONSULTATIONUSERID", flowConsultation.CONSULTATIONUSERID, OracleType.NVarChar, cmd.Parameters); ADOHelper.AddParameter("CONSULTATIONCONTENT", flowConsultation.CONSULTATIONCONTENT, OracleType.NVarChar, cmd.Parameters); ADOHelper.AddParameter("CONSULTATIONDATE", flowConsultation.CONSULTATIONDATE, OracleType.DateTime, cmd.Parameters); ADOHelper.AddParameter("REPLYUSERID", flowConsultation.REPLYUSERID, OracleType.NVarChar, cmd.Parameters); ADOHelper.AddParameter("REPLYCONTENT", flowConsultation.REPLYCONTENT, OracleType.NVarChar, cmd.Parameters); ADOHelper.AddParameter("REPLYDATE", flowConsultation.REPLYDATE, OracleType.DateTime, cmd.Parameters); ADOHelper.AddParameter("FLAG", flowConsultation.FLAG, OracleType.NVarChar, cmd.Parameters); ADOHelper.AddParameter("CONSULTATIONUSERNAME", flowConsultation.CONSULTATIONUSERNAME, OracleType.NVarChar, cmd.Parameters); ADOHelper.AddParameter("REPLYUSERNAME", flowConsultation.REPLYUSERNAME, OracleType.NVarChar, cmd.Parameters); cmd.ExecuteNonQuery(); con.Close(); #endregion } catch (Exception ex) { if (con.State == ConnectionState.Open) { con.Close(); } throw new Exception("FLOW_CONSULTATION_TDAL_Update:" + ex.Message); } } }
/// <summary> /// 更新: [咨询] /// </summary> /// <param name="model">FLOW_CONSULTATION_T</param> /// <returns></returns> public static int Update(OracleConnection con, FLOW_CONSULTATION_T model) { try { if (con.State != ConnectionState.Open) { con.Open(); } model.REPLYDATE = DateTime.Now; model.FLAG = "1"; string updSql = "UPDATE FLOW_CONSULTATION_T SET FLOWRECORDDETAILID=:FLOWRECORDDETAILID,CONSULTATIONUSERID=:CONSULTATIONUSERID,CONSULTATIONUSERNAME=:CONSULTATIONUSERNAME,CONSULTATIONCONTENT=:CONSULTATIONCONTENT,CONSULTATIONDATE=:CONSULTATIONDATE,REPLYUSERID=:REPLYUSERID,REPLYUSERNAME=:REPLYUSERNAME,REPLYCONTENT=:REPLYCONTENT,REPLYDATE=:REPLYDATE,FLAG=:FLAG WHERE CONSULTATIONID=:CONSULTATIONID"; OracleParameter[] pageparm = { new OracleParameter(":CONSULTATIONID",OracleType.NVarChar), new OracleParameter(":FLOWRECORDDETAILID",OracleType.NVarChar), new OracleParameter(":CONSULTATIONUSERID",OracleType.NVarChar), new OracleParameter(":CONSULTATIONUSERNAME",OracleType.NVarChar), new OracleParameter(":CONSULTATIONCONTENT",OracleType.NVarChar), new OracleParameter(":CONSULTATIONDATE",OracleType.DateTime), new OracleParameter(":REPLYUSERID",OracleType.NVarChar), new OracleParameter(":REPLYUSERNAME",OracleType.NVarChar), new OracleParameter(":REPLYCONTENT",OracleType.NVarChar), new OracleParameter(":REPLYDATE",OracleType.DateTime), new OracleParameter(":FLAG",OracleType.NVarChar) }; pageparm[0].Value = MsOracle.GetValue(model.CONSULTATIONID);// pageparm[1].Value = MsOracle.GetValue(model.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID);// pageparm[2].Value = MsOracle.GetValue(model.CONSULTATIONUSERID);// pageparm[3].Value = MsOracle.GetValue(model.CONSULTATIONUSERNAME);// pageparm[4].Value = MsOracle.GetValue(model.CONSULTATIONCONTENT);// pageparm[5].Value = MsOracle.GetValue(model.CONSULTATIONDATE);// pageparm[6].Value = MsOracle.GetValue(model.REPLYUSERID);// pageparm[7].Value = MsOracle.GetValue(model.REPLYUSERNAME);// pageparm[8].Value = MsOracle.GetValue(model.REPLYCONTENT);// pageparm[9].Value = MsOracle.GetValue(model.REPLYDATE);// pageparm[10].Value = MsOracle.GetValue(model.FLAG);//0未回复,1回复 return MsOracle.ExecuteSQLByTransaction(con, updSql, pageparm); } catch (Exception ex) { if (con.State == ConnectionState.Open) { con.Close(); } throw new Exception("FLOW_CONSULTATION_TDAL_Update:" + ex.Message); } }
/// <summary> /// 更新: [咨询] /// </summary> /// <param name="model">FLOW_CONSULTATION_T</param> /// <returns></returns> public static int Update(OracleConnection con, FLOW_CONSULTATION_T model) { try { if (con.State != ConnectionState.Open) { con.Open(); } model.REPLYDATE = DateTime.Now; model.FLAG = "1"; string updSql = "UPDATE FLOW_CONSULTATION_T SET FLOWRECORDDETAILID=:FLOWRECORDDETAILID,CONSULTATIONUSERID=:CONSULTATIONUSERID,CONSULTATIONUSERNAME=:CONSULTATIONUSERNAME,CONSULTATIONCONTENT=:CONSULTATIONCONTENT,CONSULTATIONDATE=:CONSULTATIONDATE,REPLYUSERID=:REPLYUSERID,REPLYUSERNAME=:REPLYUSERNAME,REPLYCONTENT=:REPLYCONTENT,REPLYDATE=:REPLYDATE,FLAG=:FLAG WHERE CONSULTATIONID=:CONSULTATIONID"; OracleParameter[] pageparm = { new OracleParameter(":CONSULTATIONID", OracleType.NVarChar), new OracleParameter(":FLOWRECORDDETAILID", OracleType.NVarChar), new OracleParameter(":CONSULTATIONUSERID", OracleType.NVarChar), new OracleParameter(":CONSULTATIONUSERNAME", OracleType.NVarChar), new OracleParameter(":CONSULTATIONCONTENT", OracleType.NVarChar), new OracleParameter(":CONSULTATIONDATE", OracleType.DateTime), new OracleParameter(":REPLYUSERID", OracleType.NVarChar), new OracleParameter(":REPLYUSERNAME", OracleType.NVarChar), new OracleParameter(":REPLYCONTENT", OracleType.NVarChar), new OracleParameter(":REPLYDATE", OracleType.DateTime), new OracleParameter(":FLAG", OracleType.NVarChar) }; pageparm[0].Value = MsOracle.GetValue(model.CONSULTATIONID); // pageparm[1].Value = MsOracle.GetValue(model.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID); // pageparm[2].Value = MsOracle.GetValue(model.CONSULTATIONUSERID); // pageparm[3].Value = MsOracle.GetValue(model.CONSULTATIONUSERNAME); // pageparm[4].Value = MsOracle.GetValue(model.CONSULTATIONCONTENT); // pageparm[5].Value = MsOracle.GetValue(model.CONSULTATIONDATE); // pageparm[6].Value = MsOracle.GetValue(model.REPLYUSERID); // pageparm[7].Value = MsOracle.GetValue(model.REPLYUSERNAME); // pageparm[8].Value = MsOracle.GetValue(model.REPLYCONTENT); // pageparm[9].Value = MsOracle.GetValue(model.REPLYDATE); // pageparm[10].Value = MsOracle.GetValue(model.FLAG); //0未回复,1回复 return(MsOracle.ExecuteSQLByTransaction(con, updSql, pageparm)); } catch (Exception ex) { if (con.State == ConnectionState.Open) { con.Close(); } throw new Exception("FLOW_CONSULTATION_TDAL_Update:" + ex.Message); } }
/// <summary> /// 新增[咨询] /// </summary> /// <param name="con">OracleConnection</param> /// <param name="model">FLOW_CONSULTATION_T</param> /// <returns></returns> public static int Add(OracleConnection con, FLOW_CONSULTATION_T model) { try { if (con.State != ConnectionState.Open) { con.Open(); } string insSql = "INSERT INTO FLOW_CONSULTATION_T (CONSULTATIONID,FLOWRECORDDETAILID,CONSULTATIONUSERID,CONSULTATIONUSERNAME,CONSULTATIONCONTENT,CONSULTATIONDATE,REPLYUSERID,REPLYUSERNAME,REPLYCONTENT,REPLYDATE,FLAG) VALUES (:CONSULTATIONID,:FLOWRECORDDETAILID,:CONSULTATIONUSERID,:CONSULTATIONUSERNAME,:CONSULTATIONCONTENT,:CONSULTATIONDATE,:REPLYUSERID,:REPLYUSERNAME,:REPLYCONTENT,:REPLYDATE,:FLAG)"; OracleParameter[] pageparm = { new OracleParameter(":CONSULTATIONID",OracleType.NVarChar), new OracleParameter(":FLOWRECORDDETAILID",OracleType.NVarChar), new OracleParameter(":CONSULTATIONUSERID",OracleType.NVarChar), new OracleParameter(":CONSULTATIONUSERNAME",OracleType.NVarChar), new OracleParameter(":CONSULTATIONCONTENT",OracleType.NVarChar), new OracleParameter(":CONSULTATIONDATE",OracleType.DateTime), new OracleParameter(":REPLYUSERID",OracleType.NVarChar), new OracleParameter(":REPLYUSERNAME",OracleType.NVarChar), new OracleParameter(":REPLYCONTENT",OracleType.NVarChar), new OracleParameter(":REPLYDATE",OracleType.DateTime), new OracleParameter(":FLAG",OracleType.NVarChar) }; pageparm[0].Value = MsOracle.GetValue(model.CONSULTATIONID);// pageparm[1].Value = MsOracle.GetValue(model.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID);// pageparm[2].Value = MsOracle.GetValue(model.CONSULTATIONUSERID);// pageparm[3].Value = MsOracle.GetValue(model.CONSULTATIONUSERNAME);// pageparm[4].Value = MsOracle.GetValue(model.CONSULTATIONCONTENT);// pageparm[5].Value = MsOracle.GetValue(model.CONSULTATIONDATE);// pageparm[6].Value = MsOracle.GetValue(model.REPLYUSERID);// pageparm[7].Value = MsOracle.GetValue(model.REPLYUSERNAME);// pageparm[8].Value = MsOracle.GetValue(model.REPLYCONTENT);// pageparm[9].Value = MsOracle.GetValue(model.REPLYDATE);// pageparm[10].Value = MsOracle.GetValue(model.FLAG);//0未回复,1回复 return MsOracle.ExecuteSQLByTransaction(con, insSql, pageparm); } catch (Exception ex) { if (con.State == ConnectionState.Open) { con.Close(); } throw new Exception("FLOW_CONSULTATION_TDAL_Add:" + ex.Message); } }
/// <summary> /// 新增[咨询] /// </summary> /// <param name="con">OracleConnection</param> /// <param name="model">FLOW_CONSULTATION_T</param> /// <returns></returns> public static int Add(OracleConnection con, FLOW_CONSULTATION_T model) { try { if (con.State != ConnectionState.Open) { con.Open(); } string insSql = "INSERT INTO FLOW_CONSULTATION_T (CONSULTATIONID,FLOWRECORDDETAILID,CONSULTATIONUSERID,CONSULTATIONUSERNAME,CONSULTATIONCONTENT,CONSULTATIONDATE,REPLYUSERID,REPLYUSERNAME,REPLYCONTENT,REPLYDATE,FLAG) VALUES (:CONSULTATIONID,:FLOWRECORDDETAILID,:CONSULTATIONUSERID,:CONSULTATIONUSERNAME,:CONSULTATIONCONTENT,:CONSULTATIONDATE,:REPLYUSERID,:REPLYUSERNAME,:REPLYCONTENT,:REPLYDATE,:FLAG)"; OracleParameter[] pageparm = { new OracleParameter(":CONSULTATIONID", OracleType.NVarChar), new OracleParameter(":FLOWRECORDDETAILID", OracleType.NVarChar), new OracleParameter(":CONSULTATIONUSERID", OracleType.NVarChar), new OracleParameter(":CONSULTATIONUSERNAME", OracleType.NVarChar), new OracleParameter(":CONSULTATIONCONTENT", OracleType.NVarChar), new OracleParameter(":CONSULTATIONDATE", OracleType.DateTime), new OracleParameter(":REPLYUSERID", OracleType.NVarChar), new OracleParameter(":REPLYUSERNAME", OracleType.NVarChar), new OracleParameter(":REPLYCONTENT", OracleType.NVarChar), new OracleParameter(":REPLYDATE", OracleType.DateTime), new OracleParameter(":FLAG", OracleType.NVarChar) }; pageparm[0].Value = MsOracle.GetValue(model.CONSULTATIONID); // pageparm[1].Value = MsOracle.GetValue(model.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID); // pageparm[2].Value = MsOracle.GetValue(model.CONSULTATIONUSERID); // pageparm[3].Value = MsOracle.GetValue(model.CONSULTATIONUSERNAME); // pageparm[4].Value = MsOracle.GetValue(model.CONSULTATIONCONTENT); // pageparm[5].Value = MsOracle.GetValue(model.CONSULTATIONDATE); // pageparm[6].Value = MsOracle.GetValue(model.REPLYUSERID); // pageparm[7].Value = MsOracle.GetValue(model.REPLYUSERNAME); // pageparm[8].Value = MsOracle.GetValue(model.REPLYCONTENT); // pageparm[9].Value = MsOracle.GetValue(model.REPLYDATE); // pageparm[10].Value = MsOracle.GetValue(model.FLAG); //0未回复,1回复 return(MsOracle.ExecuteSQLByTransaction(con, insSql, pageparm)); } catch (Exception ex) { if (con.State == ConnectionState.Open) { con.Close(); } throw new Exception("FLOW_CONSULTATION_TDAL_Add:" + ex.Message); } }
public void AddConsultation(OracleConnection con, FLOW_CONSULTATION_T flowConsultation, SubmitData submitData) { if (strIsFlowEngine.ToLower() == "true") { try { #region 记录日志 FLOW_CONSULTATION_T entity = flowConsultation; StringBuilder sb = new StringBuilder(); sb.AppendLine("FLOW_CONSULTATION_T entity= new FLOW_CONSULTATION_T();");// sb.AppendLine("entity.CONSULTATIONID = \"" + entity.CONSULTATIONID + "\";");// sb.AppendLine("entity.FLOWRECORDDETAILID = \"" + (entity.FLOW_FLOWRECORDDETAIL_T == null ? "" : entity.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID) + "\";"); sb.AppendLine("entity.CONSULTATIONUSERID = \"" + entity.CONSULTATIONUSERID + "\";"); sb.AppendLine("entity.CONSULTATIONUSERNAME = \"" + entity.CONSULTATIONUSERNAME + "\";"); sb.AppendLine("entity.CONSULTATIONCONTENT =\"" + entity.CONSULTATIONCONTENT + "\";"); sb.AppendLine("entity.CONSULTATIONDATE = \"" + entity.CONSULTATIONDATE + "\";"); sb.AppendLine("entity.REPLYUSERID = \"" + entity.REPLYUSERID + "\";"); sb.AppendLine("entity.REPLYUSERNAME = \"" + entity.REPLYUSERNAME + "\";"); sb.AppendLine("entity.REPLYCONTENT = \"" + entity.REPLYCONTENT + "\";"); sb.AppendLine("entity.REPLYDATE = \"" + entity.REPLYDATE + "\";"); sb.AppendLine("entity.FLAG = \"" + entity.FLAG + "\";");//0未回复,1回复 sb.AppendLine("FLOW_FLOWRECORDDETAIL_T model=new FLOW_FLOWRECORDDETAIL_T();"); sb.AppendLine(" model.FLOWRECORDDETAILID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID + "\";"); //sb.AppendLine(" model.FLOWRECORDMASTERID=\""+entity.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDMASTERID+"\";"); sb.AppendLine(" model.STATECODE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.STATECODE + "\";"); sb.AppendLine(" model.PARENTSTATEID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.PARENTSTATEID + "\";"); sb.AppendLine(" model.CONTENT=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CONTENT + "\";"); sb.AppendLine(" model.CHECKSTATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CHECKSTATE + "\";//同意:1,不同意:0 ,未处理:2,会签同意7,会签不同意8"); sb.AppendLine(" model.FLAG=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLAG + "\";//已审批:1,未审批:0"); sb.AppendLine(" model.CREATEUSERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATEUSERID + "\";"); sb.AppendLine(" model.CREATEUSERNAME=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATEUSERNAME + "\";"); sb.AppendLine(" model.CREATECOMPANYID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATECOMPANYID + "\";"); sb.AppendLine(" model.CREATEDEPARTMENTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATEDEPARTMENTID + "\";"); sb.AppendLine(" model.CREATEPOSTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATEPOSTID + "\";"); sb.AppendLine(" model.CREATEDATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATEDATE + "\";"); sb.AppendLine(" model.EDITUSERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITUSERID + "\";"); sb.AppendLine(" model.EDITUSERNAME=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITUSERNAME + "\";"); sb.AppendLine(" model.EDITCOMPANYID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITCOMPANYID + "\";"); sb.AppendLine(" model.EDITDEPARTMENTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITDEPARTMENTID + "\";"); sb.AppendLine(" model.EDITPOSTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITPOSTID + "\";"); sb.AppendLine(" model.EDITDATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITDATE + "\";"); sb.AppendLine(" model.AGENTUSERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.AGENTUSERID + "\";"); sb.AppendLine(" model.AGENTERNAME=\"" + entity.FLOW_FLOWRECORDDETAIL_T.AGENTERNAME + "\";"); sb.AppendLine(" model.AGENTEDITDATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.AGENTEDITDATE + "\";"); sb.AppendLine(" entity.FLOW_FLOWRECORDDETAIL_T = model;"); sb.AppendLine("FLOW_FLOWRECORDMASTER_T eentity=new FLOW_FLOWRECORDMASTER_T();"); sb.AppendLine(" eentity.FLOWRECORDMASTERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FLOWRECORDMASTERID + "\";"); sb.AppendLine(" eentity.INSTANCEID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.INSTANCEID + "\";"); sb.AppendLine(" eentity.FLOWSELECTTYPE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FLOWSELECTTYPE + "\";//0:固定流程,1:自选流程"); sb.AppendLine(" eentity.MODELCODE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.MODELCODE + "\";"); sb.AppendLine(" eentity.FLOWCODE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FLOWCODE + "\";"); sb.AppendLine(" eentity.FORMID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID + "\";"); sb.AppendLine(" eentity.FLOWTYPE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FLOWTYPE + "\";//0:审批流程,1:任务流程"); sb.AppendLine(" eentity.CHECKSTATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CHECKSTATE + "\";//1:审批中,2:审批通过,3审批不通过,5撤销(为与字典保持一致)"); sb.AppendLine(" eentity.CREATEUSERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATEUSERID + "\";"); sb.AppendLine(" eentity.CREATEUSERNAME=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATEUSERNAME + "\";"); sb.AppendLine(" eentity.CREATECOMPANYID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATECOMPANYID + "\";"); sb.AppendLine(" eentity.CREATEDEPARTMENTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATEDEPARTMENTID + "\";"); sb.AppendLine(" eentity.CREATEPOSTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATEPOSTID + "\";"); sb.AppendLine(" eentity.CREATEDATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATEDATE + "\";"); sb.AppendLine(" eentity.EDITUSERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.EDITUSERID + "\";"); sb.AppendLine(" eentity.EDITUSERNAME=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.EDITUSERNAME + "\";"); sb.AppendLine(" eentity.EDITDATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.EDITDATE + "\";"); sb.AppendLine(" eentity.ACTIVEROLE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.ACTIVEROLE + "\";"); sb.AppendLine(" eentity.BUSINESSOBJECT=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.BUSINESSOBJECT + "\";"); sb.AppendLine(" eentity.KPITIMEXML=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.KPITIMEXML + "\";"); sb.AppendLine(" entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T = eentity;"); LogHelper.WriteLog("流程引擎的XML数据", "SubimtFlow入口处 进行咨询: FormID=" + submitData.FormID + ";ModelCode=" + submitData.ModelCode + " \r\n FLOW_CONSULTATION_T 实体:\r\n" + sb.ToString()); WriteSubmitDate(submitData); #endregion flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T = FlowBLL.GetFLOW_FLOWRECORDMASTER_T(con, flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FLOWRECORDMASTERID); FlowEngineService.EngineWcfGlobalFunctionClient FlowEngine = new FlowEngineService.EngineWcfGlobalFunctionClient(); //FlowEngineService.CustomUserMsg[] cs = new FlowEngineService.CustomUserMsg[1]; //FlowEngineService.CustomUserMsg cu = new FlowEngineService.CustomUserMsg(); //cu.FormID = flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID; //cu.UserID = flowConsultation.REPLYUSERID; //cs[0] = cu; List<CustomUserMsg> UserAndForm = new List<CustomUserMsg>(); CustomUserMsg cu = new CustomUserMsg(); cu.FormID = flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID; cu.UserID = flowConsultation.REPLYUSERID; UserAndForm.Add(cu); ModelInfo modelinfo = FlowBLL.GetSysCodeByModelCode(con, submitData.ModelCode); MessageData tmpMessageData = new MessageData("Flow", modelinfo.SysCode, flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATECOMPANYID, submitData.ModelCode, modelinfo.ModelName, submitData.FormID, flowConsultation.FLOW_FLOWRECORDDETAIL_T.STATECODE, flowConsultation.FLOW_FLOWRECORDDETAIL_T.CHECKSTATE, "", "", "", ""); FlowBLL flowBLL = new FlowBLL(); StringBuilder FlowResultXml = flowBLL.BuildMessageData(tmpMessageData); //FlowEngine = new FlowEngineService.EngineWcfGlobalFunctionClient(); //log = FlowEngine.SaveFlowTriggerData(FlowResultXml.ToString(), submitData.XML); if (!string.IsNullOrEmpty(flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.BUSINESSOBJECT)) { submitData.XML = flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.BUSINESSOBJECT; } //bool b = FlowEngine.FlowConsultati(cs, "", FlowResultXml.ToString(), submitData.XML); EnginFlowBLL efbll = new EnginFlowBLL(); bool b = efbll.FlowConsultati(con, UserAndForm, "", FlowResultXml.ToString(), submitData.XML); if (!b) { LogHelper.WriteLog("发送咨询失败:FormID" + flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID + "\n\r submitData.XML:" + submitData.XML); } FlowBLL bll = new FlowBLL(); bll.AddConsultation(con, flowConsultation); } catch (Exception ex) { if (con.State == ConnectionState.Open) { con.Close(); } LogHelper.WriteLog("发送咨询出错: FORMID=" + flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID + "异常信息:\r\n" + ex.InnerException + ex.Message); throw ex; } finally { if (con.State == ConnectionState.Open) { con.Close(); } } } }
public ConsultationViewModel(FLOW_CONSULTATION_T FLOW_CONSULTATION_T, string loginUserID, SubmitData submmitData) { this.SubmmitData = submmitData; this.FlowConsultation = FLOW_CONSULTATION_T; if (this.FlowConsultation.CONSULTATIONUSERID == loginUserID) { if (string.IsNullOrEmpty(this.FlowConsultation.CONSULTATIONCONTENT)) { this.SetAddState(); } else { this.SetViewState(); } } else if (this.FlowConsultation.REPLYUSERID == loginUserID) { if (this.FlowConsultation.FLAG == "0") { this.SetReplyState(); } else { this.SetViewState(); } } else { this.SetViewState(); } }
private void LoadConsultation(List<FLOW_FLOWRECORDDETAIL_T> listDetail) { SubmitData submmitData = new SubmitData(); submmitData.FormID = AuditEntity.FormID; submmitData.ModelCode = AuditEntity.ModelCode; submmitData.ApprovalUser = new UserInfo(); submmitData.ApprovalUser.CompanyID = AuditEntity.CreateCompanyID; submmitData.ApprovalUser.DepartmentID = AuditEntity.CreateDepartmentID; submmitData.ApprovalUser.PostID = AuditEntity.CreatePostID; submmitData.ApprovalUser.UserID = AuditEntity.CreateUserID; submmitData.ApprovalUser.UserName = AuditEntity.CreateUserName; submmitData.ApprovalContent = AuditRemark; submmitData.NextStateCode = ""; submmitData.NextApprovalUser = new UserInfo(); submmitData.NextApprovalUser.CompanyID = NextCompanyID; submmitData.NextApprovalUser.DepartmentID = NextDepartmentID; submmitData.NextApprovalUser.PostID = NextPostID; submmitData.NextApprovalUser.UserID = NextUserID; submmitData.NextApprovalUser.UserName = NextUserName; submmitData.XML = this.XmlObject; //submmitData.SubmitFlag =SubmitFlag.Approval; string loginUserID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; string loginUserName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName; #region 发送的咨询 List<ConsultationViewModel> listSend = new List<ConsultationViewModel>(); //登录人已发送的咨询 listDetail.Where(detail => (detail.EDITUSERID == loginUserID || detail.AGENTUSERID == loginUserID) && detail.FLOW_CONSULTATION_T != null).ForEach(item => { item.FLOW_CONSULTATION_T.ForEach(consultation => { ConsultationViewModel viewModel = new ConsultationViewModel(consultation, loginUserID, submmitData); viewModel.WaitingHandler += new EventHandler(viewModel_WaitingHandler); viewModel.CompletedHandler += new EventHandler(viewModel_CompletedHandler); listSend.Add(viewModel); }); }); //登录人发起新咨询 if (this.currentFLOWRECORDDETAIL != null) { if (listSend.FirstOrDefault(v => v.FlowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID == this.currentFLOWRECORDDETAIL.FLOWRECORDDETAILID) == null) { FLOW_CONSULTATION_T consultation = new FLOW_CONSULTATION_T(); consultation.CONSULTATIONID = Guid.NewGuid().ToString(); consultation.CONSULTATIONUSERID = loginUserID; consultation.CONSULTATIONUSERNAME = loginUserName; consultation.FLAG = "0"; consultation.FLOW_FLOWRECORDDETAIL_T = this.currentFLOWRECORDDETAIL; if (this.currentFLOWRECORDDETAIL.FLOW_CONSULTATION_T == null) { this.currentFLOWRECORDDETAIL.FLOW_CONSULTATION_T = new ObservableCollection<FLOW_CONSULTATION_T>(); } this.currentFLOWRECORDDETAIL.FLOW_CONSULTATION_T.Add(consultation); ConsultationViewModel viewModel = new ConsultationViewModel(consultation, loginUserID, submmitData); viewModel.WaitingHandler += new EventHandler(viewModel_WaitingHandler); viewModel.CompletedHandler += new EventHandler(viewModel_CompletedHandler); listSend.Add(viewModel); } } if (listSend.Count > 0) { // this.expanderConsultationSend.IsExpanded = true;//龙康才:有咨询信息时默认展开 this.expanderConsultationSend.Visibility = System.Windows.Visibility.Visible; this.ConsultationListSend.ItemsSource = listSend; } else { this.expanderConsultationSend.Visibility = System.Windows.Visibility.Collapsed; } #endregion #region 回复咨询 List<ConsultationViewModel> listReply = new List<ConsultationViewModel>(); listDetail.Where(detail => detail.FLOW_CONSULTATION_T != null).ForEach(item => { item.FLOW_CONSULTATION_T.ForEach(consultation => { if (consultation.REPLYUSERID == loginUserID) { ConsultationViewModel viewModel = new ConsultationViewModel(consultation, loginUserID, submmitData); viewModel.WaitingHandler += new EventHandler(viewModel_WaitingHandler); viewModel.CompletedHandler += new EventHandler(viewModel_CompletedHandler); listReply.Add(viewModel); } }); }); if (listReply.Count > 0) { this.expanderConsultationSend.IsExpanded = true;//龙康才:有回复内容,咨询人的咨询信息时默认展开 this.expanderConsultationReply.IsExpanded = true;//龙康才:有回复内容信息时默认展开 this.expanderConsultationReply.Visibility = System.Windows.Visibility.Visible; this.ConsultationListReply.ItemsSource = listReply; } else { this.expanderConsultationReply.Visibility = System.Windows.Visibility.Collapsed; } #endregion #region old //List<ConsultationViewModel> listViewModel = new List<ConsultationViewModel>(); //#region 找出所有登录人的咨询 //listDetail.Where(detail => (detail.EDITUSERID == loginUserID || detail.AGENTUSERID == loginUserID) && detail.FLOW_CONSULTATION_T != null).ForEach(item => //{ // item.FLOW_CONSULTATION_T.ForEach(consultation => // { // ConsultationViewModel viewModel = new ConsultationViewModel(consultation, loginUserID, submmitData); // viewModel.WaitingHandler += new EventHandler(viewModel_WaitingHandler); // viewModel.CompletedHandler += new EventHandler(viewModel_CompletedHandler); // listViewModel.Add(viewModel); // }); //}); //#endregion //#region 登录人发起咨询 //if (this.currentFLOWRECORDDETAIL != null) //{ // if (listViewModel.FirstOrDefault(v => v.FlowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID == this.currentFLOWRECORDDETAIL.FLOWRECORDDETAILID) == null) // { // FLOW_CONSULTATION_T consultation = new FLOW_CONSULTATION_T(); // consultation.CONSULTATIONID = Guid.NewGuid().ToString(); // consultation.CONSULTATIONUSERID = loginUserID; // consultation.CONSULTATIONUSERNAME = loginUserName; // consultation.FLAG = "0"; // consultation.FLOW_FLOWRECORDDETAIL_T = this.currentFLOWRECORDDETAIL; // if (this.currentFLOWRECORDDETAIL.FLOW_CONSULTATION_T == null) // { // this.currentFLOWRECORDDETAIL.FLOW_CONSULTATION_T = new ObservableCollection<FLOW_CONSULTATION_T>(); // } // this.currentFLOWRECORDDETAIL.FLOW_CONSULTATION_T.Add(consultation); // ConsultationViewModel viewModel = new ConsultationViewModel(consultation, loginUserID, submmitData); // viewModel.WaitingHandler += new EventHandler(viewModel_WaitingHandler); // viewModel.CompletedHandler += new EventHandler(viewModel_CompletedHandler); // listViewModel.Add(viewModel); // } //} //#endregion //if (listViewModel.Count == 0) //{ // #region 登录人为被咨询人 // listDetail.Where(detail => detail.FLOW_CONSULTATION_T != null).ForEach(item => // { // item.FLOW_CONSULTATION_T.ForEach(consultation => // { // if (consultation.REPLYUSERID == loginUserID) // { // ConsultationViewModel viewModel = new ConsultationViewModel(consultation, loginUserID, submmitData); // viewModel.WaitingHandler += new EventHandler(viewModel_WaitingHandler); // viewModel.CompletedHandler += new EventHandler(viewModel_CompletedHandler); // listViewModel.Add(viewModel); // } // }); // }); // #endregion //} //if (listViewModel.Count > 0) //{ // this.expanderConsultation.Visibility = System.Windows.Visibility.Visible; // this.ConsultationList.ItemsSource = listViewModel; //} //else //{ // this.expanderConsultation.Visibility = System.Windows.Visibility.Collapsed; //} #endregion if (listDetail.FirstOrDefault(detail => detail.EDITUSERID == loginUserID || detail.AGENTUSERID == loginUserID) != null) { this.gridAudit.Visibility = System.Windows.Visibility.Visible; } else { //this.gridAudit.Visibility = System.Windows.Visibility.Collapsed; } if (listDetail != null && listDetail.Count > 0 && (listDetail[0].FLOW_FLOWRECORDMASTER_T.CHECKSTATE == "2" || listDetail[0].FLOW_FLOWRECORDMASTER_T.CHECKSTATE == "3")) { this.expanderConsultationSend.Visibility = System.Windows.Visibility.Collapsed; } }
/// <summary> /// 获取流程 /// </summary> /// <param name="con">OracleConnection连接对象</param> /// <param name="FormID">表单ID</param> /// <param name="FlowGUID">明细ID</param> /// <param name="CheckState">审批状态(同意:1,不同意:0 ,未处理:2,会签同意7,会签不同意8)</param> /// <param name="Flag">审批状态(已审批:1,未审批:0)</param> /// <param name="ModelCode">模块代码</param> /// <param name="CompanyID">创建公司ID</param> /// <param name="EditUserID">操作人</param> /// <param name="FlowType">流程类型(0:审批流程,1:任务流程)</param> /// <returns></returns> public static List<FLOW_FLOWRECORDDETAIL_T> GetFlowRecordV(OracleConnection con, string FormID, string FlowGUID, string CheckState, string Flag, string ModelCode, string CompanyID, string EditUserID, List<string> FlowType) { if (con.State != ConnectionState.Open) { con.Open(); } #region sql StringBuilder sb = new StringBuilder(); sb.Append(@"select FLOW_FLOWRECORDDETAIL_T.* from FLOW_FLOWRECORDDETAIL_T join FLOW_FLOWRECORDMASTER_T on FLOW_FLOWRECORDMASTER_T.FLOWRECORDMASTERID=FLOW_FLOWRECORDDETAIL_T.FLOWRECORDMASTERID where 1=1 "); if (!string.IsNullOrEmpty(FlowGUID)) { sb.Append(" and FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID='" + FlowGUID + "'"); } if (!string.IsNullOrEmpty(Flag)) { sb.Append(" and FLOW_FLOWRECORDDETAIL_T.FLAG='" + Flag + "'"); } if (!string.IsNullOrEmpty(EditUserID)) { sb.Append(" and (FLOW_FLOWRECORDDETAIL_T.EDITUSERID='" + EditUserID + "' or FLOW_FLOWRECORDDETAIL_T.AGENTUSERID='" + EditUserID + "')"); } if (!string.IsNullOrEmpty(CompanyID)) { sb.Append(" and FLOW_FLOWRECORDMASTER_T.CREATECOMPANYID='" + CompanyID + "'"); } if (!string.IsNullOrEmpty(ModelCode)) { sb.Append(" and FLOW_FLOWRECORDMASTER_T.MODELCODE='" + ModelCode + "'"); } if (!string.IsNullOrEmpty(FormID)) { sb.Append(" and FLOW_FLOWRECORDMASTER_T.FORMID='" + FormID + "'"); } if (!string.IsNullOrEmpty(CheckState)) { sb.Append(" and FLOW_FLOWRECORDMASTER_T.CHECKSTATE='" + CheckState + "'"); } if (FlowType != null) { if (FlowType.Count == 1) { sb.Append(" and FLOW_FLOWRECORDMASTER_T.FLOWTYPE='" + FlowType[0] + "'"); } else { sb.Append(" and FLOW_FLOWRECORDMASTER_T.FLOWTYPE in ("); for (int i = 0; i < FlowType.Count - 1; i++) { sb.Append("'" + FlowType[i] + "',"); } sb.Append("'" + FlowType[FlowType.Count - 1] + "'"); sb.Append(")"); } } #endregion List<FLOW_FLOWRECORDDETAIL_T> listDetail = new List<FLOW_FLOWRECORDDETAIL_T>(); List<FLOW_FLOWRECORDMASTER_T> listMaster = new List<FLOW_FLOWRECORDMASTER_T>(); OracleDataReader dr = null; try { List<string> listDetailID = new List<string>(); List<string> listMasterID = new List<string>(); //OracleCommand command = con.CreateCommand(); //command.CommandText = sb.ToString(); //dr = command.ExecuteReader(); dr = MsOracle.ExecuteReaderByTransaction(con, sb.ToString(), null); while (dr.Read()) { #region detail FLOW_FLOWRECORDDETAIL_T detail = new FLOW_FLOWRECORDDETAIL_T(); detail.FLOW_FLOWRECORDMASTER_T = new FLOW_FLOWRECORDMASTER_T(); detail.AGENTEDITDATE = dr["AGENTEDITDATE"] == DBNull.Value ? null : (DateTime?)dr["AGENTEDITDATE"]; detail.AGENTERNAME = dr["AGENTERNAME"] == DBNull.Value ? null : dr["AGENTERNAME"].ToString(); detail.AGENTUSERID = dr["AGENTUSERID"] == DBNull.Value ? null : dr["AGENTUSERID"].ToString(); detail.CHECKSTATE = dr["CHECKSTATE"] == DBNull.Value ? null : dr["CHECKSTATE"].ToString(); detail.CONTENT = dr["CONTENT"] == DBNull.Value ? null : dr["CONTENT"].ToString(); detail.CREATECOMPANYID = dr["CREATECOMPANYID"] == DBNull.Value ? null : dr["CREATECOMPANYID"].ToString(); detail.CREATEDATE = (DateTime)dr["CREATEDATE"]; detail.CREATEDEPARTMENTID = dr["CREATEDEPARTMENTID"] == DBNull.Value ? null : dr["CREATEDEPARTMENTID"].ToString(); detail.CREATEPOSTID = dr["CREATEPOSTID"] == DBNull.Value ? null : dr["CREATEPOSTID"].ToString(); detail.CREATEUSERID = dr["CREATEUSERID"] == DBNull.Value ? null : dr["CREATEUSERID"].ToString(); detail.CREATEUSERNAME = dr["CREATEUSERNAME"] == DBNull.Value ? null : dr["CREATEUSERNAME"].ToString(); detail.EDITCOMPANYID = dr["EDITCOMPANYID"] == DBNull.Value ? null : dr["EDITCOMPANYID"].ToString(); detail.EDITDATE = dr["EDITDATE"] == DBNull.Value ? null : (DateTime?)dr["EDITDATE"]; detail.EDITDEPARTMENTID = dr["EDITDEPARTMENTID"] == DBNull.Value ? null : dr["EDITDEPARTMENTID"].ToString(); detail.EDITPOSTID = dr["EDITPOSTID"] == DBNull.Value ? null : dr["EDITPOSTID"].ToString(); detail.EDITUSERID = dr["EDITUSERID"] == DBNull.Value ? null : dr["EDITUSERID"].ToString(); detail.EDITUSERNAME = dr["EDITUSERNAME"] == DBNull.Value ? null : dr["EDITUSERNAME"].ToString(); detail.FLAG = dr["FLAG"] == DBNull.Value ? null : dr["FLAG"].ToString(); detail.FLOW_FLOWRECORDMASTER_T.FLOWRECORDMASTERID = dr["FLOWRECORDMASTERID"].ToString(); detail.FLOWRECORDDETAILID = dr["FLOWRECORDDETAILID"] == DBNull.Value ? null : dr["FLOWRECORDDETAILID"].ToString(); detail.PARENTSTATEID = dr["PARENTSTATEID"] == DBNull.Value ? null : dr["PARENTSTATEID"].ToString(); detail.STATECODE = dr["STATECODE"] == DBNull.Value ? null : dr["STATECODE"].ToString(); detail.FLOW_CONSULTATION_T = new EntityCollection<FLOW_CONSULTATION_T>(); listDetail.Add(detail); listDetailID.Add("'" + detail.FLOWRECORDDETAILID + "'"); if (!listMasterID.Contains(detail.FLOW_FLOWRECORDMASTER_T.FLOWRECORDMASTERID)) { listMasterID.Add("'" + detail.FLOW_FLOWRECORDMASTER_T.FLOWRECORDMASTERID + "'"); } #endregion } dr.Close(); #region master if (listMasterID.Count > 0) { string sql= @"select CHECKSTATE,CREATECOMPANYID,CREATEDATE,CREATEDEPARTMENTID,CREATEPOSTID,CREATEUSERID,CREATEUSERNAME, EDITDATE,EDITUSERID,EDITUSERNAME,FLOWCODE,FLOWRECORDMASTERID,FLOWSELECTTYPE,FLOWTYPE,FORMID,INSTANCEID,MODELCODE from FLOW_FLOWRECORDMASTER_T where FLOWRECORDMASTERID in (" + string.Join(",", listMasterID.ToArray()) + ")"; dr = MsOracle.ExecuteReaderByTransaction(con, sql, null); while (dr.Read()) { #region master FLOW_FLOWRECORDMASTER_T master = new FLOW_FLOWRECORDMASTER_T(); //master.ACTIVEROLE = dr["ACTIVEROLE"] == DBNull.Value ? null : dr["ACTIVEROLE"].ToString(); //master.BUSINESSOBJECT = dr["BUSINESSOBJECT"] == DBNull.Value ? null : dr["BUSINESSOBJECT"].ToString(); master.CHECKSTATE = dr["CHECKSTATE"] == DBNull.Value ? null : dr["CHECKSTATE"].ToString(); master.CREATECOMPANYID = dr["CREATECOMPANYID"] == DBNull.Value ? null : dr["CREATECOMPANYID"].ToString(); master.CREATEDATE = (DateTime)dr["CREATEDATE"]; master.CREATEDEPARTMENTID = dr["CREATEDEPARTMENTID"] == DBNull.Value ? null : dr["CREATEDEPARTMENTID"].ToString(); master.CREATEPOSTID = dr["CREATEPOSTID"] == DBNull.Value ? null : dr["CREATEPOSTID"].ToString(); master.CREATEUSERID = dr["CREATEUSERID"] == DBNull.Value ? null : dr["CREATEUSERID"].ToString(); master.CREATEUSERNAME = dr["CREATEUSERNAME"] == DBNull.Value ? null : dr["CREATEUSERNAME"].ToString(); master.EDITDATE = dr["EDITDATE"] == DBNull.Value ? null : (DateTime?)dr["EDITDATE"]; master.EDITUSERID = dr["EDITUSERID"] == DBNull.Value ? null : dr["EDITUSERID"].ToString(); master.EDITUSERNAME = dr["EDITUSERNAME"] == DBNull.Value ? null : dr["EDITUSERNAME"].ToString(); master.FLOWCODE = dr["FLOWCODE"] == DBNull.Value ? null : dr["FLOWCODE"].ToString(); master.FLOWRECORDMASTERID = dr["FLOWRECORDMASTERID"].ToString(); master.FLOWSELECTTYPE = dr["FLOWSELECTTYPE"] == DBNull.Value ? null : dr["FLOWSELECTTYPE"].ToString(); master.FLOWTYPE = dr["FLOWTYPE"] == DBNull.Value ? null : dr["FLOWTYPE"].ToString(); master.FORMID = dr["FORMID"] == DBNull.Value ? null : dr["FORMID"].ToString(); master.INSTANCEID = dr["INSTANCEID"] == DBNull.Value ? null : dr["INSTANCEID"].ToString(); //master.KPITIMEXML = dr["KPITIMEXML"] == DBNull.Value ? null : dr["KPITIMEXML"].ToString(); master.MODELCODE = dr["MODELCODE"] == DBNull.Value ? null : dr["MODELCODE"].ToString(); master.FLOW_FLOWRECORDDETAIL_T = new EntityCollection<FLOW_FLOWRECORDDETAIL_T>(); listMaster.Add(master); #endregion } dr.Close(); } #endregion #region FLOW_CONSULTATION_T List<FLOW_CONSULTATION_T> listConsultation = new List<FLOW_CONSULTATION_T>(); if (!string.IsNullOrEmpty(FormID) && !string.IsNullOrEmpty(ModelCode)) { if (listDetailID.Count > 0) { string sql = @"select * from FLOW_CONSULTATION_T where FLOWRECORDDETAILID in (" + string.Join(",", listDetailID.ToArray()) + ")"; dr = MsOracle.ExecuteReaderByTransaction(con, sql, null); while (dr.Read()) { #region FLOW_CONSULTATION_T FLOW_CONSULTATION_T consul = new FLOW_CONSULTATION_T(); consul.CONSULTATIONCONTENT = dr["CONSULTATIONCONTENT"] == DBNull.Value ? null : dr["CONSULTATIONCONTENT"].ToString(); consul.CONSULTATIONDATE = dr["CONSULTATIONDATE"] == DBNull.Value ? null : (DateTime?)dr["CONSULTATIONDATE"]; consul.CONSULTATIONID = dr["CONSULTATIONID"] == DBNull.Value ? null : dr["CONSULTATIONID"].ToString(); consul.CONSULTATIONUSERID = dr["CONSULTATIONUSERID"] == DBNull.Value ? null : dr["CONSULTATIONUSERID"].ToString(); consul.CONSULTATIONUSERNAME = dr["CONSULTATIONUSERNAME"] == DBNull.Value ? null : dr["CONSULTATIONUSERNAME"].ToString(); consul.FLAG = dr["FLAG"] == DBNull.Value ? null : dr["FLAG"].ToString(); consul.FLOW_FLOWRECORDDETAIL_T = new FLOW_FLOWRECORDDETAIL_T(); consul.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID = dr["FLOWRECORDDETAILID"].ToString(); consul.REPLYCONTENT = dr["REPLYCONTENT"] == DBNull.Value ? null : dr["REPLYCONTENT"].ToString(); consul.REPLYDATE = dr["REPLYDATE"] == DBNull.Value ? null : (DateTime?)dr["REPLYDATE"]; consul.REPLYUSERID = dr["REPLYUSERID"] == DBNull.Value ? null : dr["REPLYUSERID"].ToString(); consul.REPLYUSERNAME = dr["REPLYUSERNAME"] == DBNull.Value ? null : dr["REPLYUSERNAME"].ToString(); listConsultation.Add(consul); #endregion } dr.Close(); } } #endregion listDetail.ForEach(detail => { #region FLOW_FLOWRECORDMASTER_T master = listMaster.FirstOrDefault(m => m.FLOWRECORDMASTERID == detail.FLOW_FLOWRECORDMASTER_T.FLOWRECORDMASTERID); detail.FLOW_FLOWRECORDMASTER_T = master; if (master.FLOW_FLOWRECORDDETAIL_T == null) { master.FLOW_FLOWRECORDDETAIL_T = new EntityCollection<FLOW_FLOWRECORDDETAIL_T>(); } master.FLOW_FLOWRECORDDETAIL_T.Add(detail); if (!string.IsNullOrEmpty(FormID) && !string.IsNullOrEmpty(ModelCode)) { IEnumerable<FLOW_CONSULTATION_T> iFLOW_CONSULTATION_T = listConsultation.Where(c => c.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID == detail.FLOWRECORDDETAILID); if (iFLOW_CONSULTATION_T.Count() > 0) { detail.FLOW_CONSULTATION_T = new EntityCollection<FLOW_CONSULTATION_T>(); foreach (var consultation in iFLOW_CONSULTATION_T) { consultation.FLOW_FLOWRECORDDETAIL_T = detail; detail.FLOW_CONSULTATION_T.Add(consultation); } } } #endregion }); return listDetail; } catch (Exception ex) { if (dr != null && !dr.IsClosed) { dr.Close(); } if (con.State == ConnectionState.Open) { con.Close(); } throw new Exception("FLOW_FLOWRECORDDETAIL_TDAL->GetFlowRecordV:-" + FormID + "-" + ex.Message + ex.InnerException); } }
public void ReplyConsultation(OracleConnection con, FLOW_CONSULTATION_T flowConsultation, SubmitData submitData) { if (strIsFlowEngine.ToLower() == "true") { try { FlowEngineService.EngineWcfGlobalFunctionClient FlowEngine = new FlowEngineService.EngineWcfGlobalFunctionClient(); //Byte[] Bo = System.Text.UTF8Encoding.UTF8.GetBytes(submitData.XML); //XElement xemeBoObject = XElement.Load(System.Xml.XmlReader.Create(new MemoryStream(Bo))); //string strSystemCode = (from item in xemeBoObject.Descendants("Name") select item).FirstOrDefault().Value; ModelInfo modelinfo = FlowBLL2.GetSysCodeByModelCode(con, submitData.ModelCode); FlowEngine.FlowConsultatiClose(modelinfo.SysCode, flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID, flowConsultation.REPLYUSERID); FlowBLL2 bll = new FlowBLL2(); bll.ReplyConsultation(con, flowConsultation); } catch (Exception ex) { Tracer.Debug("ReplyConsultation: -" + flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID + "-" + ex.InnerException + ex.Message); throw ex; } } }
public void ReplyConsultation(FLOW_CONSULTATION_T flowConsultation, SubmitData submitData) { OracleConnection con = ADOHelper.GetOracleConnection(); SMT.FlowWFService.NewFlow.Service s2 = new SMT.FlowWFService.NewFlow.Service(); s2.ReplyConsultation(con, flowConsultation, submitData); #region 旧代码 //if (strIsFlowEngine.ToLower() == "true") //{ // try // { // FlowEngineService.EngineWcfGlobalFunctionClient FlowEngine = new FlowEngineService.EngineWcfGlobalFunctionClient(); // //Byte[] Bo = System.Text.UTF8Encoding.UTF8.GetBytes(submitData.XML); // //XElement xemeBoObject = XElement.Load(System.Xml.XmlReader.Create(new MemoryStream(Bo))); // //string strSystemCode = (from item in xemeBoObject.Descendants("Name") select item).FirstOrDefault().Value; // ModelInfo modelinfo = FlowBLL.GetSysCodeByModelCode(submitData.ModelCode); // FlowEngine.FlowConsultatiClose(modelinfo.SysCode, flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID, flowConsultation.REPLYUSERID); // FlowBLL bll = new FlowBLL(); // bll.ReplyConsultation(flowConsultation); // } // catch (Exception ex) // { // Tracer.Debug("ReplyConsultation: -" + flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID + "-" + ex.InnerException + ex.Message); // throw ex; // } //} #endregion }
public void ReplyConsultation(FLOW_CONSULTATION_T flowConsultation) { FLOW_CONSULTATION_TDAL.Update(flowConsultation); //FLOWDAL.FLOW_CONSULTATION_TDAL dal = new FLOW_CONSULTATION_TDAL(); //dal.ReplyConsultation(flowConsultation); }
public void ReplyConsultation(OracleConnection con, FLOW_CONSULTATION_T flowConsultation, SubmitData submitData) { if (strIsFlowEngine.ToLower() == "true") { try { #region 记录日志 FLOW_CONSULTATION_T entity = flowConsultation; StringBuilder sb = new StringBuilder(); sb.AppendLine("FLOW_CONSULTATION_T entity= new FLOW_CONSULTATION_T();");// sb.AppendLine("entity.CONSULTATIONID = \"" + entity.CONSULTATIONID + "\";");// sb.AppendLine("entity.FLOWRECORDDETAILID = \"" + (entity.FLOW_FLOWRECORDDETAIL_T == null ? "" : entity.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID) + "\";"); sb.AppendLine("entity.CONSULTATIONUSERID = \"" + entity.CONSULTATIONUSERID + "\";"); sb.AppendLine("entity.CONSULTATIONUSERNAME = \"" + entity.CONSULTATIONUSERNAME + "\";"); sb.AppendLine("entity.CONSULTATIONCONTENT =\"" + entity.CONSULTATIONCONTENT + "\";"); sb.AppendLine("entity.CONSULTATIONDATE = \"" + entity.CONSULTATIONDATE + "\";"); sb.AppendLine("entity.REPLYUSERID = \"" + entity.REPLYUSERID + "\";"); sb.AppendLine("entity.REPLYUSERNAME = \"" + entity.REPLYUSERNAME + "\";"); sb.AppendLine("entity.REPLYCONTENT = \"" + entity.REPLYCONTENT + "\";"); sb.AppendLine("entity.REPLYDATE = \"" + entity.REPLYDATE + "\";"); sb.AppendLine("entity.FLAG = \"" + entity.FLAG + "\";");//0未回复,1回复 sb.AppendLine("FLOW_FLOWRECORDDETAIL_T model=new FLOW_FLOWRECORDDETAIL_T();"); sb.AppendLine(" model.FLOWRECORDDETAILID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID + "\";"); //sb.AppendLine(" model.FLOWRECORDMASTERID=\""+entity.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDMASTERID+"\";"); sb.AppendLine(" model.STATECODE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.STATECODE + "\";"); sb.AppendLine(" model.PARENTSTATEID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.PARENTSTATEID + "\";"); sb.AppendLine(" model.CONTENT=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CONTENT + "\";"); sb.AppendLine(" model.CHECKSTATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CHECKSTATE + "\";//同意:1,不同意:0 ,未处理:2,会签同意7,会签不同意8"); sb.AppendLine(" model.FLAG=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLAG + "\";//已审批:1,未审批:0"); sb.AppendLine(" model.CREATEUSERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATEUSERID + "\";"); sb.AppendLine(" model.CREATEUSERNAME=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATEUSERNAME + "\";"); sb.AppendLine(" model.CREATECOMPANYID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATECOMPANYID + "\";"); sb.AppendLine(" model.CREATEDEPARTMENTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATEDEPARTMENTID + "\";"); sb.AppendLine(" model.CREATEPOSTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATEPOSTID + "\";"); sb.AppendLine(" model.CREATEDATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.CREATEDATE + "\";"); sb.AppendLine(" model.EDITUSERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITUSERID + "\";"); sb.AppendLine(" model.EDITUSERNAME=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITUSERNAME + "\";"); sb.AppendLine(" model.EDITCOMPANYID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITCOMPANYID + "\";"); sb.AppendLine(" model.EDITDEPARTMENTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITDEPARTMENTID + "\";"); sb.AppendLine(" model.EDITPOSTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITPOSTID + "\";"); sb.AppendLine(" model.EDITDATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.EDITDATE + "\";"); sb.AppendLine(" model.AGENTUSERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.AGENTUSERID + "\";"); sb.AppendLine(" model.AGENTERNAME=\"" + entity.FLOW_FLOWRECORDDETAIL_T.AGENTERNAME + "\";"); sb.AppendLine(" model.AGENTEDITDATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.AGENTEDITDATE + "\";"); sb.AppendLine(" entity.FLOW_FLOWRECORDDETAIL_T = model;"); sb.AppendLine("FLOW_FLOWRECORDMASTER_T eentity=new FLOW_FLOWRECORDMASTER_T();"); sb.AppendLine(" eentity.FLOWRECORDMASTERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FLOWRECORDMASTERID + "\";"); sb.AppendLine(" eentity.INSTANCEID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.INSTANCEID + "\";"); sb.AppendLine(" eentity.FLOWSELECTTYPE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FLOWSELECTTYPE + "\";//0:固定流程,1:自选流程"); sb.AppendLine(" eentity.MODELCODE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.MODELCODE + "\";"); sb.AppendLine(" eentity.FLOWCODE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FLOWCODE + "\";"); sb.AppendLine(" eentity.FORMID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID + "\";"); sb.AppendLine(" eentity.FLOWTYPE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FLOWTYPE + "\";//0:审批流程,1:任务流程"); sb.AppendLine(" eentity.CHECKSTATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CHECKSTATE + "\";//1:审批中,2:审批通过,3审批不通过,5撤销(为与字典保持一致)"); sb.AppendLine(" eentity.CREATEUSERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATEUSERID + "\";"); sb.AppendLine(" eentity.CREATEUSERNAME=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATEUSERNAME + "\";"); sb.AppendLine(" eentity.CREATECOMPANYID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATECOMPANYID + "\";"); sb.AppendLine(" eentity.CREATEDEPARTMENTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATEDEPARTMENTID + "\";"); sb.AppendLine(" eentity.CREATEPOSTID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATEPOSTID + "\";"); sb.AppendLine(" eentity.CREATEDATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.CREATEDATE + "\";"); sb.AppendLine(" eentity.EDITUSERID=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.EDITUSERID + "\";"); sb.AppendLine(" eentity.EDITUSERNAME=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.EDITUSERNAME + "\";"); sb.AppendLine(" eentity.EDITDATE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.EDITDATE + "\";"); sb.AppendLine(" eentity.ACTIVEROLE=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.ACTIVEROLE + "\";"); sb.AppendLine(" eentity.BUSINESSOBJECT=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.BUSINESSOBJECT + "\";"); sb.AppendLine(" eentity.KPITIMEXML=\"" + entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.KPITIMEXML + "\";"); sb.AppendLine(" entity.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T = eentity;"); LogHelper.WriteLog("流程引擎的XML数据", "SubimtFlow入口处 回复咨询信息: FormID=" + submitData.FormID + ";ModelCode=" + submitData.ModelCode + " \r\n FLOW_CONSULTATION_T 实体:\r\n" + sb.ToString()); WriteSubmitDate(submitData); #endregion //FlowEngineService.EngineWcfGlobalFunctionClient FlowEngine = new FlowEngineService.EngineWcfGlobalFunctionClient(); EnginFlowBLL FlowEngine = new EnginFlowBLL(); //Byte[] Bo = System.Text.UTF8Encoding.UTF8.GetBytes(submitData.XML); //XElement xemeBoObject = XElement.Load(System.Xml.XmlReader.Create(new MemoryStream(Bo))); //string strSystemCode = (from item in xemeBoObject.Descendants("Name") select item).FirstOrDefault().Value; ModelInfo modelinfo = FlowBLL.GetSysCodeByModelCode(con, submitData.ModelCode); // FlowEngine.FlowConsultatiClose(modelinfo.SysCode, flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID, flowConsultation.REPLYUSERID); FlowEngine.FlowConsultatiClose(con, modelinfo.SysCode, flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID, flowConsultation.REPLYUSERID); FlowBLL bll = new FlowBLL(); bll.ReplyConsultation(con, flowConsultation); } catch (Exception ex) { LogHelper.WriteLog("回复咨询出错,异常信息: FORMID=" + flowConsultation.FLOW_FLOWRECORDDETAIL_T.FLOW_FLOWRECORDMASTER_T.FORMID + "异常信息:\r\n" + ex.InnerException + ex.Message); throw ex; } } }
public void ReplyConsultation(OracleConnection con, FLOW_CONSULTATION_T flowConsultation) { FLOW_CONSULTATION_TDAL.Update(con, flowConsultation); //FLOWDAL.FLOW_CONSULTATION_TDAL dal = new FLOW_CONSULTATION_TDAL(); //dal.ReplyConsultation(flowConsultation); }
// OracleConnection con = ADOHelper.GetOracleConnection(); #region 咨询 public void AddConsultation(OracleConnection con, FLOW_CONSULTATION_T flowConsultation) { FLOW_CONSULTATION_TDAL.Add(con, flowConsultation); //FLOWDAL.FLOW_CONSULTATION_TDAL dal = new FLOW_CONSULTATION_TDAL(); //dal.AddConsultation(flowConsultation); }
public void AddConsultation(FLOW_CONSULTATION_T flowConsultation) { FLOW_CONSULTATION_TDAL.Add(flowConsultation); //FLOWDAL.FLOW_CONSULTATION_TDAL dal = new FLOW_CONSULTATION_TDAL(); //dal.AddConsultation(flowConsultation); }