Ejemplo n.º 1
0
 //
 // GET: /Xueya/Create
 public ActionResult Create(int id)
 {
     XueyaAddViewModel model = new XueyaAddViewModel();
     model.CustomerId = id;
     ViewData["Weizhi"] = MyService.GetXueyaWeizhiSelectList();
     ViewBag.CustomerName = MyService.CustomerIdToName("CustomerId=" + id);
     return View(model);
 }
Ejemplo n.º 2
0
 public ActionResult Create(XueyaAddViewModel model)
 {
     XueyaDto dto = new XueyaDto();
         dto.XueyaDiya = model.XueyaDiya;
         dto.XueyaGaoya = model.XueyaGaoya;
         dto.XueyaMaibo = model.XueyaMaibo;
         dto.XueyaSId = "XUEYAJISHEBEIHAO";
         dto.XueyaUId = 1;
         dto.CustomerId = model.CustomerId;
         dto.XueyaSource = "医生手动测量";
         dto.XueyaTime = System.DateTime.Now;
         dto.XueyaWeizhi = model.XueyaWeizhi;
         string JsonString = JsonHelper.JsonSerializerBySingleData(dto);
         Message msg = CMSService.Insert("Xueya", JsonString);
        // return RedirectTo("/Customer/Index", msg.MessageInfo);
         return RedirectTo("/Xueya/Index/" + dto.CustomerId, msg.MessageInfo);
 }