/// <summary>
        /// 根据居民疾病信息(ResidentDiseaseInfo)的主键“居民内部编号(Id)”从数据库中获取居民疾病信息(ResidentDiseaseInfo)的实例。
        /// 成功从数据库中取得记录返回新居民疾病信息(ResidentDiseaseInfo)的实例“,没有取到记录返回null值。
        /// </summary>
        /// <param name="id">居民疾病信息(ResidentDiseaseInfo)的主键“居民内部编号(Id)”</param>
        public override ResidentDiseaseInfo GetDataById(string id)
        {
            ResidentDiseaseInfo residentDiseaseInfo = null;
            string sqlText = "SELECT [Id],[HODA],[EH],[HBP],[HBPTime],[GDM],[GDMTime],[CH],[CHTime],[COP],[COPTime],[MTC],[MTCTime],[Stroke],[StrokeTime],[SMI],[SMITime],[TB],[TBTime],[Hepatitis],"
                             + "[HepatitisTime],[OLID],[OLIDTime],[OD],[ODTime],[Other],[OtherTime],[HistoryOfFather],[HistoryOfMother],[HistoryOfBrothers],[HistoryOfChildren],"
                             + "[GeneticHistory],[Disability],[Remarks] "
                             + "FROM [ResidentDiseaseInfo] "
                             + "WHERE [Id]=@Id";

            OleDbParameter[] parameters =
            {
                new OleDbParameter("@Id", OleDbType.VarWChar, 50)
                {
                    Value = id
                }
            };

            OleDbDataReader oleDbDataReader = SFL.OleDbHelper.ExecuteReader(sqlText, parameters);

            if (oleDbDataReader.Read())
            {
                residentDiseaseInfo = new ResidentDiseaseInfo();
                ReadResidentDiseaseInfoAllData(oleDbDataReader, residentDiseaseInfo);
            }
            oleDbDataReader.Close();
            return(residentDiseaseInfo);
        }
        /// <summary>
        /// 根据居民疾病信息(ResidentDiseaseInfo)的主键“居民内部编号(Id)”从数据库中获取居民疾病信息(ResidentDiseaseInfo)的实例。
        /// 成功从数据库中取得记录返回新居民疾病信息(ResidentDiseaseInfo)的实例“,没有取到记录返回null值。
        /// </summary>
        /// <param name="id">居民疾病信息(ResidentDiseaseInfo)的主键“居民内部编号(Id)”</param>
        public override ResidentDiseaseInfo GetDataById(string id)
        {
            ResidentDiseaseInfo residentDiseaseInfo = null;
            string sqlText = "SELECT \"Id\",\"HODA\",\"EH\",\"HBP\",\"HBPTime\",\"GDM\",\"GDMTime\",\"CH\",\"CHTime\",\"COP\",\"COPTime\",\"MTC\",\"MTCTime\",\"Stroke\",\"StrokeTime\",\"SMI\",\"SMITime\",\"TB\",\"TBTime\",\"Hepatitis\","
                             + "\"HepatitisTime\",\"OLID\",\"OLIDTime\",\"OD\",\"ODTime\",\"Other\",\"OtherTime\",\"HistoryOfFather\",\"HistoryOfMother\",\"HistoryOfBrothers\",\"HistoryOfChildren\","
                             + "\"GeneticHistory\",\"Disability\",\"Remarks\" "
                             + "FROM \"ResidentDiseaseInfo\" "
                             + "WHERE \"Id\"=:Id";

            OracleParameter[] parameters =
            {
                new OracleParameter(":Id", OracleType.NVarChar, 50)
                {
                    Value = id
                }
            };

            OracleDataReader oracleDataReader = SFL.OracleHelper.ExecuteReader(sqlText, parameters);

            if (oracleDataReader.Read())
            {
                residentDiseaseInfo = new ResidentDiseaseInfo();
                ReadResidentDiseaseInfoAllData(oracleDataReader, residentDiseaseInfo);
            }
            oracleDataReader.Close();
            return(residentDiseaseInfo);
        }
