Esempio n. 1
0
        public ActionResult ActiveCode(bool active, string typeId, string verId, string codeId)
        {
            List <string> codes = codeId.Split(',').ToList();

            foreach (string code in codes)
            {
                S103CodeEntity temp = dictionaryBLL.GetStandardCodeEntity(typeId, verId, code);
                temp.STATUS = active ? "1" : "0";
                dictionaryBLL.ModifyStandardCodeForm(typeId, verId, code, temp);
            }
            return(Success("操作成功。"));
        }
Esempio n. 2
0
 public ActionResult SaveCode(string typeId, string verId, string codeId, S103CodeEntity s103CodeEntity)
 {
     if (string.IsNullOrEmpty(codeId))
     {
         dictionaryBLL.CreateStandardCodeForm(s103CodeEntity);
     }
     else
     {
         dictionaryBLL.ModifyStandardCodeForm(typeId, verId, codeId, s103CodeEntity);
     }
     return(Success("操作成功。"));
 }
Esempio n. 3
0
 /// <summary>
 /// 修改基础数据代码表单
 /// </summary>
 /// <param name="keyValue">主键值</param>
 /// <param name="s103CodeEntity">基础数据代码实体</param>
 /// <returns></returns>
 public void ModifyStandardCodeForm(string typeId, string verId, string code, S103CodeEntity s103CodeEntity)
 {
     try
     {
         if (s103CodeEntity.STATUS == "1")
         {
             var ver = verService.GetEntity(typeId, verId);
             if (ver.STATUS != "1")
             {
                 throw new Exception("版本号未启用");
             }
         }
         codeService.SaveForm(typeId, verId, code, s103CodeEntity);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 4
0
 /// <summary>
 /// 新增基础数据代码表单
 /// </summary>
 /// <param name="s102VerEntity">基础数据代码实体</param>
 /// <returns></returns>
 public void CreateStandardCodeForm(S103CodeEntity s103CodeEntity)
 {
     try
     {
         if (s103CodeEntity.STATUS == "1")
         {
             var ver = verService.GetEntity(s103CodeEntity.TYPEID, s103CodeEntity.VERID);
             if (ver.STATUS != "1")
             {
                 throw new Exception("版本号未启用");
             }
         }
         codeService.SaveForm(null, null, null, s103CodeEntity);
     }
     catch (Exception)
     {
         throw;
     }
 }