Esempio n. 1
0
        /// <summary>
        /// درج
        /// </summary>
        /// <returns></returns>
        public int Insert(JDataBase tempDb)
        {
            JRequestArchiveListTable JLT = new JRequestArchiveListTable();

            try
            {
                JLT.SetValueProperty(this);
                Code = JLT.Insert(tempDb);
                if (Code > 0)
                {
                    return(Code);
                }
                else
                {
                    return(0);
                }
            }
            catch (Exception ex)
            {
                JSystem.Except.AddException(ex);
                return(0);
            }
            finally
            {
                tempDb.Dispose();
                JLT.Dispose();
            }
            return(0);
        }
Esempio n. 2
0
        /// <summary>
        /// حذف
        /// </summary>
        /// <returns></returns>
        public bool Delete()
        {
            JDataBase Db = new JDataBase();
            JRequestArchiveListTable PDT = new JRequestArchiveListTable();

            try
            {
                PDT.SetValueProperty(this);
                if (PDT.Delete(Db))
                {
                    return(true);
                }
                return(false);
            }
            catch (Exception ex)
            {
                JSystem.Except.AddException(ex);
                return(false);
            }
            finally
            {
                PDT.Dispose();
                Db.Dispose();
            }
            return(false);
        }