public string CheckVendorItemExists(ArrayList ParameterList) { try { DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB); return dbo.CheckVendorItemExists(ParameterList); } catch (Exception ex) { throw ex; } }
/// <summary> /// ����sBCO /// </summary> /// <param name="ParameterList">��s�ܼ�</param> /// <param name="RootDBT">�O�_���D���,�L�D�����Jnull</param> /// <returns>�^�Ǽv�T����</returns> public void UpdateVendorBase(ArrayList ParameterList, DbTransaction RootDBT ) { bool IsRootTranscation = false; try { //�P�_�O�_���ǤJRoot Transcation IsRootTranscation = (RootDBT == null) ? true : false; #region �Ұʥ���Ϋ��wRootTranscation if (IsRootTranscation) { //�W�ߩI�s�Ұ�Transcation Conn = USEDB.CreateConnection(); Conn.Open(); DBT = Conn.BeginTransaction(); } else { DBT = RootDBT; } #endregion DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB); dbo.doUpdate(ParameterList, DBT); #region ������\ if (IsRootTranscation) { //�W�ߩI�sTranscation���� DBT.Commit(); } #endregion } catch (Exception ex) { #region ������� if (IsRootTranscation) { //�W�ߩI�sTranscation���� DBT.Rollback(); } #endregion throw ex; } finally { #region �P�_�O�_��������s�u if (IsRootTranscation) { //�W�ߩI�sTranscation,�����s�u if (Conn.State == ConnectionState.Connecting) { Conn.Close(); } } #endregion } }
public DataTable QueryVendorBaseByLike2(ArrayList ParameterList) { try { DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB); return dbo.doQueryByLIKE2(ParameterList); } catch (Exception ex) { throw ex; } }
public DataTable QueryVendorBaseByALL() { try { DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB); return dbo.doQueryAll(); } catch (Exception ex) { throw ex; } }
public DataTable QuerySwitch(QueryType QT, ArrayList ParameterList ) { DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB); DataTable Dt; try { switch (QT) { case QueryType.ALL: Dt = dbo.doQueryAll(); break; case QueryType.CODE: Dt = dbo.doQueryByCode(ParameterList); break; case QueryType.ID: Dt = dbo.doQueryByID(ParameterList); break; case QueryType.Custom: Dt = dbo.doQueryByFind(ParameterList); break; default: Dt = new DataTable(); break; } return Dt; } catch (Exception ex) { throw ex; } }
/// <summary> /// �ˮ֨����ӦX���ΰӫ~��� /// </summary> /// <param name="VENODR_CODE">�����ӽs��</param> /// <param name="CONTRACT_CNT">�^�Ǭd��VDS_VDM_CONTRACT_MST����</param> /// <param name="ITEM_CNT">�^�Ǭd��VDS_ITM_ITEM����</param> public void QueryForDelete(string VENODR_CODE, out string CONTRACT_CNT, out string ITEM_CNT) { try { DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB); dbo.QueryForDelete(VENODR_CODE, out CONTRACT_CNT, out ITEM_CNT); } catch (Exception ex) { throw ex; } }
public int GetNewID() { int PID = 0; bool IsRootTranscation = false; try { DBO.VDM_VendorBaseDBO dbo = new VDM_VendorBaseDBO(ref USEDB); #region �Ұʥ���Ϋ��wRootTranscation if (IsRootTranscation) { //�W�ߩI�s�Ұ�Transcation Conn = USEDB.CreateConnection(); Conn.Open(); DBT = Conn.BeginTransaction(); } else { DBT = null; } #endregion PID = dbo.doGetNewID(); #region ������\ if (IsRootTranscation) { //�W�ߩI�sTranscation���� DBT.Commit(); } #endregion return PID; } catch (Exception ex) { #region ������� if (IsRootTranscation) { //�W�ߩI�sTranscation���� DBT.Rollback(); } #endregion throw ex; } finally { #region �P�_�O�_��������s�u if (IsRootTranscation) { //�W�ߩI�sTranscation,�����s�u if (Conn.State == ConnectionState.Connecting) { Conn.Close(); } } #endregion } }