Ejemplo n.º 1
0
        private void tsbAdd_Click(object sender, EventArgs e)
        {
            FrmStorehouse frm = new FrmStorehouse();

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

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