private bool DoAdd() { DataSet ds_UserRegister = bll_UserRegister.GetList("UserName='******'"); //从用户表中查列 if (ds_UserRegister.Tables[0].Rows.Count == 1) //判断是否存在 { Alert.AlertAndRedirect("该用户已存在,请检查!", "PersonnelManageEdit.aspx"); return(false); } if (Session["admin_id"] != null)//如果id不为空,进行赋值 { model_UserRegister.UserID = deal.Deal_ID(); model_UserRegister.UserName = txt_UserName.Text; model_UserRegister.UserPassword = txt_Password.Text; model_UserRegister.PhoneNumber = txt_PhoneNumber.Text; if (txt_Type.Text == "养老人员") { model_UserRegister.UserType = "1"; } if (txt_Type.Text == "医护人员") { model_UserRegister.UserType = "2"; } model_UserRegister.BirthDate = Convert.ToDateTime(txt_Birth.Text); model_UserRegister.UserAddress = txt_Address.Text; bll_UserRegister.Add(model_UserRegister); } else { Alert.AlertAndRedirect("会话超时,请重新登录!", "Login.aspx"); return(false); } return(true); }
private bool DoAdd() { if (Session["admin_id"] != null)//如果id不为空,进行赋值 { model_Text.TextNumber = deal_Text.Deal_ID(); model_Text.TextInfo = txt_Content.Text; model_Text.TextTime = Convert.ToDateTime(txt_Time.Text); bll_Text.Add(model_Text); } else { Alert.AlertAndRedirect("会话超时,请重新登录!", "Login.aspx"); return(false); } return(true); }
private bool DoAdd() { DataSet ds_User = bll_User.GetList("UserName = '******'"); if (Session["admin_id"] != null)//如果id不为空,进行赋值 { model_Sub.Subscribe_ID = deal.Deal_ID(); model_Sub.UserID = ds_User.Tables[0].Rows[0]["UserID"].ToString(); model_Sub.Subscribe_Time = DateTime.Now; model_Sub.Subscribe_Name = txt_OldName.Text; model_Sub.Subscribe_FamilyName = txt_PName.Text; model_Sub.Subscribe_FamilyPhone = txt_Phone.Text; model_Sub.Subscribe_Office = txt_Room.Text; bll_Sub.Add(model_Sub); } else { Alert.AlertAndRedirect("会话超时,请重新登录!", "Login.aspx"); return(false); } return(true); }
private bool DoAdd() { DataSet ds_Sub = bll_Sub.GetList("UserID = '" + Session["admin_id"] + "'"); //从部门表中查列 if (Session["admin_id"] != null) //如果id不为空,进行赋值 { model_Sub.Subscribe_ID = deal.Deal_ID(); model_Sub.Subscribe_Name = ds_Sub.Tables[0].Rows[0]["Subscribe_Name"].ToString(); model_Sub.UserID = ds_Sub.Tables[0].Rows[0]["UserID"].ToString(); model_Sub.Subscribe_Time = Convert.ToDateTime(lblState.Text); model_Sub.Subscribe_FamilyName = ds_Sub.Tables[0].Rows[0]["Subscribe_FamilyName"].ToString(); model_Sub.Subscribe_FamilyPhone = ds_Sub.Tables[0].Rows[0]["Subscribe_FamilyPhone"].ToString(); model_Sub.Subscribe_Office = "暂无"; bll_Sub.Add(model_Sub); } else { Alert.AlertAndRedirect("会话超时,请重新登录!", "Login.aspx"); return(false); } return(true); }
private bool DoAdd() { if (Session["admin_id"] != null)//如果id不为空,进行赋值 { model_Medical.MedicalRecordID = deal_Medical.Deal_ID(); model_Medical.UserName = txt_OldName.Text; model_Medical.DiagnosisTime = Convert.ToDateTime(txt_Visiting.Text); model_Medical.ReDiagnosisDate = Convert.ToDateTime(txt_AgainTime.Text); model_Medical.DoctorName = txt_DName.Text; model_Medical.CheckStatus = txt_Examine.Text; model_Medical.DoctorSaying = txt_Doctor.Text; model_Medical.UserDescription = txt_Illness.Text; model_Medical.Medication = txt_Pharmacy.Text; model_Medical.Result = txt_Result.Text; bll_Medical.Add(model_Medical); } else { Alert.AlertAndRedirect("会话超时,请重新登录!", "Login.aspx"); return(false); } return(true); }
private bool DoAdd() { DealID deal_User = new DealID(); if (Session["admin_id"] != null)//如果id不为空,进行赋值 { model_Daily.DailyStatusID = deal.Deal_ID(); model_Daily.UserID = deal_User.Deal_ID(); model_Daily.RecordTime = DateTime.Now; model_Daily.BloodPressure = txt_Blood.Text; model_Daily.UserName = txt_OldName.Text; model_Daily.UserTemperature = txt_Tem.Text; model_Daily.UserHeartRate = txt_Heart.Text; model_Daily.UserHealthState = txt_Health.Text; bll_Daily.Add(model_Daily); } else { Alert.AlertAndRedirect("会话超时,请重新登录!", "Login.aspx"); return(false); } return(true); }
private bool DoAdd() { DealID deal_User = new DealID(); DataSet ds_Daily = bll_Daily.GetList("UserName = '******'"); if (Session["admin_id"] != null)//如果id不为空,进行赋值 { model_Daily.DailyStatusID = deal_Health.Deal_ID(); model_Daily.UserID = deal_User.Deal_ID(); model_Daily.RecordTime = DateTime.Now; model_Daily.BloodPressure = lab_Blood.Text; model_Daily.UserName = lab_UserName.Text; model_Daily.UserTemperature = lab_Tem.Text; model_Daily.UserHeartRate = lab_Heart.Text; model_Daily.UserHealthState = ds_Daily.Tables[0].Rows[0]["UserHealthState"].ToString(); bll_Daily.Add(model_Daily); } else { Alert.AlertAndRedirect("会话超时,请重新登录!", "Login.aspx"); return(false); } return(true); }