예제 #1
0
        public void AddConsultation(FLOW_CONSULTATION_T flowConsultation, SubmitData submitData)
        {
            //OracleConnection con = ADOHelper.GetOracleConnection();
            SMT.FlowWFService.NewFlow.FlowService s2 = new SMT.FlowWFService.NewFlow.FlowService();
            s2.AddConsultation(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
        }
예제 #2
0
        /// <summary>
        ///  更新: [咨询]
        /// </summary>
        /// <param name="model">FLOW_CONSULTATION_T</param>
        /// <returns></returns>
        public static int Update(FLOW_CONSULTATION_T model)
        {
            try
            {
                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";
                Parameter[] pageparm =
                {
                    new Parameter(":CONSULTATIONID",OracleType.NVarChar),
                    new Parameter(":FLOWRECORDDETAILID",OracleType.NVarChar),
                    new Parameter(":CONSULTATIONUSERID",OracleType.NVarChar),
                    new Parameter(":CONSULTATIONUSERNAME",OracleType.NVarChar),
                    new Parameter(":CONSULTATIONCONTENT",OracleType.NVarChar),
                    new Parameter(":CONSULTATIONDATE",OracleType.DateTime),
                    new Parameter(":REPLYUSERID",OracleType.NVarChar),
                    new Parameter(":REPLYUSERNAME",OracleType.NVarChar),
                    new Parameter(":REPLYCONTENT",OracleType.NVarChar),
                    new Parameter(":REPLYDATE",OracleType.DateTime),
                    new Parameter(":FLAG",OracleType.NVarChar)

                };
                pageparm[0].ParameterValue = GetValue(model.CONSULTATIONID);//
                pageparm[1].ParameterValue = GetValue(model.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID);//
                pageparm[2].ParameterValue = GetValue(model.CONSULTATIONUSERID);//
                pageparm[3].ParameterValue = GetValue(model.CONSULTATIONUSERNAME);//
                pageparm[4].ParameterValue = GetValue(model.CONSULTATIONCONTENT);//
                pageparm[5].ParameterValue = GetValue(model.CONSULTATIONDATE);//
                pageparm[6].ParameterValue = GetValue(model.REPLYUSERID);//
                pageparm[7].ParameterValue = GetValue(model.REPLYUSERNAME);//
                pageparm[8].ParameterValue = GetValue(model.REPLYCONTENT);//
                pageparm[9].ParameterValue = GetValue(model.REPLYDATE);//
                pageparm[10].ParameterValue = GetValue(model.FLAG);//0未回复,1回复

                return dao.ExecuteNonQuery(updSql, pageparm);
            }
            catch (Exception ex)
            {
                throw new Exception("FLOW_CONSULTATION_TDAL_Update:" + ex.Message);
            }
        }
예제 #3
0
        /// <summary>
        /// 新增[咨询]
        /// </summary>
        /// <param name="con">//OracleConnection</param>
        /// <param name="model">FLOW_CONSULTATION_T</param>
        /// <returns></returns>
        public static int Add(FLOW_CONSULTATION_T model)
        {
            try
            {
                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)";
                Parameter[] pageparm =
                {
                    new Parameter(":CONSULTATIONID",OracleType.NVarChar),
                    new Parameter(":FLOWRECORDDETAILID",OracleType.NVarChar),
                    new Parameter(":CONSULTATIONUSERID",OracleType.NVarChar),
                    new Parameter(":CONSULTATIONUSERNAME",OracleType.NVarChar),
                    new Parameter(":CONSULTATIONCONTENT",OracleType.NVarChar),
                    new Parameter(":CONSULTATIONDATE",OracleType.DateTime),
                    new Parameter(":REPLYUSERID",OracleType.NVarChar),
                    new Parameter(":REPLYUSERNAME",OracleType.NVarChar),
                    new Parameter(":REPLYCONTENT",OracleType.NVarChar),
                    new Parameter(":REPLYDATE",OracleType.DateTime),
                    new Parameter(":FLAG",OracleType.NVarChar)

                };
                pageparm[0].ParameterValue = GetValue(model.CONSULTATIONID);//
                pageparm[1].ParameterValue = GetValue(model.FLOW_FLOWRECORDDETAIL_T.FLOWRECORDDETAILID);//
                pageparm[2].ParameterValue = GetValue(model.CONSULTATIONUSERID);//
                pageparm[3].ParameterValue = GetValue(model.CONSULTATIONUSERNAME);//
                pageparm[4].ParameterValue = GetValue(model.CONSULTATIONCONTENT);//
                pageparm[5].ParameterValue = GetValue(model.CONSULTATIONDATE);//
                pageparm[6].ParameterValue = GetValue(model.REPLYUSERID);//
                pageparm[7].ParameterValue = GetValue(model.REPLYUSERNAME);//
                pageparm[8].ParameterValue = GetValue(model.REPLYCONTENT);//
                pageparm[9].ParameterValue = GetValue(model.REPLYDATE);//
                pageparm[10].ParameterValue = GetValue(model.FLAG);//0未回复,1回复

                return dao.ExecuteNonQuery(insSql, pageparm);
            }
            catch (Exception ex)
            {
                throw new Exception("FLOW_CONSULTATION_TDAL_Add:" + ex.Message);
            }
        }
        /// <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(string FormID, string FlowGUID, string CheckState, string Flag, string ModelCode, string CompanyID, string EditUserID, List<string> FlowType)
        {
            #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>();

                IDataReader 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 = dao.ExecuteReader(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 = dao.ExecuteReader(sql);
                        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 = dao.ExecuteReader(sql);
                            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();
                    }
                    throw new Exception("FLOW_FLOWRECORDDETAIL_TDAL->GetFlowRecordV:-" + FormID + "-" + ex.Message + ex.InnerException);
                }
        }
예제 #5
0
 public void AddConsultation( FLOW_CONSULTATION_T flowConsultation)
 {
     FLOW_CONSULTATION_TDAL.Add( flowConsultation);
     //FLOWDAL.FLOW_CONSULTATION_TDAL dal = new FLOW_CONSULTATION_TDAL();
     //dal.AddConsultation(flowConsultation);
 }
예제 #6
0
 public void ReplyConsultation( FLOW_CONSULTATION_T flowConsultation)
 {
     FLOW_CONSULTATION_TDAL.Update( flowConsultation);
     //FLOWDAL.FLOW_CONSULTATION_TDAL dal = new FLOW_CONSULTATION_TDAL();
     //dal.ReplyConsultation(flowConsultation);
 }
예제 #7
0
        public void ReplyConsultation(FLOW_CONSULTATION_T flowConsultation, SubmitData submitData)
        {
            //OracleConnection con = ADOHelper.GetOracleConnection();
            SMT.FlowWFService.NewFlow.FlowService s2 = new SMT.FlowWFService.NewFlow.FlowService();
            s2.ReplyConsultation( 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
        }