Esempio n. 1
0
        public int Update(List <ST_STATE_LDC> objST_STATE_Ls)
        {
            int          updatedCount    = 0;
            DBConnection objConnection   = new DBConnection();
            ST_STATE_LDA objST_STATE_LDA = new ST_STATE_LDA();

            try
            {
                objConnection.Open(true);
                updatedCount = objST_STATE_LDA.Update(objConnection, objST_STATE_Ls);
                IsDirty      = objST_STATE_LDA.IsDirty;
                if (IsDirty)
                {
                    objConnection.Rollback();
                }
                else
                {
                    objConnection.Commit();
                }
            }
            catch (Exception ex)
            {
                objConnection.Rollback();
                throw ex;
            }
            finally
            {
                objConnection.Close();
            }
            return(updatedCount);
        }
Esempio n. 2
0
        public ST_STATE_LDC LoadByPrimaryKey(string ST_STATE)
        {
            DBConnection objConnection   = new DBConnection();
            ST_STATE_LDA objST_STATE_LDA = new ST_STATE_LDA();
            ST_STATE_LDC objST_STATE_LDC = null;

            try
            {
                objConnection.Open(false);
                objST_STATE_LDC = objST_STATE_LDA.LoadByPrimaryKey(objConnection, ST_STATE);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objConnection.Close();
            }
            return(objST_STATE_LDC);
        }
Esempio n. 3
0
        public List <ST_STATE_LDC> LoadAll()
        {
            DBConnection        objConnection   = new DBConnection();
            ST_STATE_LDA        objST_STATE_LDA = new ST_STATE_LDA();
            List <ST_STATE_LDC> objST_STATE_LDC = null;

            try
            {
                objConnection.Open(false);
                objST_STATE_LDC = objST_STATE_LDA.LoadAll(objConnection);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                objConnection.Close();
            }
            return(objST_STATE_LDC);
        }
Esempio n. 4
0
        public int Insert(List <ST_STATE_LDC> objST_STATE_Ls)
        {
            int          insertedCount   = 0;
            DBConnection objConnection   = new DBConnection();
            ST_STATE_LDA objST_STATE_LDA = new ST_STATE_LDA();

            try
            {
                objConnection.Open(true);
                insertedCount = objST_STATE_LDA.Insert(objConnection, objST_STATE_Ls);
                objConnection.Commit();
            }
            catch (Exception ex)
            {
                objConnection.Rollback();
                throw ex;
            }
            finally
            {
                objConnection.Close();
            }
            return(insertedCount);
        }