Example #1
0
        ///
        /// 插入一个GHSF_REGHIS实体到数据库。
        ///
        /// 将要插入的实体
        public int InsertEntity(DataSetGHSF_REGHIS entity)
        {
            CheckData(entity);
            int  iRtn         = 0;
            bool isExistTrans = db.IsInTransaction();

            if (!isExistTrans)
            {
                db.BeginTrans();
            }

            try
            {
                foreach (DataRow row in entity.Tables["GHSF_GHSF_REGHIS"].Rows)
                {
                    int j = db.exeSql(new SS_GHSF_REGHIS_InsertGHSF_GHSF_REGHIS(), row);
                    iRtn = iRtn + j;
                }

                if (!isExistTrans)
                {
                    db.CommitTrans();
                }
                return(iRtn);
            }
            catch (Exception e)
            {
                if (!isExistTrans)
                {
                    db.RollbackTrans();
                }
                throw e;
            }
        }
Example #2
0
        ///
        /// 插入一个IN_NAVIGATION_DETAILS实体到数据库。
        ///
        /// 将要插入的实体
        public int InsertEntity(DataSetIN_NAVIGATION_DETAILS entity)
        {
            CheckData(entity);
            int  iRtn         = 0;
            bool isExistTrans = db.IsInTransaction();

            if (!isExistTrans)
            {
                db.BeginTrans();
            }

            try
            {
                foreach (DataRow row in entity.Tables["YWAPP_INHOSPITAL_NAVIGATION_DETAIL"].Rows)
                {
                    int j = db.exeSql(new SS_IN_NAVIGATION_DETAILS_InsertYWAPP_INHOSPITAL_NAVIGATION_DETAIL(), row);
                    iRtn = iRtn + j;
                }

                if (!isExistTrans)
                {
                    db.CommitTrans();
                }
                return(iRtn);
            }
            catch (Exception e)
            {
                if (!isExistTrans)
                {
                    db.RollbackTrans();
                }
                throw e;
            }
        }
        ///
        /// 插入一个DOCTORINTRODUCTION实体到数据库。
        ///
        /// 将要插入的实体
        public int InsertEntity(DataSetDOCTORINTRODUCTION entity)
        {
            CheckData(entity);
            int  iRtn         = 0;
            bool isExistTrans = db.IsInTransaction();

            if (!isExistTrans)
            {
                db.BeginTrans();
            }

            try
            {
                foreach (DataRow row in entity.Tables["YWAPP_DOCTOR_INTRODUCTION"].Rows)
                {
                    int j = db.exeSql(new SS_DOCTORINTRODUCTION_InsertYWAPP_DOCTOR_INTRODUCTION(), row);
                    iRtn = iRtn + j;
                }

                if (!isExistTrans)
                {
                    db.CommitTrans();
                }
                return(iRtn);
            }
            catch (Exception e)
            {
                if (!isExistTrans)
                {
                    db.RollbackTrans();
                }
                throw e;
            }
        }