Exemplo n.º 1
0
        private void toolStripButtonAlter_Click(object sender, EventArgs e)
        {
            var worksheet = this.reoGridControlUser.Worksheets[0];

            try
            {
                if (worksheet.SelectionRange.Rows != 1)
                {
                    throw new Exception();
                }
                int SupplierStorageInfoID = int.Parse(worksheet[worksheet.SelectionRange.Row, 0].ToString());
                var a1 = new SupplierStorageInfoModify(this.supplierid, SupplierStorageInfoID);
                a1.SetMode(FormMode.ALTER);
                a1.SetModifyFinishedCallback((AlterID) =>
                {
                    this.pagerWidget.Search(false, AlterID);
                });


                a1.Show();
            }
            catch
            {
                MessageBox.Show("请选择一项进行修改", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
        }
Exemplo n.º 2
0
        private void toolStripButtonAdd_Click(object sender, EventArgs e)
        {
            var a1 = new SupplierStorageInfoModify(this.supplierid);

            a1.SetMode(FormMode.ADD);

            a1.SetAddFinishedCallback((AddID) =>
            {
                this.pagerWidget.Search(false, AddID);
            });
            a1.Show();
        }