当前位置: 首页>>代码示例>>C#>>正文


C# DataConnection.DisConnect方法代码示例

本文整理汇总了C#中CDMISrestful.CommonLibrary.DataConnection.DisConnect方法的典型用法代码示例。如果您正苦于以下问题:C# DataConnection.DisConnect方法的具体用法?C# DataConnection.DisConnect怎么用?C# DataConnection.DisConnect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDMISrestful.CommonLibrary.DataConnection的用法示例。


在下文中一共展示了DataConnection.DisConnect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetNo

        //GetNo 自动编号 CSQ 20151010
        public string GetNo(DataConnection pclsCache, int NumberingType, string TargetDate)
        {
            string number = "";
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return number;

                }
                number = Cm.MstNumbering.GetNo(pclsCache.CacheConnectionObject, NumberingType, TargetDate);
                return number;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "获取编号失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstNumbering.GetNo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return number;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
开发者ID:BME319,项目名称:CDMISrestful,代码行数:26,代码来源:CommonMethod.cs

示例2: GetLatestSMS

 /// <summary>
 /// 获取最新一条消息 GL 2015-10-10
 /// </summary>
 /// <param name="DoctorId"></param>
 /// <param name="PatientId"></param>
 /// <returns></returns>
 public Message GetLatestSMS(DataConnection pclsCache, string DoctorId, string PatientId)
 {
     try
     {
         Message Meg = new Message();
         if (!pclsCache.Connect())
         {
             return null;
         }
         InterSystems.Data.CacheTypes.CacheSysList list = null;
         list = Mb.MessageRecord.GetLatestSMS(pclsCache.CacheConnectionObject, DoctorId, PatientId);
         if (list != null)
         {
             Meg.MessageNo = list[0];
             Meg.Content = list[1];
             Meg.SendDateTime = list[2];
             Meg.SendByName = list[3];
             Meg.Flag = list[4];
         }
         return Meg;
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "MessageMethod.GetLatestSMS", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return null;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
开发者ID:wfguanhan,项目名称:CDMISrestful,代码行数:37,代码来源:MessageMethod.cs

示例3: ChangePassword

        //ChangePassword ZAM 2014-12-01 //WF 20151010
        public int ChangePassword(DataConnection pclsCache, string UserId, string OldPassword, string newPassword, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            int ret = 0;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return ret;

                }
                ret = (int)Cm.MstUser.ChangePassword(pclsCache.CacheConnectionObject, UserId, OldPassword, newPassword, revUserId, TerminalName, TerminalIP, DeviceType);
                return ret;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失败!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstUser.ChangePassword", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return ret;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
开发者ID:BME319,项目名称:CDMISrestful,代码行数:26,代码来源:UsersMethod.cs

示例4: PsTreatmentIndicatorsSetData

        /// <summary>
        /// Ps.TreatmentIndicators.SetData GL 2015-10-10
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="SortNo"></param>
        /// <param name="AssessmentType"></param>
        /// <param name="AssessmentName"></param>
        /// <param name="AssessmentTime"></param>
        /// <param name="Result"></param>
        /// <param name="revUserId"></param>
        /// <param name="TerminalName"></param>
        /// <param name="TerminalIP"></param>
        /// <param name="DeviceType"></param>
        /// <returns></returns>
        public int PsTreatmentIndicatorsSetData(DataConnection pclsCache, string UserId, int SortNo, string AssessmentType, string AssessmentName, DateTime AssessmentTime, string Result, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            int ret = 2;
            try
            {
                if (!pclsCache.Connect())
                {
                    return ret;
                }
                ret = (int)Ps.TreatmentIndicators.SetData(pclsCache.CacheConnectionObject, UserId, SortNo, AssessmentType, AssessmentName, AssessmentTime, Result, revUserId, TerminalName, TerminalIP, DeviceType);
                //if(ret == 1)
                //{
                //    int Ass = 0;
                //    string Amt = "";
                //    Amt = Ps.DoctorInfoDetail.GetValue(pclsCache.CacheConnectionObject, revUserId, "Score", "AssessmentNum", 1);
                //    if(Amt != null)
                //    {
                //        Ass = Convert.ToInt32(Amt);
                //        Ass++;
                //    }
                //    ret = (int)Ps.DoctorInfoDetail.SetData(pclsCache.CacheConnectionObject, revUserId, "Score", "AssessmentNum", 1, Convert.ToString(Ass), "", 1, revUserId, TerminalName, TerminalIP, DeviceType);

                //}
                return ret;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "RiskInfoMethod.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return 2;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
开发者ID:syfbme,项目名称:CDMISrestful,代码行数:49,代码来源:RiskInfoMethod.cs

示例5: Remove

        //private List<CmMstInfoItem> CmMstInfoItemList = new List<CmMstInfoItem>();
     

        //public IEnumerable<CmMstInfoItem> GetAll()
        //{
        //    List<CmMstInfoItem> CmMstInfoItemList = new List<CmMstInfoItem>();
        //    GetCmMstInfoItem(CmMstInfoItemList);
        //    return CmMstInfoItemList;
        //}

        //public CmMstInfoItem Get(string CategoryCode, string Code, int StartDate)
        //{
        //    List<CmMstInfoItem> CmMstInfoItemList = new List<CmMstInfoItem>();
        //    GetCmMstInfoItem(CmMstInfoItemList);
        //    return CmMstInfoItemList.Find(p => p.CategoryCode == CategoryCode && p.Code == Code && p.StartDate == StartDate);
        //}

        public int Remove(DataConnection pclsCache, string CategoryCode, string Code, int StartDate)
        {
             int ret = 3;
             try
             {
                 if (!pclsCache.Connect())
                 {
                     //MessageBox.Show("Cache数据库连接失败");
                     return ret;

                 }
                 ret = (int)Cm.MstInfoItem.DeleteData(pclsCache.CacheConnectionObject, CategoryCode, Code);
                 return ret;
             }
             catch (Exception ex)
             {
                 //MessageBox.Show(ex.ToString(), "保存失败!");
                 HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstInfoItem.DeleteData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                 return ret;
             }
             finally
             {
                 pclsCache.DisConnect();
             }
        }
开发者ID:syfbme,项目名称:CDMISrestful,代码行数:42,代码来源:CmMstInfoItemRepository.cs

示例6: GetLatestVitalSignsByDate

 /// <summary>
 /// 获取患者某项生理参数的RecordDate前的最近一条数据 GL 2015-10-10
 /// </summary>
 /// <param name="UserId"></param>
 /// <param name="ItemType"></param>
 /// <param name="ItemCode"></param>
 /// <param name="RecordDate"></param>
 /// <returns></returns>
 public VitalInfo GetLatestVitalSignsByDate(DataConnection pclsCache,string UserId, string ItemType, string ItemCode, int RecordDate)
 {
     try
     {
         VitalInfo item = new VitalInfo();
         InterSystems.Data.CacheTypes.CacheSysList list = null;
         list = Ps.VitalSigns.GetLatestVitalSignsByDate(pclsCache.CacheConnectionObject, UserId, ItemType, ItemCode, RecordDate);
         if (list != null)
         {
             item.RecordDate = list[0];
             item.RecordTime = list[1];
             item.Value = list[2];
             item.Unit = list[3];
         }
         return item;
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "VitalInfoMethod.GetLatestSMS", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return null;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
开发者ID:BME319,项目名称:CDMISrestful,代码行数:34,代码来源:VitalInfoMethod.cs

示例7: GetAllSignsByPeriod

        //输出一段时间中记录的所有体征信息
        public List<VitalInfo> GetAllSignsByPeriod(DataConnection pclsCache, string UserId, int StartDate, int EndDate)
        {
            {
                List<VitalInfo> items = new List<VitalInfo>();
                CacheCommand cmd = null;
                CacheDataReader cdr = null;
                try
                {
                    if (!pclsCache.Connect())
                    {
                        return null;
                    }
                    cmd = new CacheCommand();
                    cmd = Ps.VitalSigns.GetAllSignsByPeriod(pclsCache.CacheConnectionObject);
                    cmd.Parameters.Add("UserId", CacheDbType.NVarChar).Value = UserId;
                    cmd.Parameters.Add("StartDate", CacheDbType.NVarChar).Value = StartDate;
                    cmd.Parameters.Add("EndDate", CacheDbType.NVarChar).Value = EndDate;

                    cdr = cmd.ExecuteReader();
                    while (cdr.Read())
                    {
                        VitalInfo item = new VitalInfo();
                        item.RecordDate = cdr["RecordDate"].ToString();
                        item.RecordTime = cdr["RecordTime"].ToString();
                        item.ItemType   = cdr["ItemType"].ToString();
                        item.ItemCode   = cdr["ItemCode"].ToString();
                        item.Value      = cdr["Value"].ToString();
                        item.Unit       = cdr["Unit"].ToString();
                        item.Name = cdr["VitalName"].ToString();
                        items.Add(item);
                    }
                    return items;
                }
                catch (Exception ex)
                {
                    HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "VitalInfoMethod.GetAllSignsByPeriod", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                    return null;
                }
                finally
                {
                    if ((cdr != null))
                    {
                        cdr.Close();
                        cdr.Dispose(true);
                        cdr = null;
                    }
                    if ((cmd != null))
                    {
                        cmd.Parameters.Clear();
                        cmd.Dispose();
                        cmd = null;
                    }
                    pclsCache.DisConnect();
                }
            }
        }
开发者ID:wfguanhan,项目名称:CDMISrestful,代码行数:57,代码来源:VitalInfoMethod.cs

示例8: GetModulesByPID

        /// <summary>
        /// GetModulesByPID LS 2014-12-4 //SYF20151109
        /// </summary>
        /// <param name="pclsCache"></param>
        /// <param name="PatientId"></param>
        /// <returns></returns>
        public List<ModulesByPID> GetModulesByPID(DataConnection pclsCache, string PatientId)
        {
            List<ModulesByPID> list = new List<ModulesByPID>();

            CacheCommand cmd = null;
            CacheDataReader cdr = null;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return null;
                }

                cmd = new CacheCommand();
                cmd = Ps.BasicInfoDetail.GetModulesByPID(pclsCache.CacheConnectionObject);
                cmd.Parameters.Add("PatientId", CacheDbType.NVarChar).Value = PatientId;
                cdr = cmd.ExecuteReader();
                while (cdr.Read())
                {
                    ModulesByPID NewLine = new ModulesByPID();
                    NewLine.CategoryCode = cdr["CategoryCode"].ToString();
                    NewLine.Modules = cdr["Modules"].ToString();
                    list.Add(NewLine);
                }
                return list;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UsersMethod.GetModulesByPID", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                if ((cdr != null))
                {
                    cdr.Close();
                    cdr.Dispose(true);
                    cdr = null;
                }

                if ((cmd != null))
                {
                    cmd.Parameters.Clear();
                    cmd.Dispose();
                    cmd = null;
                }
                pclsCache.DisConnect();
            }
        }
开发者ID:syfbme,项目名称:CDMISrestful,代码行数:57,代码来源:UsersMethod.cs

示例9: GetSMSDialogue

        /// <summary>
        /// 获取消息对话 GL 2015-10-10
        /// </summary>
        /// <param name="Reciever"></param>
        /// <param name="SendBy"></param>
        /// <returns></returns>
        public List<Message> GetSMSDialogue(DataConnection pclsCache, string Reciever, string SendBy)
        {
            List<Message> items = new List<Message>();
            CacheCommand cmd = null;
            CacheDataReader cdr = null;
            try
            {
                if (!pclsCache.Connect())
                {
                    return null;
                }
                cmd = Mb.MessageRecord.GetSMSDialogue(pclsCache.CacheConnectionObject);
                cmd.Parameters.Add("Reciever", CacheDbType.NVarChar).Value = Reciever;
                cmd.Parameters.Add("SendBy", CacheDbType.NVarChar).Value = SendBy;
                cdr = cmd.ExecuteReader();
                while (cdr.Read())
                {
                    Message item = new Message();
                    item.Time = cdr["Time"].ToString();
                    item.Content = cdr["Content"].ToString();
                    item.IDFlag = cdr["IDFlag"].ToString();
                    item.SendDateTime = cdr["SendDateTime"].ToString().Replace("-","/");
                    items.Add(item);
                }
                return items;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "MessageMethod.GetSMSDialogue", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {

                if ((cdr != null))
                {
                    cdr.Close();
                    cdr.Dispose(true);
                    cdr = null;
                }
                if ((cmd != null))
                {
                    cmd.Parameters.Clear();
                    cmd.Dispose();
                    cmd = null;
                }
                pclsCache.DisConnect();
            }
        }
开发者ID:syfbme,项目名称:CDMISrestful,代码行数:55,代码来源:MessageMethod.cs

示例10: CmMstTypeGetTypeList

        /// <summary>
        /// 获取某个分类的类别 CSQ 20151010
        /// </summary>
        /// <param name="pclsCache"></param>
        /// <param name="Category"></param>
        /// <returns></returns>
        public List<TypeAndName> CmMstTypeGetTypeList(DataConnection pclsCache, string Category)
        {
            List<TypeAndName> list = new List<TypeAndName>();

            CacheCommand cmd = null;
            CacheDataReader cdr = null;

            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache数据库连接失败");
                    return null;
                }

                cmd = new CacheCommand();
                cmd = Cm.MstType.GetTypeList(pclsCache.CacheConnectionObject);
                cmd.Parameters.Add("Category", CacheDbType.NVarChar).Value = Category;

                cdr = cmd.ExecuteReader();
                while (cdr.Read())
                {
                    list.Add(new TypeAndName { Type = cdr["Type"].ToString(), Name = cdr["Name"].ToString() });
                }
                return list;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "DictMethod.GetTypeList", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                if ((cdr != null))
                {
                    cdr.Close();
                    cdr.Dispose(true);
                    cdr = null;
                }

                if ((cmd != null))
                {
                    cmd.Parameters.Clear();
                    cmd.Dispose();
                    cmd = null;
                }
                pclsCache.DisConnect();
            }
        }
开发者ID:syfbme,项目名称:CDMISrestful,代码行数:55,代码来源:DictMethod.cs

示例11: PsParametersSetData

 public int PsParametersSetData(DataConnection pclsCache, string Indicators, string Id, string Name, string Value, string Unit,  string revUserId, string TerminalName, string TerminalIP, int DeviceType)
 {
     int ret = 2;
     try
     {
         if (!pclsCache.Connect())
         {
             return ret;
         }
         ret = (int)Ps.Parameters.SetData(pclsCache.CacheConnectionObject, Indicators, Id, Name, Value, Unit, revUserId, TerminalName, TerminalIP, DeviceType);
         return ret;
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "RiskInfoMethod.PsParametersSetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return 2;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
开发者ID:syfbme,项目名称:CDMISrestful,代码行数:22,代码来源:RiskInfoMethod.cs

示例12: DeteteTask

 public int DeteteTask(DataConnection pclsCache, string Plan, string Type, string Code, string SortNo)
 {
     int ret = 0;
     try
     {
         if (!pclsCache.Connect())
         {
             return ret;
         }
         ret = (int)Ps.Task.Delete(pclsCache.CacheConnectionObject, Plan, Type, Code, SortNo);
         return ret;
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PlanInfoMethod.DeteteTask", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return ret;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
开发者ID:wfguanhan,项目名称:CDMISrestful,代码行数:22,代码来源:PlanInfoMethod.cs

示例13: PsBasicInfoDetailSetData

 /// <summary>
 /// SetData LY 2015-10-10 
 /// </summary>
 /// <param name="pclsCache"></param>
 /// <param name="Patient"></param>
 /// <param name="CategoryCode"></param>
 /// <param name="ItemCode"></param>
 /// <param name="ItemSeq"></param>
 /// <param name="Value"></param>
 /// <param name="Description"></param>
 /// <param name="SortNo"></param>
 /// <param name="revUserId"></param>
 /// <param name="TerminalName"></param>
 /// <param name="TerminalIP"></param>
 /// <param name="DeviceType"></param>
 /// <returns></returns>
 public int PsBasicInfoDetailSetData(DataConnection pclsCache, string Patient, string CategoryCode, string ItemCode, int ItemSeq, string Value, string Description, int SortNo, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
 {
     int ret = 2;
     try
     {
         if (!pclsCache.Connect())
         {
             return ret;
         }
         ret = (int)Ps.BasicInfoDetail.SetData(pclsCache.CacheConnectionObject, Patient, CategoryCode, ItemCode, ItemSeq, Value, Description, SortNo, revUserId, TerminalName, TerminalIP, DeviceType);
         return ret;
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "ModuleInfoMethod.PsBasicInfoDetailSetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return ret;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
开发者ID:syfbme,项目名称:CDMISrestful,代码行数:38,代码来源:ModuleInfoMethod.cs

示例14: PsBasicInfoDetailGetValue

 /// <summary>
 ///  获取需要知道的项目的值 LY 2015-10-10
 /// </summary>
 /// <param name="pclsCache"></param>
 /// <param name="UserId"></param>
 /// <param name="CategoryCode"></param>
 /// <param name="ItemCode"></param>
 /// <param name="ItemSeq"></param>
 /// <returns></returns>
 public string PsBasicInfoDetailGetValue(DataConnection pclsCache, string UserId, string CategoryCode, string ItemCode, int ItemSeq)
 {
     string ret = "";
     try
     {
         if (!pclsCache.Connect())
         {
             return ret;
         }
         ret = (string)Ps.BasicInfoDetail.GetValue(pclsCache.CacheConnectionObject, UserId, CategoryCode, ItemCode, ItemSeq);
         return ret;
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "ModuleInfoMethod.PsBasicInfoDetailGetValue", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return ret;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
开发者ID:syfbme,项目名称:CDMISrestful,代码行数:31,代码来源:ModuleInfoMethod.cs

示例15: SetData

        //DataConnection pclsCache = new DataConnection();

        #region < "Ps.VitalSigns" >
        /// <summary>
        /// Ps.VitalSigns.SetData GL 2015-10-10
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="RecordDate"></param>
        /// <param name="RecordTime"></param>
        /// <param name="ItemType"></param>
        /// <param name="ItemCode"></param>
        /// <param name="Value"></param>
        /// <param name="Unit"></param>
        /// <param name="revUserId"></param>
        /// <param name="TerminalName"></param>
        /// <param name="TerminalIP"></param>
        /// <param name="DeviceType"></param>
        /// <returns></returns>
        public int SetData(DataConnection pclsCache, string UserId, int RecordDate, int RecordTime, string ItemType, string ItemCode, string Value, string Unit, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            int ret = 2;
            try
            {
                if (!pclsCache.Connect())
                {
                    return ret;
                }
                ret = (int)Ps.VitalSigns.SetData(pclsCache.CacheConnectionObject, UserId, RecordDate, RecordTime, ItemType, ItemCode, Value, Unit, revUserId, TerminalName, TerminalIP, DeviceType);
                return ret;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "VitalInfoMethod.SetData", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return 2;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
开发者ID:syfbme,项目名称:CDMISrestful,代码行数:40,代码来源:VitalInfoMethod.cs


注:本文中的CDMISrestful.CommonLibrary.DataConnection.DisConnect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。