Beispiel #1
0
        /// <summary>
        /// 其它入库
        /// </summary>
        /// <returns></returns>
        public ActionResult InStockOther()
        {
            List <Depots>      dplist      = DepotsBLL.GetAll();
            List <ProductLend> prolendlist = ProductLendBLL.GetAll();

            ViewData["dplist"]      = dplist;
            ViewData["prolendlist"] = prolendlist;
            int count = OtherInDepotBLL.GetAll().Count();

            ViewData["count"]        = count;
            count                    = count % 10 == 0 ? count / 10 : count / 10 + 1;
            ViewData["MaxPageIndex"] = count;

            //商品类别
            List <ProductTypes> ptlist = ProductTypesBLL.GetAll();
            //商品规格
            List <ProductSpec> pslist = ProductSpecBLL.GetAll();
            //商品单位
            List <ProductUnit> pulist = ProductUnitBLL.GetAll();
            //商品颜色
            List <ProductColor> pclist = ProductColorBLL.GetAll();

            ViewData["ptlist"] = ptlist;
            ViewData["pslist"] = pslist;
            ViewData["pulist"] = pulist;
            ViewData["pclist"] = pclist;
            return(View());
        }
 /// <summary>
 /// 修改生产入库单
 /// </summary>
 /// <param name="pd"></param>
 /// <param name="list"></param>
 /// <returns></returns>
 public ActionResult EditOtherInDepot(OtherInDepot pd, List <OtherInDepotDetail> list)
 {
     if (OtherInDepotBLL.EdiStocks(pd, list) > 0)
     {
         return(Content("edit_yes"));
     }
     else
     {
         return(Content("edit_no"));
     }
 }
 /// <summary>
 /// 删除生产入库单
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public ActionResult DelOtherDepot(string id)
 {
     if (OtherInDepotBLL.DelStocks(id) > 0)
     {
         return(Content("del_yes"));
     }
     else
     {
         return(Content("del_no"));
     }
 }
 /// <summary>
 /// 添加生产入库单
 /// </summary>
 /// <param name="pd"></param>
 /// <param name="list"></param>
 /// <returns></returns>
 public ActionResult AddOtherDepot(OtherInDepot pd, List <OtherInDepotDetail> list)
 {
     pd.OIDUser = Convert.ToInt32(Session["uid"]);
     if (OtherInDepotBLL.AddStocks(pd, list) > 0)
     {
         return(Content("add_yes"));
     }
     else
     {
         return(Content("add_no"));
     }
 }
        /// <summary>
        /// 审核生产入库单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult CKOtherDepot(string id)
        {
            int userid = Convert.ToInt32(Session["uid"]);

            if (OtherInDepotBLL.CKInDepot(id, userid) > 0)
            {
                return(Content("ck_yes"));
            }
            else
            {
                return(Content("ck_no"));
            }
        }
        /// <summary>
        /// 生产入库订单条件查询
        /// </summary>
        /// <param name="PIDID"></param>
        /// <param name="UsersName"></param>
        /// <param name="DepotID"></param>
        /// <param name="PIDDate"></param>
        /// <param name="PIDState"></param>
        /// <param name="PageIndex"></param>
        /// <returns></returns>
        public ActionResult Find(string OIDID, string UsersName, string DepotID, string OIDDate, int OIDState, int PageIndex)
        {
            int count = 0;
            List <OtherInDepot> list   = OtherInDepotBLL.Find(OIDID, DepotID, OIDDate, UsersName, OIDState, PageIndex, 10, out count);
            List <object>       listed = new List <object>();

            if (list.Count != 0)
            {
                count = count % 10 == 0 ? count / 10 : count / 10 + 1;
                foreach (OtherInDepot item in list)
                {
                    listed.Add(new { OIDID = item.OIDID, DepotID = item.DepotID, DepotName = item.Depots.DepotName, OIDDate = item.OIDDate, OIDUser = item.OIDUser, UsersName = item.Users.UsersName, OIDState = item.OIDState, OIDDesc = item.OIDDesc, MaxPageIndex = count });
                }
            }
            else
            {
                listed.Add(new { OIDID = "", MaxPageIndex = 0 });
            }
            return(Json(listed));
        }