Пример #1
0
 /// <summary>
 /// 保存过滤时段表单(新增、修改)
 /// </summary>
 /// <param name="filterTimeEntity">过滤时段实体</param>
 /// <returns></returns>
 public void SaveForm(FilterTimeEntity filterTimeEntity)
 {
     try
     {
         string           keyValue = "";
         FilterTimeEntity entity   = this.GetEntity(filterTimeEntity.F_ObjectId);
         if (entity != null)
         {
             keyValue = entity.F_FilterTimeId;
         }
         service.SaveForm(keyValue, filterTimeEntity);
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #2
0
 /// <summary>
 /// 保存过滤时段表单(新增、修改)
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="filterTimeEntity">过滤时段实体</param>
 /// <returns></returns>
 public void SaveForm(string keyValue, FilterTimeEntity filterTimeEntity)
 {
     if (!string.IsNullOrEmpty(keyValue))
     {
         filterTimeEntity.Modify(keyValue);
         Base_FilterTime filterTime = Base_FilterTime.SingleOrDefault("where FilterTimeId=@0", keyValue);
         filterTime = EntityConvertTools.CopyToModel <FilterTimeEntity, Base_FilterTime>(filterTimeEntity, filterTime);
         filterTime.FilterTimeId = keyValue;
         filterTime.Update();
     }
     else
     {
         filterTimeEntity.Create();
         filterTimeEntity.FilterTimeId = filterTimeEntity.ObjectId;
         Base_FilterTime filterTime = new Base_FilterTime();
         filterTime = EntityConvertTools.CopyToModel <FilterTimeEntity, Base_FilterTime>(filterTimeEntity, null);
         filterTime.Insert();
     }
 }
Пример #3
0
 public ActionResult SaveForm(FilterTimeEntity filterTimeEntity)
 {
     filterTimeBLL.SaveForm(filterTimeEntity);
     return(Success("操作成功。"));
 }