using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; namespace testtest
{
class PersonHabit
{
private int userid; public int Userid
{
get { return userid; }
set { userid = value; }
} private int age; public int Age
{
get { return age; }
set { age = value; }
}
private int sex; public int Sex //0为男,1为女,2为不男不女
{
get { return sex; }
set { sex = value; }
} private DateTime LHSetTime; public DateTime LHSetTime1
{
get { return LHSetTime; }
set { LHSetTime = value; }
}
private int dietHabit; public int DietHabit
{
get { return dietHabit; }
set { dietHabit = value; }
}
private int drinkHabit; public int DrinkHabit
{
get { return drinkHabit; }
set { drinkHabit = value; }
}
private int sportHabit; public int SportHabit
{
get { return sportHabit; }
set { sportHabit = value; }
}
private int smokeHabit; public int SmokeHabit
{
get { return smokeHabit; }
set { smokeHabit = value; }
}
private int sleepHabit; public int SleepHabit
{
get { return sleepHabit; }
set { sleepHabit = value; }
} public PersonHabit()
{
Random rd = new Random();
//LHSetTime = new DateTime(System.DateTime.Now.Millisecond);
Random random = new Random((int)(DateTime.Now.Ticks));
int hour = random.Next(2, 5);
int minute = random.Next(0, 60);
int second = random.Next(0, 60);
string tempStr = string.Format("{0} {1}:{2}:{3}", DateTime.Now.ToString("yyyy-MM-dd"), hour, minute, second);
LHSetTime = Convert.ToDateTime(tempStr);
//Console.WriteLine(rTime.ToString()); dietHabit = rd.Next(0, 4);
drinkHabit = rd.Next(0, 4);
sportHabit = rd.Next(0, 4);
smokeHabit = rd.Next(0, 4);
sleepHabit = rd.Next(0, 4);
} public PersonHabit(int nAge, int nSex)
{ age = nAge;
sex = nSex; //LHSetTime = new DateTime(System.DateTime.Now.Millisecond);
Random random = new Random((int)(DateTime.Now.Ticks));
int hour = random.Next(2, 5);
int minute = random.Next(0, 60);
int second = random.Next(0, 60);
string tempStr = string.Format("{0} {1}:{2}:{3}", DateTime.Now.ToString("yyyy-MM-dd"), hour, minute, second);
LHSetTime = Convert.ToDateTime(tempStr);
//Console.WriteLine(rTime.ToString());
//造时间数据
// int flag = 4; if (1 <= nAge && nAge <= 18)
{ // flag = 2; int[] data={0,0,0,0,0};
data = makeDataOneEighteen();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (19 <= nAge && nAge <= 35 && nSex == 0)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataNinteenThirtyFiveMale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (19 <= nAge && nAge <= 35 && nSex == 1)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataNinteenThirtyFiveFemale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (36 <= nAge && nAge <= 50 && nSex == 0)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataThirtySixFiftyMale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (36 <= nAge && nAge <= 50 && nSex == 1)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataThirtySixFiftyFemale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (51 <= nAge && nAge <= 75 && nSex == 0)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataFiftyOneSeventyFiveMale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (51 <= nAge && nAge <= 75 && nSex == 1)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataFiftyOneSeventyFiveFemale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
} public static int[] makeDataOneEighteen() //1-18年龄段划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将1-18岁年龄段按照14:4:1:1的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 13)
index1 = 0;
else if (flag1 >= 14 && flag1 <= 17)
index1 = 1;
else if (flag1 == 18)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将1-18岁年龄段按照8:8:2:2的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 7)
index2 = 0;
else if (flag2 >= 8 && flag2 <= 15)
index2 = 1;
else if (flag2 == 16 || flag2 == 17)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将1-18岁年龄段按照5:8:5:2的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 4)
index3 = 0;
else if (flag3 >= 5 && flag3 <= 12)
index3 = 1;
else if (flag3 >= 13 && flag3 <= 17)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将1-18岁年龄段按照8:5:3:4的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 7)
index4 = 0;
else if (flag4 >= 8 && flag4 <= 12)
index4 = 1;
else if (flag4 == 13 || flag4 == 15)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将1-18岁年龄段按照8:6:4:2的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 7)
index5 = 0;
else if (flag5 >= 8 && flag5 <= 13)
index5 = 1;
else if (flag5 >= 14 && flag5 <= 17)
index5 = 2;
else
index5 = 3; int[] data = {0,0,0,0,0};
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataNinteenThirtyFiveMale() //19-35年龄段男性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照2:6:8:4的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 1)
index1 = 0;
else if (flag1 >= 2 && flag1 <= 7)
index1 = 1;
else if (flag1 >= 8 && flag1 <= 17)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照10:6:2:2的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 9)
index2 = 0;
else if (flag2 >= 10 && flag2 <= 15)
index2 = 1;
else if (flag2 >= 16 && flag2 <= 17)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照4:6:6:6的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 3)
index3 = 0;
else if (flag3 >= 4 && flag3 <= 9)
index3 = 1;
else if (flag3 >= 10 && flag3 <= 15)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照4:2:4:10的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 3)
index4 = 0;
else if (flag4 >= 4 && flag4 <= 5)
index4 = 1;
else if (flag4 >= 6 && flag4 <= 9)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照6:4:4:6的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 5)
index5 = 0;
else if (flag5 >= 6 && flag5 <= 9)
index5 = 1;
else if (flag5 >= 10 && flag5 <= 13)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataNinteenThirtyFiveFemale() //19-35年龄段女性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照3:8:7:2的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 2)
index1 = 0;
else if (flag1 >= 3 && flag1 <= 10)
index1 = 1;
else if (flag1 >= 11 && flag1 <= 17)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照12:6:1:1的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 11)
index2 = 0;
else if (flag2 >= 12 && flag2 <= 17)
index2 = 1;
else if (flag2 >= 18 && flag2 <= 18)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照4:5:7:4的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 3)
index3 = 0;
else if (flag3 >= 4 && flag3 <= 8)
index3 = 1;
else if (flag3 >= 9 && flag3 <= 15)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照8:6:4:2的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 7)
index4 = 0;
else if (flag4 >= 8 && flag4 <= 13)
index4 = 1;
else if (flag4 >= 14 && flag4 <= 17)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照10:6:2:2的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 9)
index5 = 0;
else if (flag5 >= 10 && flag5 <= 15)
index5 = 1;
else if (flag5 >= 16 && flag5 <= 17)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataThirtySixFiftyMale() //36-50年龄段男性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照4:8:6:2的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 3)
index1 = 0;
else if (flag1 >= 4 && flag1 <= 11)
index1 = 1;
else if (flag1 >= 12 && flag1 <= 17)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照6:6:4:4的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 0)
index2 = 0;
else if (flag2 >= 1 && flag2 <= 3)
index2 = 1;
else if (flag2 >= 4 && flag2 <= 11)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照2:6:4:8的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 1)
index3 = 0;
else if (flag3 >= 2 && flag3 <= 7)
index3 = 1;
else if (flag3 >= 8 && flag3 <= 11)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照2:2:10:6的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 2)
index4 = 0;
else if (flag4 >= 3 && flag4 <= 4)
index4 = 1;
else if (flag4 >= 5 && flag4 <= 14)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照3:5:4:8的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 2)
index5 = 0;
else if (flag5 >= 3 && flag5 <= 7)
index5 = 1;
else if (flag5 >= 8 && flag5 <= 11)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataThirtySixFiftyFemale() //36-50年龄段女性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照6:8:4:2的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 5)
index1 = 0;
else if (flag1 >= 6 && flag1 <= 13)
index1 = 1;
else if (flag1 >= 14 && flag1 <= 17)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照7:6:6:1的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 6)
index2 = 0;
else if (flag2 >= 7 && flag2 <= 12)
index2 = 1;
else if (flag2 >= 13 && flag2 <= 18)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照3:3:4:10的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 2)
index3 = 0;
else if (flag3 >= 3 && flag3 <= 5)
index3 = 1;
else if (flag3 >= 6 && flag3 <= 9)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照7:6:5:2的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 6)
index4 = 0;
else if (flag4 >= 7 && flag4 <= 12)
index4 = 1;
else if (flag4 >= 13 && flag4 <= 17)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照12:4:3:1的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 11)
index5 = 0;
else if (flag5 >= 12 && flag5 <= 15)
index5 = 1;
else if (flag5 >= 16 && flag5 <= 18)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataFiftyOneSeventyFiveMale() //51-75年龄段男性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照2:6:6:6的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 1)
index1 = 0;
else if (flag1 >= 2 && flag1 <= 7)
index1 = 1;
else if (flag1 >= 8 && flag1 <= 13)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照1:3:8:8的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 0)
index2 = 0;
else if (flag2 >= 1 && flag2 <= 3)
index2 = 1;
else if (flag2 >= 4 && flag2 <= 11)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照1:3:4:12的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 0)
index3 = 0;
else if (flag3 >= 1 && flag3 <= 3)
index3 = 1;
else if (flag3 >= 4 && flag3 <= 7)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照1:4:8:7的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 0)
index4 = 0;
else if (flag4 >= 1 && flag4 <= 4)
index4 = 1;
else if (flag4 >= 5 && flag4 <= 12)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照2:2:6:10的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 1)
index5 = 0;
else if (flag5 >= 2 && flag5 <= 3)
index5 = 1;
else if (flag5 >= 4 && flag5 <= 9)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataFiftyOneSeventyFiveFemale() //51-75年龄段女性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照6:4:8:2的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 5)
index1 = 0;
else if (flag1 >= 6 && flag1 <= 9)
index1 = 1;
else if (flag1 >= 10 && flag1 <= 17)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照4:4:10:2的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 3)
index2 = 0;
else if (flag2 >= 4 && flag2 <= 7)
index2 = 1;
else if (flag2 >= 8 && flag2 <= 17)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照1:3:8:8的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 0)
index3 = 0;
else if (flag3 >= 1 && flag3 <= 3)
index3 = 1;
else if (flag3 >= 4 && flag3 <= 11)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照2:8:6:4的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 1)
index4 = 0;
else if (flag4 >= 2 && flag4 <= 9)
index4 = 1;
else if (flag4 >= 10 && flag4 <= 15)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照14:4:1:1的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 13)
index5 = 0;
else if (flag5 >= 14 && flag5 <= 17)
index5 = 1;
else if (flag5 >= 18 && flag5 <= 18)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public void print()
{
Console.WriteLine("当前时间段:" + LHSetTime);
Console.WriteLine("饮食习惯 :" + change(dietHabit));
Console.WriteLine("饮酒习惯 :" + change(drinkHabit));
Console.WriteLine("运动习惯 :" + change(sportHabit));
Console.WriteLine("抽烟习惯 :" + change(smokeHabit));
Console.WriteLine("睡眠习惯 :" + change(sleepHabit));
}
public String change(int value)
{
String flag = "异类";
switch (value)
{
case 0:
flag = "优";break;
case 1:
flag = "良";break;
case 2:
flag = "中";break;
case 3:
flag = "差";break;
}
return flag;
}
} }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data.Sql; namespace testtest
{
class Program
{ public static void sqlExcute(String sql)
{
string connectionString = "Server = 10.255.97.137;" + "Database = Diseasemonitor;" + "User ID = sa;" +
"Password = 123456;";
SqlConnection conn = new SqlConnection(connectionString);
try
{
conn.Open();
SqlCommand comm = new SqlCommand(sql, conn);
comm.ExecuteReader();
}
catch (Exception e)
{ //出现异常显示
Console.WriteLine("模拟数据插入发生错误...");
}
finally
{ //关闭数据库连接,避免占用
conn.Close();
} } public static int querySqlExcute(String sql)
{
int flag;
string connectionString = "Server = 10.255.97.137;" + "Database = Diseasemonitor;" + "User ID = sa;" +
"Password = 123456;";
SqlConnection conn = new SqlConnection(connectionString);
try
{
conn.Open();
SqlCommand comm = new SqlCommand(sql, conn);
SqlDataReader dataReader = comm.ExecuteReader(); // 判断数据是否读到尾.
// while (dataReader.Read())
flag = int.Parse(dataReader[0].ToString());
return flag;
}
catch (Exception e)
{ //出现异常显示
Console.WriteLine("数据查询发生错误...");
}
finally
{ //关闭数据库连接,避免占用
conn.Close();
}
return 999999;
} public static String change(int value)
{
String flag = "异类";
switch (value)
{
case 0:
flag = "优"; break;
case 1:
flag = "良"; break;
case 2:
flag = "中"; break;
case 3:
flag = "差"; break;
}
return flag;
} //高血压病态模拟生成数据 public static String changeSex(int value)
{
String flag = "男";
//flag = (value==0):"男"?"女";
if (value == 0)
flag = "男";
else
flag = "女";
return flag; } // public static void static void Main(string[] args)
{
Console.WriteLine("请输入你需要生成多少人的数据以及年龄最大值(75以内):");
int flag,end,maxAge;
flag = int.Parse(Console.ReadLine());
maxAge = int.Parse(Console.ReadLine()); Random rd = new Random();
Random rdd = new Random();
//数据生成
for (int i = 0; i < flag; i++)
{ int age = rd.Next(1, maxAge+1);
int sex = rdd.Next(0, 2);
PersonHabit ph = new PersonHabit(age,sex);//这里随机构造出年龄和性别 Console.WriteLine("年龄:"+age+" 性别:"+((sex==0)?"男":"女"));
//ph.Userid = i + 1;
string sql =
"insert into LiftHabit(LHSetTime, age, sex, dietHabit, drinkHabit,sportHabit,smokeHabit,sleepHabit) values ('"
+ ph.LHSetTime1 + "', '" + ph.Age + "', '" + changeSex(ph.Sex) + "', '" + change(ph.DietHabit) + "', '" + change(ph.DrinkHabit) + "', '" +
change(ph.SportHabit) + "', '" + change(ph.SmokeHabit) + "', '" + change(ph.SleepHabit) + "')";
sqlExcute(sql);
Console.WriteLine("正在生成数据中... 当前为第"+(i+1)+"个人");
//System.Threading.Thread.Sleep(2000);
if (i == flag)
break;
//ph.print();
}
Console.WriteLine("数据生成完毕...\n***************按0键直接退出,按3键删除生成数据退出...***************");
end = int.Parse(Console.ReadLine());
if (end == 3)
{
//拼装sql
String sql = "delete from LiftHabit";
sqlExcute(sql);
Console.WriteLine("数据删除完毕...");
} for (int i = 1; i <= 75; i++)
Console.WriteLine(i); return;
}
}
}

