/// <summary> /// 增加一条数据 /// </summary> public int Add(Maticsoft.Model.record_HealthCheck model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into record_HealthCheck("); strSql.Append("H_BodyTemperature,H_PulseRate,H_RespiratoryRate,H_LeftDiastolic,H_LeftSystolic,H_RightDiastolic,H_RightSystolic,H_Height,H_Weight,H_Result,H_Suggestion,H_CheckTime,H_MedicalInstitutions,H_CheckUserID)"); strSql.Append(" values ("); strSql.Append("@H_BodyTemperature,@H_PulseRate,@H_RespiratoryRate,@H_LeftDiastolic,@H_LeftSystolic,@H_RightDiastolic,@H_RightSystolic,@H_Height,@H_Weight,@H_Result,@H_Suggestion,@H_CheckTime,@H_MedicalInstitutions,@H_CheckUserID)"); strSql.Append(";select @@IDENTITY"); SqlParameter[] parameters = { new SqlParameter("@H_BodyTemperature", SqlDbType.Float, 8), new SqlParameter("@H_PulseRate", SqlDbType.TinyInt, 1), new SqlParameter("@H_RespiratoryRate", SqlDbType.TinyInt, 1), new SqlParameter("@H_LeftDiastolic", SqlDbType.TinyInt, 1), new SqlParameter("@H_LeftSystolic", SqlDbType.TinyInt, 1), new SqlParameter("@H_RightDiastolic", SqlDbType.TinyInt, 1), new SqlParameter("@H_RightSystolic", SqlDbType.TinyInt, 1), new SqlParameter("@H_Height", SqlDbType.TinyInt, 1), new SqlParameter("@H_Weight", SqlDbType.TinyInt, 1), new SqlParameter("@H_Result", SqlDbType.Text), new SqlParameter("@H_Suggestion", SqlDbType.Text), new SqlParameter("@H_CheckTime", SqlDbType.DateTime), new SqlParameter("@H_MedicalInstitutions", SqlDbType.Int, 4), new SqlParameter("@H_CheckUserID", SqlDbType.Int, 4) }; parameters[0].Value = model.H_BodyTemperature; parameters[1].Value = model.H_PulseRate; parameters[2].Value = model.H_RespiratoryRate; parameters[3].Value = model.H_LeftDiastolic; parameters[4].Value = model.H_LeftSystolic; parameters[5].Value = model.H_RightDiastolic; parameters[6].Value = model.H_RightSystolic; parameters[7].Value = model.H_Height; parameters[8].Value = model.H_Weight; parameters[9].Value = model.H_Result; parameters[10].Value = model.H_Suggestion; parameters[11].Value = model.H_CheckTime; parameters[12].Value = model.H_MedicalInstitutions; parameters[13].Value = model.H_CheckUserID; object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters); if (obj == null) { return(0); } else { return(Convert.ToInt32(obj)); } }
private void ShowInfo(int HealthID) { Maticsoft.BLL.record_HealthCheck bll = new Maticsoft.BLL.record_HealthCheck(); Maticsoft.Model.record_HealthCheck model = bll.GetModel(HealthID); this.lblHealthID.Text = model.HealthID.ToString(); this.lblH_BodyTemperature.Text = model.H_BodyTemperature.ToString(); this.lblH_PulseRate.Text = model.H_PulseRate.ToString(); this.lblH_RespiratoryRate.Text = model.H_RespiratoryRate.ToString(); this.lblH_LeftDiastolic.Text = model.H_LeftDiastolic.ToString(); this.lblH_LeftSystolic.Text = model.H_LeftSystolic.ToString(); this.lblH_RightDiastolic.Text = model.H_RightDiastolic.ToString(); this.lblH_RightSystolic.Text = model.H_RightSystolic.ToString(); this.lblH_Height.Text = model.H_Height.ToString(); this.lblH_Weight.Text = model.H_Weight.ToString(); this.lblH_Result.Text = model.H_Result; this.lblH_Suggestion.Text = model.H_Suggestion; this.lblH_CheckTime.Text = model.H_CheckTime.ToString(); this.lblH_MedicalInstitutions.Text = model.H_MedicalInstitutions.ToString(); this.lblH_CheckUserID.Text = model.H_CheckUserID.ToString(); }
/// <summary> /// 点击确定按钮执行的方法 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Button1_Click(object sender, EventArgs e) { Maticsoft.BLL.record_HealthCheck bll = new Maticsoft.BLL.record_HealthCheck(); Maticsoft.Model.record_HealthCheck model = bll.GetModel(HealthID); if (model == null) { model = new Maticsoft.Model.record_HealthCheck(); model.H_UserID = UserID; } model.H_BodyTemperature = Convert.ToDecimal(Common.sink(this.H_BodyTemperature.UniqueID, MethodType.Post, 0, 0, DataType.Double)); model.H_PulseRate = (int)Common.sink(this.H_PulseRate.UniqueID, MethodType.Post, 0, 0, DataType.Int); model.H_RespiratoryRate = (int)Common.sink(this.H_RespiratoryRate.UniqueID, MethodType.Post, 0, 0, DataType.Int); model.H_LeftDiastolic = (int)Common.sink(this.H_LeftDiastolic.UniqueID, MethodType.Post, 0, 0, DataType.Int); model.H_LeftSystolic = (int)Common.sink(this.H_LeftSystolic.UniqueID, MethodType.Post, 0, 0, DataType.Int); model.H_RightDiastolic = (int)Common.sink(this.H_RightDiastolic.UniqueID, MethodType.Post, 0, 0, DataType.Int); model.H_RightSystolic = (int)Common.sink(this.H_RightSystolic.UniqueID, MethodType.Post, 0, 0, DataType.Int); model.H_Weight = (int)Common.sink(this.H_Weight.UniqueID, MethodType.Post, 0, 0, DataType.Int); model.H_Height =(int) Common.sink(this.H_Height.UniqueID, MethodType.Post, 0, 0, DataType.Int); model.H_Result = (string)Common.sink(this.H_Result.UniqueID, MethodType.Post, 0, 0, DataType.Str); model.H_Suggestion = (string)Common.sink(this.H_Suggestion.UniqueID, MethodType.Post, 0, 0, DataType.Str); model.H_CheckTime = (DateTime)Common.sink(this.H_CheckTime.UniqueID, MethodType.Post, 0, 0, DataType.Dat); model.H_CheckUserID = UserData.GetUserDate.UserID; switch (CMD) { case "New": CMD_Txt = "增加"; model.HealthID = bll.Add(model); break; case "Edit": CMD_Txt = "修改"; bll.Update(model); break; } All_Title_Txt = CMD_Txt + App_Txt; EventMessage.MessageBox(1, "操作成功", string.Format("{1}ID({0})成功!", model.HealthID, All_Title_Txt), Icon_Type.OK, Common.GetHomeBaseUrl("HealthCheckList.aspx?UserID=" + model.H_UserID)); }
/// <summary> /// 得到一个对象实体 /// </summary> public Maticsoft.Model.record_HealthCheck GetModel(int HealthID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 HealthID,H_BodyTemperature,H_PulseRate,H_RespiratoryRate,H_LeftDiastolic,H_LeftSystolic,H_RightDiastolic,H_RightSystolic,H_Height,H_Weight,H_Result,H_Suggestion,H_CheckTime,H_MedicalInstitutions,H_CheckUserID from record_HealthCheck "); strSql.Append(" where HealthID=@HealthID"); SqlParameter[] parameters = { new SqlParameter("@HealthID", SqlDbType.Int, 4) }; parameters[0].Value = HealthID; Maticsoft.Model.record_HealthCheck model = new Maticsoft.Model.record_HealthCheck(); DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { return(DataRowToModel(ds.Tables[0].Rows[0])); } else { return(null); } }
public void btnSave_Click(object sender, EventArgs e) { string strErr=""; if(!PageValidate.IsDecimal(txtH_BodyTemperature.Text)) { strErr+="体温格式错误!\\n"; } if(!PageValidate.IsNumber(txtH_PulseRate.Text)) { strErr+="脉率(次/min)格式错误!\\n"; } if(!PageValidate.IsNumber(txtH_RespiratoryRate.Text)) { strErr+="呼吸频率(次/min)格式错误!\\n"; } if(!PageValidate.IsNumber(txtH_LeftDiastolic.Text)) { strErr+="左侧舒张压(mmHg)格式错误!\\n"; } if(!PageValidate.IsNumber(txtH_LeftSystolic.Text)) { strErr+="左侧收缩压(mmHg)格式错误!\\n"; } if(!PageValidate.IsNumber(txtH_RightDiastolic.Text)) { strErr+="右侧舒张压(mmHg)格式错误!\\n"; } if(!PageValidate.IsNumber(txtH_RightSystolic.Text)) { strErr+="右侧收缩压(mmHg)格式错误!\\n"; } if(!PageValidate.IsNumber(txtH_Height.Text)) { strErr+="身高(cm)格式错误!\\n"; } if(!PageValidate.IsNumber(txtH_Weight.Text)) { strErr+="体重(kg)格式错误!\\n"; } if(this.txtH_Result.Text.Trim().Length==0) { strErr+="体检结果不能为空!\\n"; } if(this.txtH_Suggestion.Text.Trim().Length==0) { strErr+="体检建议不能为空!\\n"; } if(!PageValidate.IsDateTime(txtH_CheckTime.Text)) { strErr+="体检时间格式错误!\\n"; } if(!PageValidate.IsNumber(txtH_MedicalInstitutions.Text)) { strErr+="体检机构格式错误!\\n"; } if(!PageValidate.IsNumber(txtH_CheckUserID.Text)) { strErr+="体检医生格式错误!\\n"; } if(strErr!="") { MessageBox.Show(this,strErr); return; } int HealthID=int.Parse(this.lblHealthID.Text); decimal H_BodyTemperature=decimal.Parse(this.txtH_BodyTemperature.Text); int H_PulseRate=int.Parse(this.txtH_PulseRate.Text); int H_RespiratoryRate=int.Parse(this.txtH_RespiratoryRate.Text); int H_LeftDiastolic=int.Parse(this.txtH_LeftDiastolic.Text); int H_LeftSystolic=int.Parse(this.txtH_LeftSystolic.Text); int H_RightDiastolic=int.Parse(this.txtH_RightDiastolic.Text); int H_RightSystolic=int.Parse(this.txtH_RightSystolic.Text); int H_Height=int.Parse(this.txtH_Height.Text); int H_Weight=int.Parse(this.txtH_Weight.Text); string H_Result=this.txtH_Result.Text; string H_Suggestion=this.txtH_Suggestion.Text; DateTime H_CheckTime=DateTime.Parse(this.txtH_CheckTime.Text); int H_MedicalInstitutions=int.Parse(this.txtH_MedicalInstitutions.Text); int H_CheckUserID=int.Parse(this.txtH_CheckUserID.Text); Maticsoft.Model.record_HealthCheck model=new Maticsoft.Model.record_HealthCheck(); model.HealthID=HealthID; model.H_BodyTemperature=H_BodyTemperature; model.H_PulseRate=H_PulseRate; model.H_RespiratoryRate=H_RespiratoryRate; model.H_LeftDiastolic=H_LeftDiastolic; model.H_LeftSystolic=H_LeftSystolic; model.H_RightDiastolic=H_RightDiastolic; model.H_RightSystolic=H_RightSystolic; model.H_Height=H_Height; model.H_Weight=H_Weight; model.H_Result=H_Result; model.H_Suggestion=H_Suggestion; model.H_CheckTime=H_CheckTime; model.H_MedicalInstitutions=H_MedicalInstitutions; model.H_CheckUserID=H_CheckUserID; Maticsoft.BLL.record_HealthCheck bll=new Maticsoft.BLL.record_HealthCheck(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx"); }
protected void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (!PageValidate.IsDecimal(txtH_BodyTemperature.Text)) { strErr += "体温格式错误!\\n"; } if (!PageValidate.IsNumber(txtH_PulseRate.Text)) { strErr += "脉率(次/min)格式错误!\\n"; } if (!PageValidate.IsNumber(txtH_RespiratoryRate.Text)) { strErr += "呼吸频率(次/min)格式错误!\\n"; } if (!PageValidate.IsNumber(txtH_LeftDiastolic.Text)) { strErr += "左侧舒张压(mmHg)格式错误!\\n"; } if (!PageValidate.IsNumber(txtH_LeftSystolic.Text)) { strErr += "左侧收缩压(mmHg)格式错误!\\n"; } if (!PageValidate.IsNumber(txtH_RightDiastolic.Text)) { strErr += "右侧舒张压(mmHg)格式错误!\\n"; } if (!PageValidate.IsNumber(txtH_RightSystolic.Text)) { strErr += "右侧收缩压(mmHg)格式错误!\\n"; } if (!PageValidate.IsNumber(txtH_Height.Text)) { strErr += "身高(cm)格式错误!\\n"; } if (!PageValidate.IsNumber(txtH_Weight.Text)) { strErr += "体重(kg)格式错误!\\n"; } if (this.txtH_Result.Text.Trim().Length == 0) { strErr += "体检结果不能为空!\\n"; } if (this.txtH_Suggestion.Text.Trim().Length == 0) { strErr += "体检建议不能为空!\\n"; } if (!PageValidate.IsDateTime(txtH_CheckTime.Text)) { strErr += "体检时间格式错误!\\n"; } if (!PageValidate.IsNumber(txtH_MedicalInstitutions.Text)) { strErr += "体检机构格式错误!\\n"; } if (!PageValidate.IsNumber(txtH_CheckUserID.Text)) { strErr += "体检医生格式错误!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } decimal H_BodyTemperature = decimal.Parse(this.txtH_BodyTemperature.Text); int H_PulseRate = int.Parse(this.txtH_PulseRate.Text); int H_RespiratoryRate = int.Parse(this.txtH_RespiratoryRate.Text); int H_LeftDiastolic = int.Parse(this.txtH_LeftDiastolic.Text); int H_LeftSystolic = int.Parse(this.txtH_LeftSystolic.Text); int H_RightDiastolic = int.Parse(this.txtH_RightDiastolic.Text); int H_RightSystolic = int.Parse(this.txtH_RightSystolic.Text); int H_Height = int.Parse(this.txtH_Height.Text); int H_Weight = int.Parse(this.txtH_Weight.Text); string H_Result = this.txtH_Result.Text; string H_Suggestion = this.txtH_Suggestion.Text; DateTime H_CheckTime = DateTime.Parse(this.txtH_CheckTime.Text); int H_MedicalInstitutions = int.Parse(this.txtH_MedicalInstitutions.Text); int H_CheckUserID = int.Parse(this.txtH_CheckUserID.Text); Maticsoft.Model.record_HealthCheck model = new Maticsoft.Model.record_HealthCheck(); model.H_BodyTemperature = H_BodyTemperature; model.H_PulseRate = H_PulseRate; model.H_RespiratoryRate = H_RespiratoryRate; model.H_LeftDiastolic = H_LeftDiastolic; model.H_LeftSystolic = H_LeftSystolic; model.H_RightDiastolic = H_RightDiastolic; model.H_RightSystolic = H_RightSystolic; model.H_Height = H_Height; model.H_Weight = H_Weight; model.H_Result = H_Result; model.H_Suggestion = H_Suggestion; model.H_CheckTime = H_CheckTime; model.H_MedicalInstitutions = H_MedicalInstitutions; model.H_CheckUserID = H_CheckUserID; Maticsoft.BLL.record_HealthCheck bll = new Maticsoft.BLL.record_HealthCheck(); bll.Add(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx"); }
/// <summary> /// 得到一个对象实体 /// </summary> public Maticsoft.Model.record_HealthCheck DataRowToModel(DataRow row) { Maticsoft.Model.record_HealthCheck model=new Maticsoft.Model.record_HealthCheck(); if (row != null) { if(row["HealthID"]!=null && row["HealthID"].ToString()!="") { model.HealthID=int.Parse(row["HealthID"].ToString()); } if(row["H_BodyTemperature"]!=null && row["H_BodyTemperature"].ToString()!="") { model.H_BodyTemperature=decimal.Parse(row["H_BodyTemperature"].ToString()); } if(row["H_PulseRate"]!=null && row["H_PulseRate"].ToString()!="") { model.H_PulseRate=int.Parse(row["H_PulseRate"].ToString()); } if(row["H_RespiratoryRate"]!=null && row["H_RespiratoryRate"].ToString()!="") { model.H_RespiratoryRate=int.Parse(row["H_RespiratoryRate"].ToString()); } if(row["H_LeftDiastolic"]!=null && row["H_LeftDiastolic"].ToString()!="") { model.H_LeftDiastolic=int.Parse(row["H_LeftDiastolic"].ToString()); } if(row["H_LeftSystolic"]!=null && row["H_LeftSystolic"].ToString()!="") { model.H_LeftSystolic=int.Parse(row["H_LeftSystolic"].ToString()); } if(row["H_RightDiastolic"]!=null && row["H_RightDiastolic"].ToString()!="") { model.H_RightDiastolic=int.Parse(row["H_RightDiastolic"].ToString()); } if(row["H_RightSystolic"]!=null && row["H_RightSystolic"].ToString()!="") { model.H_RightSystolic=int.Parse(row["H_RightSystolic"].ToString()); } if(row["H_Height"]!=null && row["H_Height"].ToString()!="") { model.H_Height=int.Parse(row["H_Height"].ToString()); } if(row["H_Weight"]!=null && row["H_Weight"].ToString()!="") { model.H_Weight=int.Parse(row["H_Weight"].ToString()); } if(row["H_Result"]!=null) { model.H_Result=row["H_Result"].ToString(); } if(row["H_Suggestion"]!=null) { model.H_Suggestion=row["H_Suggestion"].ToString(); } if(row["H_CheckTime"]!=null && row["H_CheckTime"].ToString()!="") { model.H_CheckTime=DateTime.Parse(row["H_CheckTime"].ToString()); } if(row["H_MedicalInstitutions"]!=null && row["H_MedicalInstitutions"].ToString()!="") { model.H_MedicalInstitutions=int.Parse(row["H_MedicalInstitutions"].ToString()); } if(row["H_CheckUserID"]!=null && row["H_CheckUserID"].ToString()!="") { model.H_CheckUserID=int.Parse(row["H_CheckUserID"].ToString()); } if (row["H_UserID"] != null && row["H_UserID"].ToString() != "") { model.H_UserID = int.Parse(row["H_UserID"].ToString()); } } return model; }
/// <summary> /// 得到一个对象实体 /// </summary> public Maticsoft.Model.record_HealthCheck GetModel(int HealthID) { StringBuilder strSql=new StringBuilder(); strSql.Append("select top 1 HealthID,H_BodyTemperature,H_PulseRate,H_RespiratoryRate,H_LeftDiastolic,H_LeftSystolic,H_RightDiastolic,H_RightSystolic,H_Height,H_Weight,H_Result,H_Suggestion,H_CheckTime,H_MedicalInstitutions,H_CheckUserID,H_UserID from record_HealthCheck "); strSql.Append(" where HealthID=@HealthID"); SqlParameter[] parameters = { new SqlParameter("@HealthID", SqlDbType.Int,4) }; parameters[0].Value = HealthID; Maticsoft.Model.record_HealthCheck model=new Maticsoft.Model.record_HealthCheck(); DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters); if(ds.Tables[0].Rows.Count>0) { return DataRowToModel(ds.Tables[0].Rows[0]); } else { return null; } }
/// <summary> /// 得到一个对象实体 /// </summary> public Maticsoft.Model.record_HealthCheck DataRowToModel(DataRow row) { Maticsoft.Model.record_HealthCheck model = new Maticsoft.Model.record_HealthCheck(); if (row != null) { if (row["HealthID"] != null && row["HealthID"].ToString() != "") { model.HealthID = int.Parse(row["HealthID"].ToString()); } if (row["H_BodyTemperature"] != null && row["H_BodyTemperature"].ToString() != "") { model.H_BodyTemperature = decimal.Parse(row["H_BodyTemperature"].ToString()); } if (row["H_PulseRate"] != null && row["H_PulseRate"].ToString() != "") { model.H_PulseRate = int.Parse(row["H_PulseRate"].ToString()); } if (row["H_RespiratoryRate"] != null && row["H_RespiratoryRate"].ToString() != "") { model.H_RespiratoryRate = int.Parse(row["H_RespiratoryRate"].ToString()); } if (row["H_LeftDiastolic"] != null && row["H_LeftDiastolic"].ToString() != "") { model.H_LeftDiastolic = int.Parse(row["H_LeftDiastolic"].ToString()); } if (row["H_LeftSystolic"] != null && row["H_LeftSystolic"].ToString() != "") { model.H_LeftSystolic = int.Parse(row["H_LeftSystolic"].ToString()); } if (row["H_RightDiastolic"] != null && row["H_RightDiastolic"].ToString() != "") { model.H_RightDiastolic = int.Parse(row["H_RightDiastolic"].ToString()); } if (row["H_RightSystolic"] != null && row["H_RightSystolic"].ToString() != "") { model.H_RightSystolic = int.Parse(row["H_RightSystolic"].ToString()); } if (row["H_Height"] != null && row["H_Height"].ToString() != "") { model.H_Height = int.Parse(row["H_Height"].ToString()); } if (row["H_Weight"] != null && row["H_Weight"].ToString() != "") { model.H_Weight = int.Parse(row["H_Weight"].ToString()); } if (row["H_Result"] != null) { model.H_Result = row["H_Result"].ToString(); } if (row["H_Suggestion"] != null) { model.H_Suggestion = row["H_Suggestion"].ToString(); } if (row["H_CheckTime"] != null && row["H_CheckTime"].ToString() != "") { model.H_CheckTime = DateTime.Parse(row["H_CheckTime"].ToString()); } if (row["H_MedicalInstitutions"] != null && row["H_MedicalInstitutions"].ToString() != "") { model.H_MedicalInstitutions = int.Parse(row["H_MedicalInstitutions"].ToString()); } if (row["H_CheckUserID"] != null && row["H_CheckUserID"].ToString() != "") { model.H_CheckUserID = int.Parse(row["H_CheckUserID"].ToString()); } } return(model); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Maticsoft.Model.record_HealthCheck model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update record_HealthCheck set "); strSql.Append("H_BodyTemperature=@H_BodyTemperature,"); strSql.Append("H_PulseRate=@H_PulseRate,"); strSql.Append("H_RespiratoryRate=@H_RespiratoryRate,"); strSql.Append("H_LeftDiastolic=@H_LeftDiastolic,"); strSql.Append("H_LeftSystolic=@H_LeftSystolic,"); strSql.Append("H_RightDiastolic=@H_RightDiastolic,"); strSql.Append("H_RightSystolic=@H_RightSystolic,"); strSql.Append("H_Height=@H_Height,"); strSql.Append("H_Weight=@H_Weight,"); strSql.Append("H_Result=@H_Result,"); strSql.Append("H_Suggestion=@H_Suggestion,"); strSql.Append("H_CheckTime=@H_CheckTime,"); strSql.Append("H_MedicalInstitutions=@H_MedicalInstitutions,"); strSql.Append("H_CheckUserID=@H_CheckUserID"); strSql.Append(" where HealthID=@HealthID"); SqlParameter[] parameters = { new SqlParameter("@H_BodyTemperature", SqlDbType.Float, 8), new SqlParameter("@H_PulseRate", SqlDbType.TinyInt, 1), new SqlParameter("@H_RespiratoryRate", SqlDbType.TinyInt, 1), new SqlParameter("@H_LeftDiastolic", SqlDbType.TinyInt, 1), new SqlParameter("@H_LeftSystolic", SqlDbType.TinyInt, 1), new SqlParameter("@H_RightDiastolic", SqlDbType.TinyInt, 1), new SqlParameter("@H_RightSystolic", SqlDbType.TinyInt, 1), new SqlParameter("@H_Height", SqlDbType.TinyInt, 1), new SqlParameter("@H_Weight", SqlDbType.TinyInt, 1), new SqlParameter("@H_Result", SqlDbType.Text), new SqlParameter("@H_Suggestion", SqlDbType.Text), new SqlParameter("@H_CheckTime", SqlDbType.DateTime), new SqlParameter("@H_MedicalInstitutions", SqlDbType.Int, 4), new SqlParameter("@H_CheckUserID", SqlDbType.Int, 4), new SqlParameter("@HealthID", SqlDbType.Int, 4) }; parameters[0].Value = model.H_BodyTemperature; parameters[1].Value = model.H_PulseRate; parameters[2].Value = model.H_RespiratoryRate; parameters[3].Value = model.H_LeftDiastolic; parameters[4].Value = model.H_LeftSystolic; parameters[5].Value = model.H_RightDiastolic; parameters[6].Value = model.H_RightSystolic; parameters[7].Value = model.H_Height; parameters[8].Value = model.H_Weight; parameters[9].Value = model.H_Result; parameters[10].Value = model.H_Suggestion; parameters[11].Value = model.H_CheckTime; parameters[12].Value = model.H_MedicalInstitutions; parameters[13].Value = model.H_CheckUserID; parameters[14].Value = model.HealthID; int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }