Пример #1
0
        public string UpdateStoreDiffMemo(DbTransaction transaction, ArrayList parameterList)
        {
            bool IsRootTranscation = false;
            string strReturn = "";
            CAM03DBO dbo = new CAM03DBO(ref USEDB);
            IsRootTranscation = (transaction == null) ? true : false;

            if (IsRootTranscation)
            {
                Conn = USEDB.CreateConnection();
                Conn.Open();
                DBT = Conn.BeginTransaction();
            }
            else
            {
                DBT = transaction;
            }

            try
            {
                strReturn = dbo.UpdateStoreDiffMemo(transaction, parameterList);

                if (strReturn == "")
                {
                    if (IsRootTranscation)
                    {
                        DBT.Commit();
                    }
                }
                else
                {
                    DBT.Rollback();
                }

                return strReturn;
            }
            catch
            {
                if (IsRootTranscation)
                {
                    DBT.Rollback();
                }
                throw;
            }
            finally
            {
                if (IsRootTranscation)
                {
                    if (Conn.State == ConnectionState.Connecting)
                    {
                        Conn.Close();
                    }
                }
            }
        }
Пример #2
0
 public DataTable DoCHECK_A21ITEM(ArrayList parameterList)
 {
     CAM03DBO dbo = new CAM03DBO(ref USEDB);
     return dbo.CHECK_A21ITEM(parameterList);
 }
Пример #3
0
 public DataTable GetStoreInfo(ArrayList parameterList)
 {
     CAM03DBO dbo = new CAM03DBO(ref USEDB);
     return dbo.GetStoreInfo(parameterList);
 }
Пример #4
0
 public DataTable GetSTBACKNO(ArrayList parameterList)
 {
     CAM03DBO dbo = new CAM03DBO(ref USEDB);
     return dbo.GetSTBACKNO(parameterList);
 }
Пример #5
0
 public DataTable GetDiffDetail(ArrayList parameterList)
 {
     CAM03DBO dbo = new CAM03DBO(ref USEDB);
     return dbo.GetDiffDetail(parameterList);
 }
Пример #6
0
        public string[] CreateStoreDiff(ArrayList masterParameter, ArrayList parameterList)
        {
            Conn = USEDB.CreateConnection();
            Conn.Open();
            DbTransaction transaction = Conn.BeginTransaction();
            CAM03DBO dbo = new CAM03DBO(ref USEDB);

            try
            {
                string[] strReturn = dbo.CreateStoreDiff(transaction, masterParameter);

                if (strReturn[2] != "")
                {
                    transaction.Rollback();
                    return strReturn;
                }

                if (parameterList.Count > 0)
                {
                    for (int i = 0; i < parameterList.Count; i++)
                    {
                        ((ArrayList)parameterList[i]).Insert(0, int.Parse(strReturn[0]));
                        UpdateDiff(transaction, (ArrayList)parameterList[i]);
                    }
                }

                dbo.PatchProc(transaction, strReturn[1], masterParameter[18].ToString(), masterParameter[23].ToString());

                if (Convert.ToInt16(masterParameter[6]) == 1)
                {
                    dbo.Cal_Sch_AccountMonth(transaction, strReturn[1]);
                }
                transaction.Commit();

                return strReturn;

            }
            catch
            {
                transaction.Rollback();
                throw;
            }
            finally
            {
                Conn.Close();
            }
        }
Пример #7
0
        public void DeleteStoreDiffDetail(DbTransaction transaction, ArrayList parameterList)
        {
            bool IsRootTranscation = false;
            CAM03DBO dbo = new CAM03DBO(ref USEDB);
            IsRootTranscation = (transaction == null) ? true : false;

            if (IsRootTranscation)
            {
                Conn = USEDB.CreateConnection();
                Conn.Open();
                DBT = Conn.BeginTransaction();
            }
            else
            {
                DBT = transaction;
            }

            try
            {
                dbo.DeleteStoreDiffDetail(transaction, parameterList);
                if (IsRootTranscation)
                {
                    DBT.Commit();
                }
            }
            catch
            {
                if (IsRootTranscation)
                {
                    DBT.Rollback();
                }
                throw;
            }
            finally
            {
                if (IsRootTranscation)
                {
                    if (Conn.State == ConnectionState.Connecting)
                    {
                        Conn.Close();
                    }
                }
            }
        }
Пример #8
0
        public void DoPatchProc(DbTransaction transaction, string strID, string strUID, string strUPLOAD)
        {
            bool IsRootTranscation = false;
            CAM03DBO dbo = new CAM03DBO(ref USEDB);
            IsRootTranscation = (transaction == null) ? true : false;

            if (IsRootTranscation)
            {
                Conn = USEDB.CreateConnection();
                Conn.Open();
                DBT = Conn.BeginTransaction();
            }
            else
            {
                DBT = transaction;
            }

            try
            {
                dbo.PatchProc(transaction, strID, strUID, strUPLOAD);
                if (IsRootTranscation)
                {
                    DBT.Commit();
                }
            }
            catch
            {
                if (IsRootTranscation)
                {
                    DBT.Rollback();
                }
                throw;
            }
            finally
            {
                if (IsRootTranscation)
                {
                    if (Conn.State == ConnectionState.Connecting)
                    {
                        Conn.Close();
                    }
                }
            }
        }
Пример #9
0
 public DataTable QueryDiffPatchByFind(ArrayList parameterList)
 {
     CAM03DBO dbo = new CAM03DBO(ref USEDB);
     return dbo.QueryDiffPatchByFind(parameterList);
 }