public dynamic GetPageData(string id = "", string tabName = "")
        {
            var pQuery = ParamQuery.Instance();

            if (id == "")
            {
                var result = new
                {
                    tab0 = "",
                };
                return(result);
            }
            else
            {
                List <dynamic> data = new List <dynamic>();
                if (tabName == "工具明细")
                {
                    data = new MES_BN_ProductProcessRouteDetailService().GetDynamicList(pQuery.AndWhere("ProcessRouteID", id));
                }
                else if (tabName == "设备明细")
                {
                    data = new MES_BN_ProductProcessRouteEquipmentService().GetDynamicList(pQuery.AndWhere("ProcessRouteID", id));
                }
                var result = new
                {
                    rows  = data,
                    total = data.Count
                };
                return(result);
            }
        }
        //工艺路线设备
        public dynamic GetProcessRouteEQP(string id)
        {
            var pQuery = ParamQuery.Instance().Select("*").AndWhere("ProcessRouteID", id);
            var re     = new MES_BN_ProductProcessRouteEquipmentService().GetModelList(pQuery);

            return(re);
        }
        public string GetNewRowId(string type, string key, int qty = 1)
        {
            switch (type)
            {
            case "grid0":
                var service0 = new MES_BN_ProductProcessRouteDetailService();
                return(service0.GetNewKey("ID", "maxplus", qty, null));

            case "grid1":
                var service1 = new MES_BN_ProductProcessRouteEquipmentService();
                return(service1.GetNewKey("ID", "maxplus", qty, null));

            case "grid":
                var service = new MES_BN_ProductProcessRouteService();
                return(service.GetNewKey("ID", "maxplus", qty, null));

            default:
                return("");
            }
        }