public ActionResult ActiveVersion(bool active, string typeId, string verId) { S102VerEntity temp = dictionaryBLL.GetStandardVerEntity(typeId, verId); temp.STATUS = active ? "1" : "0"; dictionaryBLL.ModifyStandardVerForm(typeId, verId, temp); return(Success("操作成功。")); }
public ActionResult SaveCodeVersion(string typeId, string versionId, S102VerEntity s102VerEntity) { if (string.IsNullOrEmpty(versionId)) { dictionaryBLL.CreateStandardVerForm(s102VerEntity); } else { dictionaryBLL.ModifyStandardVerForm(typeId, versionId, s102VerEntity); } return(Success("操作成功。")); }
/// <summary> /// 修改基础数据版本表单 /// </summary> /// <param name="keyValue">主键值</param> /// <param name="s102VerEntity">基础数据版本实体</param> /// <returns></returns> public void ModifyStandardVerForm(string typeId, string verId, S102VerEntity s102VerEntity) { try { if (s102VerEntity.STATUS == "1") { var type = typeService.GetEntity(typeId); if (type.STATUS != "1") { throw new Exception("基础数据分类未启用"); } } verService.SaveForm(typeId, verId, s102VerEntity); } catch (Exception) { throw; } }
/// <summary> /// 新增基础数据版本表单 /// </summary> /// <param name="s102VerEntity">基础数据版本实体</param> /// <returns></returns> public void CreateStandardVerForm(S102VerEntity s102VerEntity) { try { if (s102VerEntity.STATUS == "1") { var type = typeService.GetEntity(s102VerEntity.TYPEID); if (type.STATUS != "1") { throw new Exception("基础数据分类未启用"); } } verService.SaveForm(null, null, s102VerEntity); } catch (Exception) { throw; } }