/// <summary>
        /// 管理返回表格Json
        /// </summary>
        /// <returns></returns>
        public ActionResult GridListJson(string companyId)
        {
            var listData = _warehouseBLL.GetList(companyId);
            var jsonData = new
            {
                rows = listData
            };

            return(Content(jsonData.ToJson()));
        }
示例#2
0
        /// <summary>
        /// 获取仓库树数据源
        /// </summary>
        /// <returns></returns>
        public string GetWHList()
        {
            List <TreeNodeResult> list  = new List <TreeNodeResult>();
            WarehouseBLL          bll   = null;
            List <Warehouse>      array = null;

            try
            {
                bll   = BLLFactory.CreateBLL <WarehouseBLL>();
                array = bll.GetList();
                TreeNodeResult rootNode = new TreeNodeResult();
                rootNode.Tid   = "";
                rootNode.Ttext = "仓库";
                foreach (Warehouse info in array)
                {
                    TreeNodeResult node = new TreeNodeResult();
                    node.Tid   = info.ID;
                    node.Ttext = info.Code + "|" + info.Description;
                    rootNode.AddchildNode(node);
                }
                list.Add(rootNode);
                return(TreeNodeResult.GetResultJosnS(list.ToArray()));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#3
0
        private void BindData()
        {
            WarehouseBLL bll       = null;
            DataPage     dp        = new DataPage();
            Warehouse    condition = new Warehouse();

            try
            {
                bll                   = BLLFactory.CreateBLL <WarehouseBLL>();
                condition.Code        = this.Code.Text.Trim();
                condition.Description = this.Description.Text.Trim();

                PagerHelper.InitPageControl(this.AspNetPager1, dp, true);
                dp = bll.GetList(condition, dp);

                List <Warehouse> list = dp.Result as List <Warehouse>;
                this.GvList.DataSource = list;
                this.GvList.DataBind();

                for (int i = 0; i < this.GvList.Rows.Count; i++)
                {
                    string click = string.Format("return edit('{0}');", this.GvList.DataKeys[i]["ID"].ToString());

                    (this.GvList.Rows[i].Cells[4].Controls[0] as WebControl).Attributes.Add("onclick", click);
                }
                PagerHelper.SetPageControl(AspNetPager1, dp, true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#4
0
        public ActionResult Edit(string id)
        {
            Spl_WarehouseAllocationModel entity = m_BLL.GetById(id);

            ViewBag.FromWarehouse = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, ""), "Id", "Name", entity.FromWarehouseId);
            ViewBag.ToWarehouse   = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, ""), "Id", "Name", entity.ToWarehouseId);
            return(View(entity));
        }
示例#5
0
        public ActionResult Edit(string id)
        {
            Spl_WarehouseWarrantModel entity = m_BLL.GetById(id);

            ViewBag.Warehouse     = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()), "Id", "Name", entity.WarehouseId);
            ViewBag.InOutCategory = new SelectList(InOutCategoryBLL.GetList(ref setNoPagerAscById, "入库"), "Id", "Name", entity.InOutCategoryId);
            return(View(entity));
        }
        public JsonResult GetListParent(GridPager pager, string queryStr)
        {
            List <Spl_WarehouseModel>     list = WarehouseBLL.GetList(ref pager, queryStr, GetUserId());
            GridRows <Spl_WarehouseModel> grs  = new GridRows <Spl_WarehouseModel>();

            grs.rows  = list;
            grs.total = pager.totalRows;
            return(Json(grs));
        }
示例#7
0
        private void BindWHList()
        {
            WarehouseBLL     bll   = null;
            List <Warehouse> array = null;

            bll   = BLLFactory.CreateBLL <WarehouseBLL>();
            array = bll.GetList();

            this.Warehouse.DataSource = array;
            this.Warehouse.DataBind();
        }
示例#8
0
        public JsonResult GetComboxDataByWarehouse()
        {
            List <Spl_WarehouseModel> list = WarehouseBLL.GetList(ref setNoPagerAscById, "");
            var json = (from r in list
                        select new Spl_ProductCategoryModel()
            {
                Id = r.Id,
                Name = r.Name
            }).ToArray();

            return(Json(json));
        }
示例#9
0
        public ActionResult Create()
        {
            ViewBag.FromWarehouse = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()), "Id", "Name");
            ViewBag.ToWarehouse   = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, ""), "Id", "Name");
            AccountModel accountModel          = GetAccount();
            Spl_WarehouseAllocationModel model = new Spl_WarehouseAllocationModel()
            {
                Id = "DBD" + DateTime.Now.ToString("yyyyMMddHHmmssff"),
                //  Handler = accountModel.Id,
                Handler     = accountModel.TrueName,
                HandlerName = accountModel.TrueName,
            };

            return(View(model));
        }
示例#10
0
        public ActionResult Create()
        {
            ViewBag.Warehouse     = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()), "Id", "Name");
            ViewBag.InOutCategory = new SelectList(InOutCategoryBLL.GetList(ref setNoPagerAscById, "入库"), "Id", "Name");
            AccountModel accountModel       = GetAccount();
            Spl_WarehouseWarrantModel model = new Spl_WarehouseWarrantModel()
            {
                Id          = "RKD" + DateTime.Now.ToString("yyyyMMddHHmmssff"),
                Handler     = accountModel.TrueName,
                HandlerName = accountModel.TrueName,
            };

            ViewBag.Checker = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()).GroupBy(p => new { p.Id, p.ContactPerson }).Select(g => new { Id = g.Key.Id, ContactPerson = g.Key.ContactPerson }), "Id", "ContactPerson");

            return(View(model));
        }
        public ActionResult Create()
        {
            ViewBag.Warehouse     = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()), "Id", "Name");
            ViewBag.InOutCategory = new SelectList(InOutCategoryBLL.GetList(ref setNoPagerAscById, "出库"), "Id", "Name");
            AccountModel accountModel          = GetAccount();
            Spl_WarehouseWarrantOUTModel model = new Spl_WarehouseWarrantOUTModel()
            {
                Id = "CKD" + DateTime.Now.ToString("yyyyMMddHHmmssff"),
                //  Handler = accountModel.Id,
                Handler     = accountModel.TrueName,
                HandlerName = accountModel.TrueName,
            };

            ViewBag.Checker = new SelectList(WarehouseBLL.GetList(ref setNoPagerAscById, "", GetUserId()), "Id", "ContactPerson").Distinct();
            return(View(model));
        }
示例#12
0
 /// <summary>
 /// 设置数据
 /// </summary>
 /// <param name="name"></param>
 private void setList(string name)
 {
     this.dgv_Data.DataSource = bll.GetList(name);
     getName();
 }
        public async Task <ActionResult> GetListJson(WarehouseListParam param)
        {
            TData <List <WarehouseEntity> > obj = await warehouseBLL.GetList(param);

            return(Json(obj));
        }