Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }