Esempio n. 1
0
        public HttpResponseMessage deleteProduct([FromBody] PRODUCT p)
        {
            Result <PRODUCT> ru = new Result <PRODUCT>();
            int result          = 0;

            try
            {
                result = DB_Product.deleteProduct(p);

                if (result == 1)
                {
                    ru.code    = "3020";
                    ru.success = "true";
                    ru.message = "删除成功!";
                }
                else
                {
                    ru.code    = "3021";
                    ru.success = "false";
                    ru.message = "删除失败";
                }
            }
            catch (Exception e) {
                ru.code    = "3022";
                ru.success = "false";
                ru.message = e.Message;
            }

            ru.systemTime = Conn.GetTimeStamp();
            ru.data       = null;

            return(Conn.toJson(ru));
        }