Esempio n. 1
0
        public ActionResult NewWarehouse(WarehouseViewModel model)
        {
            if (ModelState.IsValid)
            {
                //创建数据
                Warehouse data = new Warehouse();
                data.Name = model.Name;
                data.IsLease = model.IsLease;
                data.Remark = model.Remark;

                //保存数据
                string strErrText;
                DDSystem dd = new DDSystem();
                if (dd.InsertWarehouse(data, LoginAccountId, LoginStaffName, out strErrText))
                {
                    return Json(string.Empty);
                }
                else
                {
                    return Json(strErrText);
                }
            }
            return View(model);
        }