public ActionResult PatientDetailInfoEdit(PatientDetailInfoViewModel ei, FormCollection formCollection)
        {
            var    user      = Session["CurrentUser"] as UserAndRole;
            string PatientId = ei.UserId;

            bool flag = false;

            DataSet set = _ServicesSoapClient.GetPatBasicInfoDtlList(PatientId);  //获取关注的详细信息

            if (set.Tables.Count > 0)
            {
                foreach (DataTable ta in set.Tables)
                {
                    int    DeleteFlag   = 0;
                    string CategoryCode = ta.Rows[0][1].ToString();
                    while (DeleteFlag == 0)
                    {
                        DeleteFlag = _ServicesSoapClient.DeleteModuleDetail(PatientId, CategoryCode);
                    }
                    foreach (System.Data.DataRow row in ta.Rows)
                    {
                        if ((row[3].ToString() != "InvalidFlag") && (row[3].ToString() != "Doctor") && (row[4].ToString() != "伴随疾病"))
                        {
                            CategoryCode = row[1].ToString();           //主键
                            string ItemCode = row[3].ToString();        //主键
                            int    ItemSeq  = Convert.ToInt32(row[10]); //主键

                            string Description = row[9].ToString();
                            int    SortNo      = Convert.ToInt32(row[10]);

                            string Value       = Request.Form[row[3].ToString()]; //只更改了Value
                            string ControlType = row[11].ToString();

                            //插入数据
                            if (ControlType != "7")
                            {
                                flag = _ServicesSoapClient.SetPatBasicInfoDetail(PatientId, CategoryCode, ItemCode, ItemSeq, Value, Description, SortNo, user.UserId, user.TerminalName, user.TerminalIP, user.DeviceType);
                            }
                            if (flag == false)
                            {
                                break;
                            }
                        }
                    }
                }
            }

            //flag为TRUE即全部插成功,FALSE不知道哪里断掉。。。
            if (flag == true)
            {
                return(RedirectToAction("PatientDetailInfo", "PatientInfo", new { PatientId = ei.UserId })); //成功跳转至详细
                //return Content("ok");
            }
            else
            {
                //return Content("<script >alert('提交失败!');</script >", "text/html");
                Response.Write("<script>alert('部分插入失败');</script>");   //失败返回编辑,提示失败
                return(View(ei));
                //return Content("fai");
            }
        }