Exemplo n.º 1
0
        public string AddRequestName(CbRequestNameModel model)
        {
            var enums = new CommonDAL().GetEnumModels();
            var entry = enums.Where(m => (m.ItemSeq == model.RequestSeq || m.ItemValue == model.RequestName) && m.GroupSeq == 2);

            if (entry.Count() > 0)
            {
                return(" 此记录已存在,请重新打开界面");
            }
            else
            {
                int count = dal.AddEnumModel(new EnumModel {
                    ItemSeq   = model.RequestSeq,
                    ItemValue = model.RequestName,
                    GroupSeq  = 2,
                    GroupName = "客户特殊要求标签名"
                });
                if (count == 1)
                {
                    return(null);
                }
                return("新增失败");
            }
        }