コード例 #1
0
        /// <summary>
        /// 保存时间
        /// </summary>
        private async Task <bool> SaveTimeAsync()
        {
            Dictionary <string, string> patchjson = new Dictionary <string, string>();
            string start  = timeEdit_start.Text;
            string end    = timeEdit_end.Text;
            string record = dateTimePicker1.Value.ToString("yyyy-MM-dd");

            if (start == videoplay.StartTime && end == videoplay.EndTime && record == videoplay.RecordTime)
            {
                return(true);
            }
            patchjson.Add("start_time", start);
            patchjson.Add("end_time", end);
            patchjson.Add("record_time", record);
            string json = JsonConvert.SerializeObject(patchjson);
            bool   win  = await VideoData.SaveTimeAsync(videoplay.Id, json);

            return(win);
        }