當前位置: 首頁>>代碼示例>>C#>>正文


C# DataConnection.DisConnect方法代碼示例

本文整理匯總了C#中WebService.CommonLibrary.DataConnection.DisConnect方法的典型用法代碼示例。如果您正苦於以下問題:C# DataConnection.DisConnect方法的具體用法?C# DataConnection.DisConnect怎麽用?C# DataConnection.DisConnect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WebService.CommonLibrary.DataConnection的用法示例。


在下文中一共展示了DataConnection.DisConnect方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SetData

        //SetData WY 2015-07-09
        public static bool SetData(DataConnection pclsCache, string HospitalCode, string DrugCode, string DrugName, string DrugSpec, string Units, string InputCode, string Description, int Status, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            bool IsSaved = false;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return IsSaved;

                }
                int flag = (int)Tmp.DrugDict.SetData(pclsCache.CacheConnectionObject, HospitalCode, DrugCode, DrugName, DrugSpec, Units, InputCode, Description, Status, revUserId, TerminalName, TerminalIP, DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return IsSaved;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Tmp.DrugDict.SetData", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return IsSaved;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:30,代碼來源:TmpDrugDict.cs

示例2: SetData

        //SetData TDY 2014-12-1 WF 2015-07-07
        public static bool SetData(DataConnection pclsCache, int piType, string piCode, string piTypeName, string piName, string piInputCode, string piDescription, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            bool IsSaved = false;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return IsSaved;

                }
                int flag = (int)Cm.MstDivision.SetData(pclsCache.CacheConnectionObject, piType, piCode,  piTypeName, piName, piInputCode, piDescription, revUserId, TerminalName, TerminalIP, DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return IsSaved;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstDivision.SetData", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return IsSaved;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:30,代碼來源:CmMstDivision.cs

示例3: DeleteData

        //DeleteData YDS 2014-12-01
        public static int DeleteData(DataConnection pclsCache, string AlertItemCode)
        {
            int ret = 0;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return ret;

                }
                ret = (int)Wn.MstBasicAlert.DeleteData(pclsCache.CacheConnectionObject, AlertItemCode);
                return ret;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "刪除失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "WnMstBasicAlert.DeleteData", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return ret;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:26,代碼來源:WnMstBasicAlert.cs

示例4: SetData

        //SetData WF 2014-12-2 
        public static bool SetData(DataConnection pclsCache, string CategoryCode, string Code, string Name, string ParentCode, int SortNo, int StartDate, int EndDate, int GroupHeaderFlag, string ControlType, string OptionCategory, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            bool IsSaved = false;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return IsSaved;

                }
                int flag = (int)Cm.MstInfoItem.SetData(pclsCache.CacheConnectionObject, CategoryCode, Code, Name, ParentCode, SortNo, StartDate, EndDate, GroupHeaderFlag, ControlType, OptionCategory, revUserId, TerminalName, TerminalIP, DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return IsSaved;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstInfoItem.SetData", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return IsSaved;
            }
            finally
            {
                pclsCache.DisConnect();
            }


        }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:32,代碼來源:CmMstInfoItem.cs

示例5: GetMaxSortNo

        //GetMaxSortNo SYF 2015-07-06 
        public static int GetMaxSortNo(DataConnection pclsCache, string UserId)
        {
            int ret = 0;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return ret;

                }
                ret = (int)Ps.TreatmentIndicators.GetMaxSortNo(pclsCache.CacheConnectionObject, UserId);
                return ret;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsTreatmentIndicators.GetMaxSortNo", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return ret;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:26,代碼來源:PsTreatmentIndicators.cs

示例6: SetData

        //SetData YDS 2014-12-01 ZAM 更新ModuleType類型int改為string 與2014-12-08
        public static bool SetData(DataConnection pclsCache, string ModuleType, string PatientId, string DoctorId, int Level, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            bool IsSaved = false;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return IsSaved;

                }
                int flag = (int)Ps.SpecialList.SetData(pclsCache.CacheConnectionObject, ModuleType, PatientId, DoctorId, Level, revUserId, TerminalName, TerminalIP, DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return IsSaved;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsSpecialList.SetData", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return IsSaved;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:30,代碼來源:PsSpecialList.cs

示例7: CheckDoctorPhoneNumber

        //CheckDoctorPhoneNumber TDY 2015-1-14
        public static int CheckDoctorPhoneNumber(DataConnection pclsCache, string UserId, string piPhoneNumber)
        {
            int ret = 0;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return ret;

                }
                ret = (int)Ps.DoctorInfoDetail.CheckDoctorPhoneNumber(pclsCache.CacheConnectionObject, UserId, piPhoneNumber);
                return ret;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsDoctorInfoDetail.CheckDoctorPhoneNumber", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return ret;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
開發者ID:wf19920502,項目名稱:WebService,代碼行數:26,代碼來源:PsDoctorInfoDetail.cs

示例8: GetCategoryName

        //GetCategoryName WF 2014-12-2 
        public static string GetCategoryName(DataConnection pclsCache,string Code)
        {
            string ret = null;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return ret;

                }
                ret = (Cm.MstInfoItemCategory.GetCategoryName(pclsCache.CacheConnectionObject, Code)).ToString();
                return ret;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstInfoItemCategory.GetCategoryName", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return ret;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:26,代碼來源:CmMstInfoItemCategory.cs

示例9: SetDataUM

        //SetDataUM ZYF 2015-1-20
        public static bool SetDataUM(DataConnection pclsCache, string UserId, string UserName, string Password, string Class, int EndDate, string revUserId, string TerminalName, string TerminalIP, int DeviceType)
        {
            bool IsSaved = false;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return IsSaved;

                }
                int flag = (int)Cm.MstUser.SetDataUM(pclsCache.CacheConnectionObject, UserId, UserName, Password, Class, EndDate, revUserId, TerminalName, TerminalIP, DeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return IsSaved;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "CmMstUser.SetDataUM", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return IsSaved;
            }
            finally
            {
                pclsCache.DisConnect();
            }

        }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:31,代碼來源:CmMstUser.cs

示例10: SetData

 //SetData ZC 2014-12-2
 public static bool 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)
 {
     bool IsSaved = false;
     try
     {
         if (!pclsCache.Connect())
         {
             return IsSaved;
         }
         int flag = (int)Ps.VitalSigns.SetData(pclsCache.CacheConnectionObject, UserId, RecordDate, RecordTime, ItemType, ItemCode, Value, Unit, revUserId, TerminalName, TerminalIP, DeviceType);
         if (flag == 1)
         {
             IsSaved = true;
         }
         return IsSaved;
     }
     catch (Exception ex)
     {
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsVitalSigns.SetData", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return IsSaved;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:27,代碼來源:PsVitalSigns.cs

示例11: SetData

        //SetData  LS 2014-12-1
        public static bool SetData(DataConnection pclsCache, string UserId, int VisitId, int VisitType, int AdmissionDate, int DischargeDate, string HospitalCode, string Department, string piUserId, string piTerminalName, string piTerminalIP, int piDeviceType)
        {
            bool IsSaved = false;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return IsSaved;

                }
                int flag = (int)Ps.ClinicalInfo.SetData(pclsCache.CacheConnectionObject, UserId, VisitId, VisitType, AdmissionDate, DischargeDate, HospitalCode, Department, piUserId, piTerminalName, piTerminalIP, piDeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return IsSaved;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "PsClinicalInfo.SetData", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return IsSaved;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:30,代碼來源:PsClinicalInfo.cs

示例12: DeleteData

        //DeleteData WF 2015-07-01
        public static int DeleteData(DataConnection pclsCache, string PatientId, string RoleClass)
        {
            int Ret = 0;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return Ret;

                }
                Ret = (int)Ps.RoleMatch.DeleteData(pclsCache.CacheConnectionObject, PatientId, RoleClass);
                return Ret;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Ps.RoleMatch.DeleteData", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return Ret;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:26,代碼來源:PsRoleMatch.cs

示例13: GetNo

        //GetNo 自動編號 YDS 2014-12-01
        public static 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:luyao2211,項目名稱:WebService,代碼行數:26,代碼來源:CmMstNumbering.cs

示例14: SetData

        //SetData GL 2014-12-01
        public static bool SetData(DataConnection pclsCache, string UserId, int SortNo, string AlertItemCode, DateTime AlertDateTime, int AlertType, int PushFlag, int ProcessFlag, string revUserId, string pTerminalName, string pTerminalIP, int pDeviceType)
        {
            bool IsSaved = false;
            try
            {
                if (!pclsCache.Connect())
                {
                    //MessageBox.Show("Cache數據庫連接失敗");
                    return IsSaved;

                }
                int flag = (int)Wn.TrnAlertRecord.SetData(pclsCache.CacheConnectionObject, UserId, SortNo, AlertItemCode, AlertDateTime, AlertType, PushFlag, ProcessFlag, revUserId, pTerminalIP, pTerminalName, pDeviceType);
                if (flag == 1)
                {
                    IsSaved = true;
                }
                return IsSaved;
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.ToString(), "保存失敗!");
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "WnTrnAlertRecord.SetData", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return IsSaved;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:30,代碼來源:WnTrnAlertRecord.cs

示例15: ChangeStatus

 // ChangeStatus WY 2015-07-13
 public static bool ChangeStatus(DataConnection pclsCache, string HospitalCode, string Code, int Status)
 {
     bool IsSaved = false;
     try
     {
         if (!pclsCache.Connect())
         {
             //MessageBox.Show("Cache數據庫連接失敗");
             return IsSaved;
         }
         int flag = (int)Tmp.ExamDict.ChangeStatus(pclsCache.CacheConnectionObject, HospitalCode, Code, Status);
         if (flag == 1)
         {
             IsSaved = true;
         }
         return IsSaved;
     }
     catch (Exception ex)
     {
         //MessageBox.Show(ex.ToString(), "獲取名稱失敗!");
         HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "Tmp.ExamDict.ChangeStatus", "數據庫操作異常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
         return IsSaved;
     }
     finally
     {
         pclsCache.DisConnect();
     }
 }
開發者ID:luyao2211,項目名稱:WebService,代碼行數:29,代碼來源:TmpExamDict.cs


注:本文中的WebService.CommonLibrary.DataConnection.DisConnect方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。