新增测量

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
页面代码:

//保存测量新增
        $("#doAdd").click(function () {
            var rowIndex = tabMeasuring.getSelectedRowIndex();
            var NursingRecordID = tabMeasuring.getColumnValue(rowIndex, "NursingRecordID");

            var MeasuringTime = $("#TJAMeasuringTimeS").val();
            var AnimalHeat = $("#TJAAnimalHeatS").val();
            var Pulse = $("#TJAPulseS").val();
            var Breathe = $("#TJABreatheS").val();
            var BloodPressure = $("#TJABloodPressureS").val();

            $.getJSON("IncreasedMeasuring?NursingRecordID=" + NursingRecordID + "&MeasuringTime=" + MeasuringTime + "&AnimalHeat=" + AnimalHeat + "&Pulse=" + Pulse + "&Breathe=" + Breathe + "&BloodPressure=" + BloodPressure, function (msg) {
                if (msg == "success") {
                    layer.msg("新增成功,正在返回!", { icon: 1, title: '提示' });
                    tabMeasuring.search({ NursingRecordID: NursingRecordID });
                    $("#myModaTwo").modal("hide");
                    $("#myModa").modal("show");
                } else {
                    if (msg = "failed") {
                        layer.msg("新增失败!", { icon: 0, title: '提示' });
                    }
                }
            });
        });

控制器代码:

public ActionResult IncreasedMeasuring(int NursingRecordID, string MeasuringTime, string AnimalHeat, string Pulse, string Breathe, string BloodPressure)
        {
            string strMsg = "failed";
            try
            {
                SYS_Measuring myMeasuring = new SYS_Measuring();

                myMeasuring.NursingRecordID = NursingRecordID;//护理记录ID
                myMeasuring.MeasuringTime = MeasuringTime;//测量时间
                myMeasuring.AnimalHeat = AnimalHeat;//体温
                myMeasuring.Pulse = Pulse;//脉搏
                myMeasuring.Breathe = Breathe;//呼吸
                myMeasuring.BloodPressure = BloodPressure;//血压

                myModels.SYS_Measuring.Add(myMeasuring);
                //保存数据库
                myModels.SaveChanges();
                strMsg = "success";
            }
            catch (Exception)
            {

                strMsg = "failed";
            }
            return Json(strMsg, JsonRequestBehavior.AllowGet);
        }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值