Beispiel #3
0
 /// <summary>
 /// 从DataReader中读取数据,并为ResidentDiseaseInfo对象需要进行显示的属性赋值。该方法主要由该类的子类调用。
 /// </summary>
 /// <param name="sqlDataReader">IDataReader</param>
 /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
 protected void ReadResidentDiseaseInfoPageData(IDataReader dataReader, ResidentDiseaseInfo residentDiseaseInfo)
 {
     // 居民内部编号
     if (dataReader["Id"] != DBNull.Value)
     {
         residentDiseaseInfo.Id = Convert.ToString(dataReader["Id"]);
     }
     // 药物过敏史
     if (dataReader["HODA"] != DBNull.Value)
     {
         residentDiseaseInfo.HODA = Convert.ToString(dataReader["HODA"]);
     }
     // 暴露史
     if (dataReader["EH"] != DBNull.Value)
     {
         residentDiseaseInfo.EH = Convert.ToString(dataReader["EH"]);
     }
     // 残疾情况
     if (dataReader["Disability"] != DBNull.Value)
     {
         residentDiseaseInfo.Disability = Convert.ToString(dataReader["Disability"]);
     }
     // 备注
     if (dataReader["Remarks"] != DBNull.Value)
     {
         residentDiseaseInfo.Remarks = Convert.ToString(dataReader["Remarks"]);
     }
 }
        /// <summary>
        /// 从数据库中读取并返回所有居民疾病信息(ResidentDiseaseInfo)List列表。
        /// </summary>
        public override List <ResidentDiseaseInfo> GetAllList()
        {
            string sqlText = "SELECT [Id],[HODA],[EH],[HBP],[HBPTime],[GDM],[GDMTime],[CH],[CHTime],[COP],[COPTime],[MTC],[MTCTime],[Stroke],[StrokeTime],[SMI],[SMITime],[TB],[TBTime],[Hepatitis],"
                             + "[HepatitisTime],[OLID],[OLIDTime],[OD],[ODTime],[Other],[OtherTime],[HistoryOfFather],[HistoryOfMother],[HistoryOfBrothers],[HistoryOfChildren],"
                             + "[GeneticHistory],[Disability],[Remarks] "
                             + "FROM [ResidentDiseaseInfo]";
            List <ResidentDiseaseInfo> list            = new List <ResidentDiseaseInfo>();
            OleDbDataReader            oleDbDataReader = SFL.OleDbHelper.ExecuteReader(sqlText, null);

            while (oleDbDataReader.Read())
            {
                ResidentDiseaseInfo residentDiseaseInfo = new ResidentDiseaseInfo();
                ReadResidentDiseaseInfoAllData(oleDbDataReader, residentDiseaseInfo);
                list.Add(residentDiseaseInfo);
            }
            oleDbDataReader.Close();
            return(list);
        }
        /// <summary>
        /// 从数据库中读取并返回所有居民疾病信息(ResidentDiseaseInfo)List列表。
        /// </summary>
        public override List <ResidentDiseaseInfo> GetAllList()
        {
            string sqlText = "SELECT \"Id\",\"HODA\",\"EH\",\"HBP\",\"HBPTime\",\"GDM\",\"GDMTime\",\"CH\",\"CHTime\",\"COP\",\"COPTime\",\"MTC\",\"MTCTime\",\"Stroke\",\"StrokeTime\",\"SMI\",\"SMITime\",\"TB\",\"TBTime\",\"Hepatitis\","
                             + "\"HepatitisTime\",\"OLID\",\"OLIDTime\",\"OD\",\"ODTime\",\"Other\",\"OtherTime\",\"HistoryOfFather\",\"HistoryOfMother\",\"HistoryOfBrothers\",\"HistoryOfChildren\","
                             + "\"GeneticHistory\",\"Disability\",\"Remarks\" "
                             + "FROM \"ResidentDiseaseInfo\"";
            List <ResidentDiseaseInfo> list             = new List <ResidentDiseaseInfo>();
            OracleDataReader           oracleDataReader = SFL.OracleHelper.ExecuteReader(sqlText, null);

            while (oracleDataReader.Read())
            {
                ResidentDiseaseInfo residentDiseaseInfo = new ResidentDiseaseInfo();
                ReadResidentDiseaseInfoAllData(oracleDataReader, residentDiseaseInfo);
                list.Add(residentDiseaseInfo);
            }
            oracleDataReader.Close();
            return(list);
        }
        /// <summary>
        /// 根据每页记录数及所要获取的页数,从数据库中读取并返回经过分页后的居民疾病信息(ResidentDiseaseInfo)的列表及分页信息。
        /// 该方法所获取的居民疾病信息(ResidentDiseaseInfo)列表仅用于在数据控件中显示,该方法只为对象中需要显示的属性进行赋值。
        /// </summary>
        public override PageData GetPageList(int pageSize, int curPage)
        {
            string sqlText = "SELECT [Id],[HODA],[EH],[Disability],[Remarks] "
                             + "FROM [ResidentDiseaseInfo]";
            List <ResidentDiseaseInfo> list            = new List <ResidentDiseaseInfo>();
            OleDbDataReader            oleDbDataReader = SFL.OleDbHelper.ExecuteReader(sqlText, null);

            PageData pageData = new PageData();

            pageData.PageSize    = pageSize;
            pageData.CurPage     = curPage;
            pageData.RecordCount = 0;
            pageData.PageCount   = 1;

            int first = (curPage - 1) * pageSize + 1;
            int last  = curPage * pageSize;

            while (oleDbDataReader.Read())
            {
                pageData.RecordCount++;
                if (pageData.RecordCount >= first && last >= pageData.RecordCount)
                {
                    ResidentDiseaseInfo residentDiseaseInfo = new ResidentDiseaseInfo();
                    ReadResidentDiseaseInfoPageData(oleDbDataReader, residentDiseaseInfo);
                    list.Add(residentDiseaseInfo);
                }
            }
            oleDbDataReader.Close();

            if (pageData.RecordCount > 0)
            {
                pageData.PageCount = Convert.ToInt32(Math.Ceiling((double)pageData.RecordCount / (double)pageSize));
            }

            pageData.PageList = list;
            return(pageData);
        }
        //﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉
        //  此区域的代码为多层框架式代码,实现了父类中定义的抽象方法。请不要直接修改该区域中的任何代码,
        //  或在该区域中添加任何自定义代码,当该类发生变更时,您可以随时使用多层框架式代码覆盖其中的代码。
        //﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍


        /// <summary>
        /// 将居民疾病信息(ResidentDiseaseInfo)数据,采用INSERT操作插入到数据库中,并返回受影响的行数。
        /// </summary>
        /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
        public override int Insert(ResidentDiseaseInfo residentDiseaseInfo)
        {
            string sqlText = "INSERT INTO [ResidentDiseaseInfo]"
                             + "([Id],[HODA],[EH],[HBP],[HBPTime],[GDM],[GDMTime],[CH],[CHTime],[COP],[COPTime],[MTC],[MTCTime],[Stroke],[StrokeTime],[SMI],[SMITime],[TB],[TBTime],[Hepatitis],"
                             + "[HepatitisTime],[OLID],[OLIDTime],[OD],[ODTime],[Other],[OtherTime],[HistoryOfFather],[HistoryOfMother],[HistoryOfBrothers],[HistoryOfChildren],"
                             + "[GeneticHistory],[Disability],[Remarks])"
                             + "VALUES"
                             + "(@Id,@HODA,@EH,@HBP,@HBPTime,@GDM,@GDMTime,@CH,@CHTime,@COP,@COPTime,@MTC,@MTCTime,@Stroke,@StrokeTime,@SMI,@SMITime,@TB,@TBTime,@Hepatitis,"
                             + "@HepatitisTime,@OLID,@OLIDTime,@OD,@ODTime,@Other,@OtherTime,@HistoryOfFather,@HistoryOfMother,@HistoryOfBrothers,@HistoryOfChildren,"
                             + "@GeneticHistory,@Disability,@Remarks)";

            OleDbParameter[] parameters =
            {
                new OleDbParameter("@Id",                OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Id
                },
                new OleDbParameter("@HODA",              OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HODA
                },
                new OleDbParameter("@EH",                OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.EH
                },
                new OleDbParameter("@HBP",               OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HBP
                },
                new OleDbParameter("@HBPTime",           OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.HBPTime
                },
                new OleDbParameter("@GDM",               OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.GDM
                },
                new OleDbParameter("@GDMTime",           OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.GDMTime
                },
                new OleDbParameter("@CH",                OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.CH
                },
                new OleDbParameter("@CHTime",            OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.CHTime
                },
                new OleDbParameter("@COP",               OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.COP
                },
                new OleDbParameter("@COPTime",           OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.COPTime
                },
                new OleDbParameter("@MTC",               OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.MTC
                },
                new OleDbParameter("@MTCTime",           OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.MTCTime
                },
                new OleDbParameter("@Stroke",            OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Stroke
                },
                new OleDbParameter("@StrokeTime",        OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.StrokeTime
                },
                new OleDbParameter("@SMI",               OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.SMI
                },
                new OleDbParameter("@SMITime",           OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.SMITime
                },
                new OleDbParameter("@TB",                OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.TB
                },
                new OleDbParameter("@TBTime",            OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.TBTime
                },
                new OleDbParameter("@Hepatitis",         OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Hepatitis
                },
                new OleDbParameter("@HepatitisTime",     OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.HepatitisTime
                },
                new OleDbParameter("@OLID",              OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.OLID
                },
                new OleDbParameter("@OLIDTime",          OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.OLIDTime
                },
                new OleDbParameter("@OD",                OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.OD
                },
                new OleDbParameter("@ODTime",            OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.ODTime
                },
                new OleDbParameter("@Other",             OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Other
                },
                new OleDbParameter("@OtherTime",         OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.OtherTime
                },
                new OleDbParameter("@HistoryOfFather",   OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfFather
                },
                new OleDbParameter("@HistoryOfMother",   OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfMother
                },
                new OleDbParameter("@HistoryOfBrothers", OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfBrothers
                },
                new OleDbParameter("@HistoryOfChildren", OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfChildren
                },
                new OleDbParameter("@GeneticHistory",    OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.GeneticHistory
                },
                new OleDbParameter("@Disability",        OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Disability
                },
                new OleDbParameter("@Remarks",           OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Remarks
                }
            };
            return(SFL.OleDbHelper.ExecuteNonQuery(sqlText, parameters));
        }
        /// <summary>
        /// 将居民疾病信息(ResidentDiseaseInfo)数据,根据主键“居民内部编号(Id)”采用UPDATE操作更新到数据库中,并返回受影响的行数。
        /// </summary>
        /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
        public override int Update(ResidentDiseaseInfo residentDiseaseInfo)
        {
            string sqlText = "UPDATE [ResidentDiseaseInfo] SET "
                             + "[HODA]=@HODA,[EH]=@EH,[HBP]=@HBP,[HBPTime]=@HBPTime,[GDM]=@GDM,[GDMTime]=@GDMTime,[CH]=@CH,[CHTime]=@CHTime,[COP]=@COP,[COPTime]=@COPTime,"
                             + "[MTC]=@MTC,[MTCTime]=@MTCTime,[Stroke]=@Stroke,[StrokeTime]=@StrokeTime,[SMI]=@SMI,[SMITime]=@SMITime,[TB]=@TB,[TBTime]=@TBTime,"
                             + "[Hepatitis]=@Hepatitis,[HepatitisTime]=@HepatitisTime,[OLID]=@OLID,[OLIDTime]=@OLIDTime,[OD]=@OD,[ODTime]=@ODTime,[Other]=@Other,[OtherTime]=@OtherTime,"
                             + "[HistoryOfFather]=@HistoryOfFather,[HistoryOfMother]=@HistoryOfMother,[HistoryOfBrothers]=@HistoryOfBrothers,[HistoryOfChildren]=@HistoryOfChildren,"
                             + "[GeneticHistory]=@GeneticHistory,[Disability]=@Disability,[Remarks]=@Remarks "
                             + "WHERE [Id]=@Id";

            OleDbParameter[] parameters =
            {
                new OleDbParameter("@HODA",              OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HODA
                },
                new OleDbParameter("@EH",                OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.EH
                },
                new OleDbParameter("@HBP",               OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HBP
                },
                new OleDbParameter("@HBPTime",           OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.HBPTime
                },
                new OleDbParameter("@GDM",               OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.GDM
                },
                new OleDbParameter("@GDMTime",           OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.GDMTime
                },
                new OleDbParameter("@CH",                OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.CH
                },
                new OleDbParameter("@CHTime",            OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.CHTime
                },
                new OleDbParameter("@COP",               OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.COP
                },
                new OleDbParameter("@COPTime",           OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.COPTime
                },
                new OleDbParameter("@MTC",               OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.MTC
                },
                new OleDbParameter("@MTCTime",           OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.MTCTime
                },
                new OleDbParameter("@Stroke",            OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Stroke
                },
                new OleDbParameter("@StrokeTime",        OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.StrokeTime
                },
                new OleDbParameter("@SMI",               OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.SMI
                },
                new OleDbParameter("@SMITime",           OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.SMITime
                },
                new OleDbParameter("@TB",                OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.TB
                },
                new OleDbParameter("@TBTime",            OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.TBTime
                },
                new OleDbParameter("@Hepatitis",         OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Hepatitis
                },
                new OleDbParameter("@HepatitisTime",     OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.HepatitisTime
                },
                new OleDbParameter("@OLID",              OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.OLID
                },
                new OleDbParameter("@OLIDTime",          OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.OLIDTime
                },
                new OleDbParameter("@OD",                OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.OD
                },
                new OleDbParameter("@ODTime",            OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.ODTime
                },
                new OleDbParameter("@Other",             OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Other
                },
                new OleDbParameter("@OtherTime",         OleDbType.Date, 8)
                {
                    Value = residentDiseaseInfo.OtherTime
                },
                new OleDbParameter("@HistoryOfFather",   OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfFather
                },
                new OleDbParameter("@HistoryOfMother",   OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfMother
                },
                new OleDbParameter("@HistoryOfBrothers", OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfBrothers
                },
                new OleDbParameter("@HistoryOfChildren", OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfChildren
                },
                new OleDbParameter("@GeneticHistory",    OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.GeneticHistory
                },
                new OleDbParameter("@Disability",        OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Disability
                },
                new OleDbParameter("@Remarks",           OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Remarks
                },
                new OleDbParameter("@Id",                OleDbType.VarWChar, 50)
                {
                    Value = residentDiseaseInfo.Id
                }
            };
            return(SFL.OleDbHelper.ExecuteNonQuery(sqlText, parameters));
        }
        //﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉
        //  此区域的代码为多层框架式代码,实现了父类中定义的抽象方法。请不要直接修改该区域中的任何代码,
        //  或在该区域中添加任何自定义代码,当该类发生变更时,您可以随时使用多层框架式代码覆盖其中的代码。
        //﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍


        /// <summary>
        /// 将居民疾病信息(ResidentDiseaseInfo)数据,采用INSERT操作插入到数据库中,并返回受影响的行数。
        /// </summary>
        /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
        public override int Insert(ResidentDiseaseInfo residentDiseaseInfo)
        {
            string sqlText = "INSERT INTO \"ResidentDiseaseInfo\""
                             + "(\"Id\",\"HODA\",\"EH\",\"HBP\",\"HBPTime\",\"GDM\",\"GDMTime\",\"CH\",\"CHTime\",\"COP\",\"COPTime\",\"MTC\",\"MTCTime\",\"Stroke\",\"StrokeTime\",\"SMI\",\"SMITime\",\"TB\",\"TBTime\",\"Hepatitis\","
                             + "\"HepatitisTime\",\"OLID\",\"OLIDTime\",\"OD\",\"ODTime\",\"Other\",\"OtherTime\",\"HistoryOfFather\",\"HistoryOfMother\",\"HistoryOfBrothers\",\"HistoryOfChildren\","
                             + "\"GeneticHistory\",\"Disability\",\"Remarks\")"
                             + "VALUES"
                             + "(:Id,:HODA,:EH,:HBP,:HBPTime,:GDM,:GDMTime,:CH,:CHTime,:COP,:COPTime,:MTC,:MTCTime,:Stroke,:StrokeTime,:SMI,:SMITime,:TB,:TBTime,:Hepatitis,"
                             + ":HepatitisTime,:OLID,:OLIDTime,:OD,:ODTime,:Other,:OtherTime,:HistoryOfFather,:HistoryOfMother,:HistoryOfBrothers,:HistoryOfChildren,"
                             + ":GeneticHistory,:Disability,:Remarks)";

            OracleParameter[] parameters =
            {
                new OracleParameter(":Id",                OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Id
                },
                new OracleParameter(":HODA",              OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HODA
                },
                new OracleParameter(":EH",                OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.EH
                },
                new OracleParameter(":HBP",               OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HBP
                },
                new OracleParameter(":HBPTime",           OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.HBPTime
                },
                new OracleParameter(":GDM",               OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.GDM
                },
                new OracleParameter(":GDMTime",           OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.GDMTime
                },
                new OracleParameter(":CH",                OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.CH
                },
                new OracleParameter(":CHTime",            OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.CHTime
                },
                new OracleParameter(":COP",               OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.COP
                },
                new OracleParameter(":COPTime",           OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.COPTime
                },
                new OracleParameter(":MTC",               OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.MTC
                },
                new OracleParameter(":MTCTime",           OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.MTCTime
                },
                new OracleParameter(":Stroke",            OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Stroke
                },
                new OracleParameter(":StrokeTime",        OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.StrokeTime
                },
                new OracleParameter(":SMI",               OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.SMI
                },
                new OracleParameter(":SMITime",           OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.SMITime
                },
                new OracleParameter(":TB",                OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.TB
                },
                new OracleParameter(":TBTime",            OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.TBTime
                },
                new OracleParameter(":Hepatitis",         OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Hepatitis
                },
                new OracleParameter(":HepatitisTime",     OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.HepatitisTime
                },
                new OracleParameter(":OLID",              OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.OLID
                },
                new OracleParameter(":OLIDTime",          OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.OLIDTime
                },
                new OracleParameter(":OD",                OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.OD
                },
                new OracleParameter(":ODTime",            OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.ODTime
                },
                new OracleParameter(":Other",             OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Other
                },
                new OracleParameter(":OtherTime",         OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.OtherTime
                },
                new OracleParameter(":HistoryOfFather",   OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfFather
                },
                new OracleParameter(":HistoryOfMother",   OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfMother
                },
                new OracleParameter(":HistoryOfBrothers", OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfBrothers
                },
                new OracleParameter(":HistoryOfChildren", OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfChildren
                },
                new OracleParameter(":GeneticHistory",    OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.GeneticHistory
                },
                new OracleParameter(":Disability",        OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Disability
                },
                new OracleParameter(":Remarks",           OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Remarks
                }
            };
            return(SFL.OracleHelper.ExecuteNonQuery(sqlText, parameters));
        }
        /// <summary>
        /// 将居民疾病信息(ResidentDiseaseInfo)数据,根据主键“居民内部编号(Id)”采用UPDATE操作更新到数据库中,并返回受影响的行数。
        /// </summary>
        /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
        public override int Update(ResidentDiseaseInfo residentDiseaseInfo)
        {
            string sqlText = "UPDATE \"ResidentDiseaseInfo\" SET "
                             + "\"Id\"=:Id,\"HODA\"=:HODA,\"EH\"=:EH,\"HBP\"=:HBP,\"HBPTime\"=:HBPTime,\"GDM\"=:GDM,\"GDMTime\"=:GDMTime,\"CH\"=:CH,\"CHTime\"=:CHTime,\"COP\"=:COP,"
                             + "\"COPTime\"=:COPTime,\"MTC\"=:MTC,\"MTCTime\"=:MTCTime,\"Stroke\"=:Stroke,\"StrokeTime\"=:StrokeTime,\"SMI\"=:SMI,\"SMITime\"=:SMITime,\"TB\"=:TB,\"TBTime\"=:TBTime,"
                             + "\"Hepatitis\"=:Hepatitis,\"HepatitisTime\"=:HepatitisTime,\"OLID\"=:OLID,\"OLIDTime\"=:OLIDTime,\"OD\"=:OD,\"ODTime\"=:ODTime,\"Other\"=:Other,\"OtherTime\"=:OtherTime,"
                             + "\"HistoryOfFather\"=:HistoryOfFather,\"HistoryOfMother\"=:HistoryOfMother,\"HistoryOfBrothers\"=:HistoryOfBrothers,\"HistoryOfChildren\"=:HistoryOfChildren,"
                             + "\"GeneticHistory\"=:GeneticHistory,\"Disability\"=:Disability,\"Remarks\"=:Remarks "
                             + "WHERE \"Id\"=:Id";

            OracleParameter[] parameters =
            {
                new OracleParameter(":Id",                OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Id
                },
                new OracleParameter(":HODA",              OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HODA
                },
                new OracleParameter(":EH",                OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.EH
                },
                new OracleParameter(":HBP",               OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HBP
                },
                new OracleParameter(":HBPTime",           OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.HBPTime
                },
                new OracleParameter(":GDM",               OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.GDM
                },
                new OracleParameter(":GDMTime",           OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.GDMTime
                },
                new OracleParameter(":CH",                OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.CH
                },
                new OracleParameter(":CHTime",            OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.CHTime
                },
                new OracleParameter(":COP",               OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.COP
                },
                new OracleParameter(":COPTime",           OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.COPTime
                },
                new OracleParameter(":MTC",               OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.MTC
                },
                new OracleParameter(":MTCTime",           OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.MTCTime
                },
                new OracleParameter(":Stroke",            OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Stroke
                },
                new OracleParameter(":StrokeTime",        OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.StrokeTime
                },
                new OracleParameter(":SMI",               OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.SMI
                },
                new OracleParameter(":SMITime",           OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.SMITime
                },
                new OracleParameter(":TB",                OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.TB
                },
                new OracleParameter(":TBTime",            OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.TBTime
                },
                new OracleParameter(":Hepatitis",         OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Hepatitis
                },
                new OracleParameter(":HepatitisTime",     OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.HepatitisTime
                },
                new OracleParameter(":OLID",              OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.OLID
                },
                new OracleParameter(":OLIDTime",          OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.OLIDTime
                },
                new OracleParameter(":OD",                OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.OD
                },
                new OracleParameter(":ODTime",            OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.ODTime
                },
                new OracleParameter(":Other",             OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Other
                },
                new OracleParameter(":OtherTime",         OracleType.DateTime, 8)
                {
                    Value = residentDiseaseInfo.OtherTime
                },
                new OracleParameter(":HistoryOfFather",   OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfFather
                },
                new OracleParameter(":HistoryOfMother",   OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfMother
                },
                new OracleParameter(":HistoryOfBrothers", OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfBrothers
                },
                new OracleParameter(":HistoryOfChildren", OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.HistoryOfChildren
                },
                new OracleParameter(":GeneticHistory",    OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.GeneticHistory
                },
                new OracleParameter(":Disability",        OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Disability
                },
                new OracleParameter(":Remarks",           OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Remarks
                },
                new OracleParameter(":Id",                OracleType.NVarChar, 50)
                {
                    Value = residentDiseaseInfo.Id
                }
            };
            return(SFL.OracleHelper.ExecuteNonQuery(sqlText, parameters));
        }
Beispiel #11
0
 /// <summary>
 /// 从DataReader中读取数据,并为ResidentDiseaseInfo对象的所有属性赋值。该方法主要由该类的子类调用。
 /// </summary>
 /// <param name="sqlDataReader">IDataReader</param>
 /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
 protected void ReadResidentDiseaseInfoAllData(IDataReader dataReader, ResidentDiseaseInfo residentDiseaseInfo)
 {
     // 居民内部编号
     if (dataReader["Id"] != DBNull.Value)
     {
         residentDiseaseInfo.Id = Convert.ToString(dataReader["Id"]);
     }
     // 药物过敏史
     if (dataReader["HODA"] != DBNull.Value)
     {
         residentDiseaseInfo.HODA = Convert.ToString(dataReader["HODA"]);
     }
     // 暴露史
     if (dataReader["EH"] != DBNull.Value)
     {
         residentDiseaseInfo.EH = Convert.ToString(dataReader["EH"]);
     }
     // 高血压
     if (dataReader["HBP"] != DBNull.Value)
     {
         residentDiseaseInfo.HBP = Convert.ToString(dataReader["HBP"]);
     }
     // 高血压确诊时间
     if (dataReader["HBPTime"] != DBNull.Value)
     {
         residentDiseaseInfo.HBPTime = Convert.ToDateTime(dataReader["HBPTime"]);
     }
     // 糖尿病
     if (dataReader["GDM"] != DBNull.Value)
     {
         residentDiseaseInfo.GDM = Convert.ToString(dataReader["GDM"]);
     }
     // 糖尿病确诊时间
     if (dataReader["GDMTime"] != DBNull.Value)
     {
         residentDiseaseInfo.GDMTime = Convert.ToDateTime(dataReader["GDMTime"]);
     }
     // 冠心病
     if (dataReader["CH"] != DBNull.Value)
     {
         residentDiseaseInfo.CH = Convert.ToString(dataReader["CH"]);
     }
     // 冠心病确诊时间
     if (dataReader["CHTime"] != DBNull.Value)
     {
         residentDiseaseInfo.CHTime = Convert.ToDateTime(dataReader["CHTime"]);
     }
     // 慢性阻塞性肺疾病
     if (dataReader["COP"] != DBNull.Value)
     {
         residentDiseaseInfo.COP = Convert.ToString(dataReader["COP"]);
     }
     // 慢性阻塞性肺疾病确诊时间
     if (dataReader["COPTime"] != DBNull.Value)
     {
         residentDiseaseInfo.COPTime = Convert.ToDateTime(dataReader["COPTime"]);
     }
     // 恶性肿瘤
     if (dataReader["MTC"] != DBNull.Value)
     {
         residentDiseaseInfo.MTC = Convert.ToString(dataReader["MTC"]);
     }
     // 恶性肿瘤确诊时间
     if (dataReader["MTCTime"] != DBNull.Value)
     {
         residentDiseaseInfo.MTCTime = Convert.ToDateTime(dataReader["MTCTime"]);
     }
     // 脑卒中
     if (dataReader["Stroke"] != DBNull.Value)
     {
         residentDiseaseInfo.Stroke = Convert.ToString(dataReader["Stroke"]);
     }
     // 脑卒中确诊时间
     if (dataReader["StrokeTime"] != DBNull.Value)
     {
         residentDiseaseInfo.StrokeTime = Convert.ToDateTime(dataReader["StrokeTime"]);
     }
     // 重性精神
     if (dataReader["SMI"] != DBNull.Value)
     {
         residentDiseaseInfo.SMI = Convert.ToString(dataReader["SMI"]);
     }
     // 重性精神疾病确诊时间
     if (dataReader["SMITime"] != DBNull.Value)
     {
         residentDiseaseInfo.SMITime = Convert.ToDateTime(dataReader["SMITime"]);
     }
     // 结核病
     if (dataReader["TB"] != DBNull.Value)
     {
         residentDiseaseInfo.TB = Convert.ToString(dataReader["TB"]);
     }
     // 结核病确诊时间
     if (dataReader["TBTime"] != DBNull.Value)
     {
         residentDiseaseInfo.TBTime = Convert.ToDateTime(dataReader["TBTime"]);
     }
     // 肝炎
     if (dataReader["Hepatitis"] != DBNull.Value)
     {
         residentDiseaseInfo.Hepatitis = Convert.ToString(dataReader["Hepatitis"]);
     }
     // 肝炎确诊时间
     if (dataReader["HepatitisTime"] != DBNull.Value)
     {
         residentDiseaseInfo.HepatitisTime = Convert.ToDateTime(dataReader["HepatitisTime"]);
     }
     // 其他法定传染病
     if (dataReader["OLID"] != DBNull.Value)
     {
         residentDiseaseInfo.OLID = Convert.ToString(dataReader["OLID"]);
     }
     // 其他法定传染病确诊时间
     if (dataReader["OLIDTime"] != DBNull.Value)
     {
         residentDiseaseInfo.OLIDTime = Convert.ToDateTime(dataReader["OLIDTime"]);
     }
     // 职业病
     if (dataReader["OD"] != DBNull.Value)
     {
         residentDiseaseInfo.OD = Convert.ToString(dataReader["OD"]);
     }
     // 职业病确诊时间
     if (dataReader["ODTime"] != DBNull.Value)
     {
         residentDiseaseInfo.ODTime = Convert.ToDateTime(dataReader["ODTime"]);
     }
     // 其他
     if (dataReader["Other"] != DBNull.Value)
     {
         residentDiseaseInfo.Other = Convert.ToString(dataReader["Other"]);
     }
     // 其他确诊时间
     if (dataReader["OtherTime"] != DBNull.Value)
     {
         residentDiseaseInfo.OtherTime = Convert.ToDateTime(dataReader["OtherTime"]);
     }
     // 父亲病史
     if (dataReader["HistoryOfFather"] != DBNull.Value)
     {
         residentDiseaseInfo.HistoryOfFather = Convert.ToString(dataReader["HistoryOfFather"]);
     }
     // 母亲病史
     if (dataReader["HistoryOfMother"] != DBNull.Value)
     {
         residentDiseaseInfo.HistoryOfMother = Convert.ToString(dataReader["HistoryOfMother"]);
     }
     // 兄弟姐妹病史
     if (dataReader["HistoryOfBrothers"] != DBNull.Value)
     {
         residentDiseaseInfo.HistoryOfBrothers = Convert.ToString(dataReader["HistoryOfBrothers"]);
     }
     // 子女病史
     if (dataReader["HistoryOfChildren"] != DBNull.Value)
     {
         residentDiseaseInfo.HistoryOfChildren = Convert.ToString(dataReader["HistoryOfChildren"]);
     }
     // 遗传病史
     if (dataReader["GeneticHistory"] != DBNull.Value)
     {
         residentDiseaseInfo.GeneticHistory = Convert.ToString(dataReader["GeneticHistory"]);
     }
     // 残疾情况
     if (dataReader["Disability"] != DBNull.Value)
     {
         residentDiseaseInfo.Disability = Convert.ToString(dataReader["Disability"]);
     }
     // 备注
     if (dataReader["Remarks"] != DBNull.Value)
     {
         residentDiseaseInfo.Remarks = Convert.ToString(dataReader["Remarks"]);
     }
 }
