public ActionResult SubmitForm(TbFormEarlyWarningBegTime model, string type)
 {
     try
     {
         if (type == "add")
         {
             var data = _fewBegTimeLogic.Insert(model);
             return(Content(data.ToJson()));
         }
         else
         {
             var data = _fewBegTimeLogic.Update(model);
             return(Content(data.ToJson()));
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
        /// <summary>
        /// 修改数据
        /// </summary>
        public AjaxResult Update(TbFormEarlyWarningBegTime model)
        {
            if (model == null)
            {
                return(AjaxResult.Warning("参数错误"));
            }
            try
            {
                var count = Repository <TbFormEarlyWarningBegTime> .Update(model, p => p.ID == model.ID);

                if (count > 0)
                {
                    return(AjaxResult.Success());
                }
                return(AjaxResult.Error("操作失败"));
            }
            catch (Exception ex)
            {
                return(AjaxResult.Error(ex.ToString()));
            }
        }