如何使用json节省时间从kendo timepicker到sqlserver [英] How to save time from kendo timepicker with json into sqlserver

查看:83
本文介绍了如何使用json节省时间从kendo timepicker到sqlserver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用json将kendo timepicker的时间节省到sqlserver?

How to save time from kendo timepicker with json into sqlserver?

推荐答案

嗯,有几个步骤



1 - 从时间选择器到变量获取时间。



2 - 使用stringify如果必须将其转换为JSON(尽管我没有提示你为什么这样做)



3 - 进行AJAX调用以将值传递给服务器



4 - 将其插入数据库





由于某种原因,您将有两个字段输入您的问题。你的主题是好的,但重复它是一个很好的迹象表明你没有尝试为自己做任何事情,并且不清楚你所问的是否真的是你想做的事情。您应该解释您尝试过的内容以及为什么要这样做。例如,为什么你认为你需要JSON?你是否意识到SQL Server在服务器上,而不是客户端?



Well, there's several steps

1 - grab the time from the time picker in to a variable.

2 - using stringify if you MUST turn it in to JSON ( although I have no clue why you'd do that )

3 - make an AJAX call to pass the value to the server

4 - insert it in to the database


You are given two fields to enter your question for a reason. Your subject line is good, but repeating it is a good indication that you've not tried to do anything for your self, and it's not clear if what you're asking is really what you want to do. You should explain what you've tried and why you want to do this. Why do you think you need JSON, for example ? Do you realise SQL Server is on the server, and not the client ?

var time = timepicker.value()





是你如何得到时间的。从那里,真的,你需要定义你想做什么,为什么。



当然,你还需要找出你需要保存的其他数据只是节省一段时间进入数据库并没有任何帮助。



is how you get the time out. From there, really, you need to define what you want to do, and why.

Of course, you also need to work out what other data you need to save, just saving a time in to the database doesn't really help with anything.


这篇关于如何使用json节省时间从kendo timepicker到sqlserver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