internal override async Task AddRecord()
        {
            try
            {
                _materail  = new EditingMaterialForm();
                _presenter = new MaterialPresenter(_materail, (Guid)ReasonCustomerID, Customer);
                _materail.ShowDialog();

                await Update();
            }
            catch (Exception ex)
            {
                ShowError(ex.Message);
            }
        }
        internal override async Task EditRecord()
        {
            try
            {
                if (ExistsRecord)
                {
                    _materail  = new EditingMaterialForm();
                    _presenter = new MaterialPresenter(_materail, Item.ID);
                    _materail.ShowDialog();

                    await Update();
                }
            }
            catch (Exception ex)
            {
                ShowError(ex.Message);
            }
        }
示例#3
0
        public Form1(MaterialRef.MaterialServiceClient service, ModelMaterial model)
        {
            InitializeComponent();

            MaterialPresenter presenter = new MaterialPresenter(model, materialSetupControl1);
        }