C#的大作业,一个大项目,分成很多小块,自己做的小块内容,代码分享给大家

代码写的有点乱,相关的文件(源码以及数据库脚本)我已经上传了,大家可以下载测试下,本程序仅供做测试用途

C#-高血压生活习惯数据模拟的更多相关文章

  1. 推荐一款健康App 多喝水,引领全民时尚喝水生活习惯

    推荐一款健康App 多喝水,引领全民时尚喝水生活习惯 1 介绍 多喝水,一款鼓励大众喝水的APP.我们倡导大众健康生活,培养人们爱喝水的习惯,让每一次喝水,都能产生价值,让人们在喝水的同时,可享受赚钱 ...

  2. MacOS下的生活——RescueTime,时间规划利器

    前段时间Yxj同学给我推荐了一款可以记录电脑及手机使用时间分类的软件,据说Mac平台下也支持,当时就有了兴趣,但是好像因为什么事给耽搁了,知道今天下午看到Yxj在看这个软件记录的自己的时间表,才觉得这 ...

  3. Be Better:遇见更好的自己-2016年记

    其实并不能找到好的词语来形容过去的一年,感觉就如此平淡的过了!没有了毕业的稚气,看事情淡了,少了一丝浮躁,多了一分认真.2016也许就是那句话-多读书,多看报,少吃零食多睡觉,而我更愿意说--Be B ...

  4. [网站性能1]对.net系统架构改造的一点经验和教训

    文章来源:http://www.admin10000.com/document/2111.html 在互联网行业,基于Unix/Linux的网站系统架构毫无疑问是当今主流的架构解决方案,这不仅仅是因为 ...

  5. 谈初学Java历程

    学习Java一个月左右,本来很早就想好好静下心来写一点东西了.但由于不想手写,文档写了不知道放在哪好,所以一直拖着.最近注册了博客园,还是挺方便的. 即将大学毕业了,则面临了所以大学生所面临的问题,就 ...

  6. u3d_Shader_effects笔记6 第四章 使用cubeMap简单的反射读取

    一:前面心情: 1.今天开了个小会,该看的继续要看,不要堕落. 2.还有就是丽的生活习惯不太好.慢慢改变. 3.哎,公司人员争夺吗?哎,不知道,不了解,不去想,提升自己,内心明净 二.主要内容和参考 ...

  7. one_person年轻的程序员

    回顾大学三年,通过良师的教导和自身的刻苦学习,我已初步掌握如何运用计算机编程,也养成了认真对待学习和工作的好习惯! 在思想品德上,本人有良好道德修养,并有坚定的政治方向.我热爱祖国,热爱人民,遵纪守法 ...

  8. 论文 查重 知网 万方 paperpass

    相信各个即将毕业的学生或在岗需要评职称.发论文的职场人士,论文检测都是必不可少的一道程序.面对市场上五花八门的检测软件,到底该如何选择?选择查重后到底该如何修改?现在就做一个知识的普及.其中对于中国的 ...

  9. 医院管理者必须知道的医院客户关系管理(CRM)

    客户关系管理(customer relationship management,CRM)是在二战之后首先由美国IBM.道氏.通用等大型企业提出并运用的一种以有效销售为目的的市场营销思想,其理论基础就是 ...

