Beispiel #1
0
        protected void btSure_Click(object sender, EventArgs e)
        {
            if (Request["DicId"] != null)
            {
                var dataDicList = power.GetDataDicInfoById(DicId);
                foreach (var dataInfo in dataDicList)
                {
                    dataInfo.Id       = DicId;
                    dataInfo.InfoName = this.txtDataName.Text;
                    power.UpdateDataDic(dataInfo);
                }

                WebMessageBox(this.Page, string.Format("'操作成功!',RefreshParentAndCloseSelf"));
            }
            else
            {
                DataDicInfoUI dataInfo = new DataDicInfoUI();
                dataInfo.InfoName = this.txtDataName.Text;
                power.AddDataDic(dataInfo);
                WebMessageBox(this.Page, string.Format("'操作成功!',RefreshParentAndCloseSelf"));
            }
        }
Beispiel #2
0
        public void AddDataDic(DataDicInfoUI dataInfo)
        {
            DataDicInfo dataInfoModel = EntityMapping.Auto <DataDicInfoUI, DataDicInfo>(dataInfo);

            DataDicinfoContext.Add(dataInfoModel);
        }