public ActionResult ActiveType(bool active, string typeId) { S101TypeEntity temp = dictionaryBLL.GetStandardTypeEntity(typeId); temp.STATUS = active ? "1" : "0"; dictionaryBLL.ModifyStandardTypeForm(typeId, temp); return(Success("操作成功。")); }
/// <summary> /// 修改基础数据分类表单 /// </summary> /// <param name="keyValue">主键值</param> /// <param name="s101TypeEntity">基础数据分类实体</param> /// <returns></returns> public void ModifyStandardTypeForm(string keyValue, S101TypeEntity s101TypeEntity) { try { typeService.SaveForm(keyValue, s101TypeEntity); } catch (Exception) { throw; } }
/// <summary> /// 新增基础数据分类表单 /// </summary> /// <param name="s101TypeEntity">基础数据分类实体</param> /// <returns></returns> public void CreateStandardTypeForm(S101TypeEntity s101TypeEntity) { try { typeService.SaveForm(null, s101TypeEntity); } catch (Exception) { throw; } }
public ActionResult SaveCodeType(string keyValue, S101TypeEntity s101TypeEntity) { if (string.IsNullOrEmpty(keyValue)) { dictionaryBLL.CreateStandardTypeForm(s101TypeEntity); } else { dictionaryBLL.ModifyStandardTypeForm(keyValue, s101TypeEntity); } return(Success("操作成功。")); }
/// <summary> /// 标准编码字典列表 /// </summary> /// <param name="typeName">分类名称</param> /// <returns></returns> public IEnumerable <S103CodeEntity> GetStandardCodeList(string typeName) { if (!string.IsNullOrEmpty(typeName)) { S101TypeEntity TypeEntity = GetStandardTypes().Where(x => x.NAME == typeName).FirstOrDefault(); if (TypeEntity != null) { return(this.GetStandardCodeList().Where(t => t.TYPEID == TypeEntity.TYPEID)); } } else { return(this.GetStandardCodeList()); } return(null); }