Example #1
0
        private void tsbAdd_Click(object sender, EventArgs e)
        {
            FrmDrugCategory frm = new FrmDrugCategory();

            frm.ShowDialog(this);
            if (frm.DialogResult == DialogResult.OK)
            {
                this.RefreshListView();
            }
        }
Example #2
0
        private void tsbModify_Click(object sender, EventArgs e)
        {
            try
            {
                List <DrugCategory> selectedModelList = this.GetSelectModelList();

                if (selectedModelList.Count > 1)
                {
                    throw new ApplicationException("请选择一个修改内容。");
                }
                ModelService    modelService = new ModelService();
                FrmDrugCategory frm          = new FrmDrugCategory(selectedModelList[0]);
                frm.ShowDialog(this);
                if (frm.DialogResult == DialogResult.OK)
                {
                    this.RefreshListView();
                }
            }
            catch (Exception ex)
            {
                ErrorHandler.OnError(ex);
            }
        }