随机推荐

  1. C#操作xml的3种方式

    C#操作Xml有很多种方式,这里写出个人常使用的三种方式 XmlDocument DataSet linq to xml  首先声明本次操作使用的xml文件:books.xml:内容如下 <?x ...

  2. bzoj2395: [Balkan 2011]Timeismoney

    Description      有n个城市(编号从0..n-1),m条公路(双向的),从中选择n-1条边,使得任意的两个城市能够连通,一条边需要的c的费用和t的时间,定义一个方案的权值v=n-1条边 ...

  3. BZOJ 1501 智慧珠游戏

    Description Input 文件中包含初始的盘件描述,一共有10行,第i行有i个字符.如果第i行的第j个字符是字母”A”至”L”中的一个,则表示第i行第j列的格子上已经放了零件,零件的编号为对 ...

  4. MSP430的IO口模拟I2C总线对AT24C25进行读写程序

    功能: 实现MSP430口线模拟I2C总线协议与24C04通信.                                           ** 描述: 主系统工作时钟为12MHz,I2C工 ...

  5. ARM单片机的头文件如何用结构体定义地址

    下面我们以ARM Cortex-M0内核单片机LPC1114的头文件lpc11xx.h文件进行说明. 1.先说两句 lpc11xx.h文件是lpc11xx系列单片机包含的头文件.这个文件的作用和51单 ...

  6. Linxu安装Lamp环境

    安装MySQL数据库 sudo apt-get install mysql-server mysql-client 下图为提示输入数据库密码,然后回车,之后还有提示,再重复输入一次,再回车 最后安装完 ...

  7. 【HDOJ】1903 Exchange Rates

    水DP.精度很坑. /* hdoj 1903 */ #include <cstdio> #include <cstring> #include <cstdlib> ...

  8. [LeetCode#104, 111]Maximum Depth of Binary Tree, Minimum Depth of Binary Tree

    The problem 1: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes ...

  9. 【JavaScript】

    右键禁用.防止文字选中 .返回选中的文本 JavaScript 原理 Javascript高性能动画与页面渲染 前端不为人知的一面--前端冷知识集锦 屏幕外去计算值,position:absolute ...

  10. 2015第40周二Node学习

    node历史 今天看cnode开源项目用了io.js,在查这个项目时发现这篇文章node历史,node.js和io.js关系谈到Node.js的由来,不可避免要聊到它的创始人Ryan Dahl.在20 ...