/// <summary>
        /// Update data full for table DECLARATIONDETAIL
        /// you must set attribute at application tier
        /// </summary>
        /// <param name="obj"> type of DECLARATIONDETAIL</param>
        public static bool Update(DECLARATIONDETAIL declarationDetail, bool isTmp)
        {
            string procedure = isTmp ? "spDECLARATIONDETAILtmpUpdate" : "spDECLARATIONDETAILUpdate";
            int    i         = SqlHelper.ExecuteNonQuery(procedure,
                                                         declarationDetail.DECD_AUTOID,
                                                         declarationDetail.COT_DOCUMENTID,
                                                         declarationDetail.PIT_AUTOID,
                                                         declarationDetail.ITG_AUTOID,
                                                         declarationDetail.UOM_AUTOID,
                                                         declarationDetail.TR_AUTOID,
                                                         declarationDetail.PK_AUTOID,
                                                         declarationDetail.CP_AUTOID,
                                                         declarationDetail.ITT_AUTOID,
                                                         declarationDetail.WH_AUTOID,
                                                         declarationDetail.PRJ_AUTOID,
                                                         declarationDetail.DEC_DOCUMENTID,
                                                         declarationDetail.PIT_ITEMNO,
                                                         declarationDetail.PIT_ITEMNAME,
                                                         declarationDetail.PIT_UNITPRICE,
                                                         declarationDetail.DECD_POIVQUANTITY,
                                                         declarationDetail.DECD_QUANTITY,
                                                         declarationDetail.DECD_AMOUNT,
                                                         declarationDetail.DECD_EITAXPERCENT,
                                                         declarationDetail.DECD_REDUCEPERCENT,
                                                         declarationDetail.DECD_TAXPERCENT,
                                                         declarationDetail.DECD_BASEAMOUNT,
                                                         declarationDetail.DECD_NOTE,
                                                         declarationDetail.DOC_DOCUMENTID);

            if (i > 0)
            {
                return(true);
            }
            return(false);
        }
        /// <summary>
        ///Select data full for table DECLARATIONDETAIL
        /// return oneDECLARATIONDETAIL
        /// you must set attribute at application tier
        /// </summary>
        /// <param name="DECD_AUTOID"> type of DECD_AUTOID</param>
        public static DECLARATIONDETAIL SelectByID(int DECD_AUTOID)
        {
            DataSet           ds     = new DataSet();
            DECLARATIONDETAIL result = new DECLARATIONDETAIL();

            SqlHelper.ExecuteDataset(ds, "spDECLARATIONDETAILGetByID", DECD_AUTOID);
            if (ds.Tables.Count > 0)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    result = new DECLARATIONDETAIL(ds.Tables[0].Rows[0]);
                }
            }
            ds.Dispose();
            return(result);
        }