Example #1
0
        /// <summary>
        /// 新增
        /// </summary>
        private void DoCreateMaterial()
        {
            FrmMaterialEdit frmMaterialEdit = new FrmMaterialEdit(null, true);

            frmMaterialEdit.DataSourceChanged += OnEditChanage;
            frmMaterialEdit.ShowDialog();
        }
Example #2
0
        /// <summary>
        /// 编辑
        /// </summary>
        private void ShowEditMaterial()
        {
            MaterialEntity editEntity = SelectedMaterialRow;

            if (editEntity == null)
            {
                MsgBox.Warn("没有要修改的数据。");
                return;
            }

            FrmMaterialEdit frmMaterialEdit = new FrmMaterialEdit(editEntity, false);

            frmMaterialEdit.DataSourceChanged += OnEditChanage;
            frmMaterialEdit.ShowDialog();
        }
Example #3
0
        //复制新增
        private void DoCopyNewMaterial()
        {
            MaterialEntity editEntity = SelectedMaterialRow;

            if (editEntity == null)
            {
                MsgBox.Warn("请选中一行作为样本数据。");
                return;
            }

            FrmMaterialEdit frmMaterialEdit = new FrmMaterialEdit(editEntity, true);

            frmMaterialEdit.DataSourceChanged += OnEditChanage;
            frmMaterialEdit.ShowDialog();
        }