/// <summary> /// 查詢門市調撥單時使用 /// </summary> /// <returns>包含查詢結果的DataTable</returns> public DataTable QueryStoreTransfer(bool byLike, string groupNo, string store, string profitNo, string zo, string salID, string acctUID, string ioType, string transferDateS, string transferDateE, string busDateS, string busDateE, string transferNo, string chainSourceNo, string inAcctNo, string taxType, string rootNo, string isSchedule, string acStatus, string acBalanceDateS, string acBalanceDate, string item, string period, string adjQty, string op4, string rownum, string createUID, string updateUID, string strPROMOTE_ID_S, string strPROMOTE_ID_E) { CAM051DBO dbo = new CAM051DBO(ref USEDB); return dbo.QueryStoreTransfer(byLike, groupNo, store, profitNo, zo, salID, acctUID, ioType, transferDateS, transferDateE, busDateS, busDateE, transferNo, chainSourceNo, inAcctNo, taxType, rootNo, isSchedule, acStatus, acBalanceDateS, acBalanceDate, item, period, adjQty, ConvertOperator(op4), rownum, createUID, updateUID, strPROMOTE_ID_S, strPROMOTE_ID_E); }
/// <summary> /// 新增與修改調撥商品明細時呼叫 /// </summary> /// <param name="parameterList">參數清單 /// 入帳編號、品號、期別、調撥數量、使用者ID</param> /// <returns>更新成功的調撥單號</returns> public void UpdateStoreTransfer(DbTransaction transaction, ArrayList parameterList) { bool IsRootTranscation = false; CAM051DBO dbo = new CAM051DBO(ref USEDB); IsRootTranscation = (transaction == null) ? true : false; if (IsRootTranscation) { Conn = USEDB.CreateConnection(); Conn.Open(); DBT = Conn.BeginTransaction(); } else { DBT = transaction; } try { dbo.UpdateStoreTransfer(transaction, parameterList); if (IsRootTranscation) { DBT.Commit(); } } catch { if (IsRootTranscation) { DBT.Rollback(); } throw; } finally { if (IsRootTranscation) { if (Conn.State == ConnectionState.Connecting) { Conn.Close(); } } } }
/// <summary> /// 取得調撥單主檔時使用 /// </summary> /// <param name="id">入帳編號</param> /// <returns>包含查詢結果的IDataReader</returns> public IDataReader GetTransferRecord(string id) { CAM051DBO dbo = new CAM051DBO(ref USEDB); return dbo.GetTransferRecord(id); }
public DataTable GETTRANSFER_NO(ArrayList parameterList) { CAM051DBO dbo = new CAM051DBO(ref USEDB); return dbo.GETTRANSFER_NO(parameterList); }
public string GetAPLDate() { CAM051DBO dbo = new CAM051DBO(ref USEDB); return dbo.GetAPLDate(); }
public IDataReader GetStoreInfo(ArrayList parameterList) { CAM051DBO dbo = new CAM051DBO(ref USEDB); return dbo.GetStoreInfo(parameterList); }
public DataTable GetPriceInfoList_PROMOTE(bool prepareInfo, ArrayList parameterList) { CAM051DBO dbo = new CAM051DBO(ref USEDB); if (prepareInfo) { dbo.CLEARPRICEINFOLIST(parameterList); dbo.PreparePriceInfoList(parameterList); } return dbo.GetPriceInfoList_PROMOTE(parameterList); }
public IDataReader GetInvInfo(string store, string item, string period) { CAM051DBO dbo = new CAM051DBO(ref USEDB); return dbo.GetInvInfo(store, item, period); }
public void DoRecalTran(DbTransaction transaction, string strID) { bool IsRootTranscation = false; CAM051DBO dbo = new CAM051DBO(ref USEDB); IsRootTranscation = (transaction == null) ? true : false; if (IsRootTranscation) { Conn = USEDB.CreateConnection(); Conn.Open(); DBT = Conn.BeginTransaction(); } else { DBT = transaction; } try { dbo.Recal_Tran(transaction, strID); if (IsRootTranscation) { DBT.Commit(); } } catch { if (IsRootTranscation) { DBT.Rollback(); } throw; } finally { if (IsRootTranscation) { if (Conn.State == ConnectionState.Connecting) { Conn.Close(); } } } }
/// <summary> /// 新增門市調撥單時呼叫 /// </summary> /// <param name="parameterList">參數清單 /// 店群、店號、利潤中心代號、憑證單號、通路單號、使用者ID</param> /// <returns>新增成功的調撥單號</returns> public string CreateStoreTransfer(ArrayList masterParameter, ArrayList parameterList) { Conn = USEDB.CreateConnection(); Conn.Open(); DbTransaction transaction = Conn.BeginTransaction(); CAM051DBO dbo = new CAM051DBO(ref USEDB); try { string[] strReturn = dbo.CreateStoreTransfer(transaction, masterParameter); if (parameterList.Count > 0) { for (int i = 0; i < parameterList.Count; i++) { ((ArrayList)parameterList[i]).Insert(0, int.Parse(strReturn[0])); UpdateStoreTransfer(transaction, (ArrayList)parameterList[i]); } } dbo.Recal_Tran(transaction, strReturn[1]); if (Convert.ToInt16(masterParameter[4]) == 1) { dbo.Cal_Sch_AccountMonth(transaction, strReturn[1]); } transaction.Commit(); return strReturn[1]; } catch { transaction.Rollback(); throw; } finally { Conn.Close(); } }