/// <summary>
        /// 根据id删除 XFX_DictionaryValue信息
        /// </summary>
        /// <param name="id"></param>
        public void DeleteById(int?id)
        {
            //查找数据
            XFX_DictionaryValue navigation = this.datacontext.XFX_DictionaryValue.Where(p => p.id == id).FirstOrDefault();

            this.datacontext.XFX_DictionaryValue.DeleteOnSubmit(navigation);
            this.datacontext.SubmitChanges();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 编辑XFX_DictionaryValue信息 0 成功 1失败
        /// </summary>
        /// <param name="model">模型实体信息</param>
        /// <returns>0/1</returns>
        public int UpdateDataToXFX_DictionaryValueTable(XFX_DictionaryValue model)
        {
            int result = 1;

            if (model != null)
            {
                try
                {
                    baseDataModel.UpdateDataToXFX_DictionaryValueTable(model);
                    result = 0;
                }
                catch
                {
                }
            }

            return(result);
        }
 /// <summary>
 /// 编辑XFX_DictionaryValue信息 0 成功 1失败
 /// </summary>
 /// <param name="model">导航信息</param>
 public void UpdateDataToXFX_DictionaryValueTable(XFX_DictionaryValue model)
 {
     this.datacontext.SubmitChanges();
 }
 /// <summary>
 /// 新增XFX_DictionaryValue信息 0 成功 1失败
 /// </summary>
 /// <param name="model">导航信息</param>
 public void InsertDataToXFX_DictionaryValueTable(XFX_DictionaryValue model)
 {
     this.datacontext.XFX_DictionaryValue.InsertOnSubmit(model);
     this.datacontext.SubmitChanges();
 }