public ActionResult WavePickingDetail(string id) { if (int.TryParse(id, out int wpdid)) { //当前的波次单 var curWP = new DbEntities <WavePicking>().SimpleClient.GetById(wpdid); if (curWP != null) { WavePickingDetailViewModel model = new WavePickingDetailViewModel { WavePickingID = curWP.WavePickingID, WavePickingNo = curWP.WavePickingNo }; //下拉框 SetSelectListItems.OutboundTaskDetail(this); SetSelectListItems.Material(this); SetSelectListItems.TrayDetail(this); SetSelectListItems.InventoryList(this); return(View(model)); } } TempData["Msg"] = "没有找到对象"; return(RedirectToAction("WavePicking", "Warehouse")); }
public ActionResult InventoryList() { //下拉框设置 SetSelectListItems.InboundTaskDetail(this); SetSelectListItems.OutboundTaskDetail(this); SetSelectListItems.Tray(this); SetSelectListItems.InventoryLocation(this); return(View()); }
public ActionResult InventoryList(InventoryListViewModel model) { if (ModelState.IsValid) { var db = new DbEntities <InventoryList>().SimpleClient; //信息记录不重复 if (db.IsAny(il => il.InboundTaskDetailID == model.InboundTaskDetailID && il.OutboundTaskDetailID == model.OutboundTaskDetailID && il.TrayID == model.TrayID && il.InventoryLocationID == model.InventoryLocationID && il.InventoryType == model.InventoryType)) { TempData["Msg"] = "该条记录已存在"; } else { //登录人信息 if (new IdentityAuth().GetCurUserID(HttpContext, out int curUserID)) { InventoryList entity = model.InitAddInventoryList(curUserID); if (db.Insert(entity)) { TempData["Msg"] = $"添加成功"; return(RedirectToAction("InventoryList", "Warehouse")); } TempData["Msg"] = "添加失败"; } else { TempData["Msg"] = "登录身份过期,请重新登录"; } } } //下拉框设置 SetSelectListItems.InboundTaskDetail(this); SetSelectListItems.OutboundTaskDetail(this); SetSelectListItems.Tray(this); SetSelectListItems.InventoryLocation(this); return(View()); }