コード例 #1
0
ファイル: frm_config.cs プロジェクト: radtek/One
        private void BtnClassRole_Click(object sender, EventArgs e)
        {
            List <CMNDICT> dictList = new List <CMNDICT>();

            if (clbClass.SelectedItems.Count == 0)
            {
                MsgBoxEx.Info("Please select at least one item.");
                return;
            }

            foreach (WmClassificationItemEntity item in clbClass.CheckedItems)
            {
                CMNDICT model = new CMNDICT();

                model.DICTID = "3000";
                model.CODE   = item.ID.ToString();
                model.NAME   = item.NAME.ToString();

                dictList.Add(model);
            }

            IsysService service = sysService.GetService();

            service.AddDict(dictList);

            MsgBoxEx.Info("Save success, please refresh the data.");
        }