Beispiel #1
0
 /// <summary>
 /// 审核入库单
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public ActionResult CKStockIn(string id)
 {
     if (StockInDepotBLL.CKStockIn(id, Convert.ToInt32(Session["uid"])) > 0)
     {
         return(Content("ck_yes"));
     }
     else
     {
         return(Content("ck_no"));
     }
 }
Beispiel #2
0
 /// <summary>
 /// 修改入库单
 /// </summary>
 /// <param name="sti"></param>
 /// <param name="list"></param>
 /// <returns></returns>
 public ActionResult EditStockIn(StockInDepot sti, List <StockInDepotDetail> list)
 {
     if (StockInDepotBLL.EdiStocks(sti, list) > 0)
     {
         return(Content("edit_yes"));
     }
     else
     {
         return(Content("edit_no"));
     }
 }
Beispiel #3
0
 /// <summary>
 /// 保存入库订单
 /// </summary>
 /// <returns></returns>
 public ActionResult AddStockIn(StockInDepot sti, List <StockInDepotDetail> list)
 {
     sti.SIDUser = Convert.ToInt32(Session["uid"]);
     if (StockInDepotBLL.AddStocks(sti, list) > 0)
     {
         return(Content("add_yes"));
     }
     else
     {
         return(Content("add_no"));
     }
 }
Beispiel #4
0
        /// <summary>
        /// 条件查询
        /// </summary>
        /// <param name="SIDID"></param>
        /// <param name="UsersName"></param>
        /// <param name="PPName"></param>
        /// <param name="StockID"></param>
        /// <param name="SIDDate"></param>
        /// <param name="SIDDeliver"></param>
        /// <param name="SIDData"></param>
        /// <param name="PageIndex"></param>
        /// <returns></returns>
        public ActionResult FindStockIn(int PageIndex, string SIDID, string UsersName, string PPID, string DepotID, string SIDDate, int SIDData)//,
        {
            int count                = 0;
            int PageSize             = 10;
            List <StockInDepot> list = StockInDepotBLL.Find(SIDID, UsersName, PPID, DepotID, SIDDate, SIDData, PageIndex, PageSize, out count);

            count = count % 10 == 0 ? count / 10 : count / 10 + 1;
            List <object> listed = new List <object>();

            foreach (StockInDepot item in list)
            {
                listed.Add(new { SIDID = item.SIDID, PPID = item.PPID, PPName = item.ProductLend.PPName, DepotID = item.DepotID, DepotName = item.Depots.DepotName, StockID = item.StockID, SIDDate = item.SIDDate, SIDDeliver = item.SIDDeliver, SIDFreight = item.SIDFreight, SIDUser = item.SIDUser, UsersName = item.Users.UsersName, SIDData = item.SIDData, SIDDesc = item.SIDDesc, MaxPageIndex = count });
            }
            if (listed.Count == 0)
            {
                listed.Add(new { SIDID = "", MaxPageIndex = "0" });
            }
            return(Json(listed));
        }
Beispiel #5
0
        /// <summary>
        /// 采购入库
        /// </summary>
        /// <returns></returns>
        public ActionResult InStock()
        {
            List <Depots>      dplist      = DepotsBLL.GetAll();
            List <ProductLend> prolendlist = ProductLendBLL.GetAll();

            ViewData["dplist"]      = dplist;
            ViewData["prolendlist"] = prolendlist;
            //采购单总条数
            int count        = StocksBLL.GetAll().Count;
            int MaxPageIndex = count % 10 == 0 ? count / 10 : count / 10 + 1;
            //入库单总数量
            int count1        = StockInDepotBLL.GetAll().Count;
            int MaxPageIndex1 = count1 % 10 == 0 ? count1 / 10 : count1 / 10 + 1;

            ViewData["count"]         = count;
            ViewData["MaxPageIndex"]  = MaxPageIndex;
            ViewData["count1"]        = count1;
            ViewData["MaxPageIndex1"] = MaxPageIndex1;
            ViewData["PageIndex"]     = 1;
            ViewData["PageIndex1"]    = 1;


            return(View());
        }