Beispiel #12
0
 /// <summary>
 /// 将居民疾病信息(ResidentDiseaseInfo)数据,根据主键“居民内部编号(Id)”采用UPDATE操作更新到数据库中,并返回受影响的行数。
 /// </summary>
 /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
 public abstract int Update(ResidentDiseaseInfo residentDiseaseInfo);
Beispiel #13
0
        //﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉
        //  公共数据访问类抽象方法定义,在SqlServer/Oracle/OleDb子类中实现具体方法。
        //﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍﹍


        /// <summary>
        /// 将居民疾病信息(ResidentDiseaseInfo)数据,采用INSERT操作插入到数据库中,并返回受影响的行数。
        /// </summary>
        /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
        public abstract int Insert(ResidentDiseaseInfo residentDiseaseInfo);
Beispiel #14
0
        /// <summary>
        /// 对居民疾病信息(ResidentDiseaseInfo)实例对象,进行数据有效性检查。
        /// </summary>
        /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
        public static void CheckValid(ResidentDiseaseInfo residentDiseaseInfo)
        {
            #region 检查各属性是否符合空值约束
            if (DataValid.IsNull(residentDiseaseInfo.Id))
            {
                throw new CustomException("“居民内部编号”不能为空,请您确认输入是否正确。");
            }

            #endregion

            #region 检查字符串是否超出规定长度
            if (DataValid.IsOutLength(residentDiseaseInfo.Id, 50))
            {
                throw new CustomException("“居民内部编号”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HODA, 50))
            {
                throw new CustomException("“药物过敏史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.EH, 50))
            {
                throw new CustomException("“暴露史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HBP, 50))
            {
                throw new CustomException("“高血压”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.GDM, 50))
            {
                throw new CustomException("“糖尿病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.CH, 50))
            {
                throw new CustomException("“冠心病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.COP, 50))
            {
                throw new CustomException("“慢性阻塞性肺疾病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.MTC, 50))
            {
                throw new CustomException("“恶性肿瘤”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.Stroke, 50))
            {
                throw new CustomException("“脑卒中”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.SMI, 50))
            {
                throw new CustomException("“重性精神”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.TB, 50))
            {
                throw new CustomException("“结核病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.Hepatitis, 50))
            {
                throw new CustomException("“肝炎”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.OLID, 50))
            {
                throw new CustomException("“其他法定传染病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.OD, 50))
            {
                throw new CustomException("“职业病”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.Other, 50))
            {
                throw new CustomException("“其他”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HistoryOfFather, 50))
            {
                throw new CustomException("“父亲病史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HistoryOfMother, 50))
            {
                throw new CustomException("“母亲病史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HistoryOfBrothers, 50))
            {
                throw new CustomException("“兄弟姐妹病史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.HistoryOfChildren, 50))
            {
                throw new CustomException("“子女病史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.GeneticHistory, 50))
            {
                throw new CustomException("“遗传病史”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.Disability, 50))
            {
                throw new CustomException("“残疾情况”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            if (DataValid.IsOutLength(residentDiseaseInfo.Remarks, 50))
            {
                throw new CustomException("“备注”长度不能超过 50 个汉字或字符,请您确认输入是否正确。");
            }

            #endregion
        }
Beispiel #15
0
 /// <summary>
 /// 将居民疾病信息(ResidentDiseaseInfo)数据,根据主键“居民内部编号(Id)”采用UPDATE操作更新到数据库中,并返回受影响的行数。
 /// </summary>
 /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
 public static int Update(ResidentDiseaseInfo residentDiseaseInfo)
 {
     CheckValid(residentDiseaseInfo);
     return(DataAccess.Update(residentDiseaseInfo));
 }
Beispiel #16
0
 /// <summary>
 /// 将居民疾病信息(ResidentDiseaseInfo)数据,采用INSERT操作插入到数据库中,并返回受影响的行数。
 /// </summary>
 /// <param name="residentDiseaseInfo">居民疾病信息(ResidentDiseaseInfo)实例对象</param>
 public static int Insert(ResidentDiseaseInfo residentDiseaseInfo)
 {
     CheckValid(residentDiseaseInfo);
     return(DataAccess.Insert(residentDiseaseInfo));
 }