public ActionResult SaveExist(Exist exist, string W_name, string U_name) { //通过key查询到要改变的exit //通过W_name和U_name分别获得仓库编号和用户编号 //整合信息 UserBusinessLayer userBusinessLayer = new UserBusinessLayer(); if ((exist.U_id = userBusinessLayer.GetId(U_name)) == -1) { return(RedirectToAction("RedirectStorage")); } WarehouseBusinessLayer warehouseBusinessLayer = new WarehouseBusinessLayer(); if ((exist.W_id = warehouseBusinessLayer.GetId(W_name)) == -1) { return(RedirectToAction("RedirectStorage")); } //修改信息 ExistBusinessLayer existBusinessLayer = new ExistBusinessLayer(); existBusinessLayer.InputExist(exist.IO_Id, exist); //重定向 return(RedirectToAction("RedirectStorage")); }
//[MultiButton("入库")] public ActionResult MakeTableSubmit(string Sumbit) { if (Sumbit == null && IsIntoOutWaretor) { return(new EmptyResult()); } Session["Table_Id"] = null; //string Sumbit = "入库"; Out_Into_ware out_Into_Ware = new Out_Into_ware(); out_Into_Ware.Make_date = DateTime.Now;//时间 UserBusinessLayer userBusinessLayer = new UserBusinessLayer(); WarehouseBusinessLayer warehouseBusinessLayer = new WarehouseBusinessLayer(); OutIntoWareBusinessLayer outIntoWareBusinessLayer1 = new OutIntoWareBusinessLayer(); User user = userBusinessLayer.GetUser(Session["User"].ToString()); out_Into_Ware.User_id = user.U_Id; //负责人编号 out_Into_Ware.Ware_id = warehouseBusinessLayer.GetId(user.U_point); //仓库编号 //创建表单号 Table_Id = "12343"; if (Sumbit == "商品入库") { I_type = "入库"; IsIntoOutWaretor = true; out_Into_Ware.type = IO_Type.INTO; //out_Into_Ware.Table_Id = "INTO" + Table_Id; out_Into_Ware.Table_Id = outIntoWareBusinessLayer1.GetMaxTable(IO_Type.INTO); } else if (Sumbit == "商品出库") { I_type = "出库"; IsIntoOutWaretor = true; out_Into_Ware.type = IO_Type.OUT; //out_Into_Ware.Table_Id = "OUT" + Table_Id; out_Into_Ware.Table_Id = outIntoWareBusinessLayer1.GetMaxTable(IO_Type.OUT); } //Session["Table_Id"] = out_Into_Ware.Table_Id; Table_Id = out_Into_Ware.Table_Id; //存入数据库 OutIntoWareBusinessLayer outIntoWareBusinessLayer = new OutIntoWareBusinessLayer(); outIntoWareBusinessLayer.InsertOut_Into_ware(out_Into_Ware); return(RedirectToAction("RedirectInOutWarehouse")); }