コード例 #1
0
        public Response SaveCClassSupplier(string token, [FromBody] CClassSupplierParam param)
        {
            Response response = new Response();

            if (string.IsNullOrEmpty(token) || !token.Equals(_token))
            {
                response.code    = "404";
                response.message = "Invild token";
            }
            else
            {
                int result = CClassSupplierHelper.SaveCClassSupplier(param);
                if (result == 0)
                {
                    response.code    = "500";
                    response.message = "No Data";
                }
                else
                {
                    response.code    = "200";
                    response.content = result;
                }
            }
            return(response);
        }
コード例 #2
0
        public Response GetItemClassMaintainData(string token, [FromBody] SingleField param)
        {
            Response response = new Response();

            if (string.IsNullOrEmpty(token) || !token.Equals(_token))
            {
                response.code    = "404";
                response.message = "Invild token";
            }
            else
            {
                ItemClassMaintain result = CClassSupplierHelper.GetItemClassMaintainData(param);

                if ((result.lstItemClass_x == null || result.lstItemClass_x.Count == 0) ||
                    (result.lstItemClass_y == null || result.lstItemClass_y.Count == 0))
                {
                    response.code    = "500";
                    response.message = "No Data";
                }
                else
                {
                    response.code    = "200";
                    response.content = result;
                }
            }
            return(response);
        }
コード例 #3
0
        public Response GetCClassSupplierData(string token, [FromBody] SingleField param)
        {
            Response response = new Response();

            if (string.IsNullOrEmpty(token) || !token.Equals(_token))
            {
                response.code    = "404";
                response.message = "Invild token";
            }
            else
            {
                CClassSupplierParam ccsp = CClassSupplierHelper.GetCClassSupplierData(param.code);

                if (ccsp.lstCClassSupplier == null || ccsp.lstCClassSupplier.Count == 0)
                {
                    response.code    = "500";
                    response.message = "No Data";
                }
                else
                {
                    response.code    = "200";
                    response.content = ccsp;
                }
            }
            return(response);
        }