Пример #1
0
 public ActionResult New(PickGroup pickGroup)
 {
     if (ModelState.IsValid)
     {
         //判断描述不能重复
         if (base.genericMgr.FindAll<long>(selectCountPickGroupStatement, new object[] { pickGroup.PickGroupCode })[0] > 0)
         {
             base.SaveErrorMessage(Resources.WMS.PickGroup.PickGroup_Errors_Existing_PickGroupCode, pickGroup.PickGroupCode);
         }
         pickGroup.Type = PickGroupType.Pick;
         genericMgr.Create(pickGroup);
         SaveSuccessMessage(Resources.WMS.PickGroup.PickGroup_Added);
         return RedirectToAction("Edit/" + pickGroup.PickGroupCode);
     }
     return View(pickGroup);
 }
Пример #2
0
        public ActionResult _Edit(PickGroup pickGroup)
        {

            if (ModelState.IsValid)
            {
                pickGroup.Type = PickGroupType.Pick;
                genericMgr.Update(pickGroup);
                SaveSuccessMessage(Resources.WMS.PickGroup.PickGroup_Updated);
            }

            TempData["TabIndex"] = 0;
            return new RedirectToRouteResult(new RouteValueDictionary  
                                                   { 
                                                       { "action", "_Edit" }, 
                                                       { "controller", "PickGroup" } ,
                                                       { "Id", pickGroup.PickGroupCode }
                                                   });
        }