Exemple #1
0
        private void BtnAddItem_Click(object sender, EventArgs e)
        {
            FmTransportMaxInfo fm = new FmTransportMaxInfo();

            fm.SelectValue += (obj) =>
            {
                Model.Tb_fin_transport_max info = obj as Model.Tb_fin_transport_max;
                mDataGrid1.AddItem <Model.Tb_fin_transport_max>(info);
            };
            fm.ShowDialog();
        }
Exemple #2
0
        private void BtnEditItem_Click(object sender, EventArgs e)
        {
            if (mDataGrid1.CurrentRow == null)
            {
                return;
            }

            Model.Tb_fin_transport_max old = mDataGrid1.GetCurrentEntity() as Model.Tb_fin_transport_max;

            FmTransportMaxInfo fm = new FmTransportMaxInfo(old);

            fm.SelectValue += (obj) =>
            {
                Model.Tb_fin_transport_max info = obj as Model.Tb_fin_transport_max;
                mDataGrid1.EditCurrentItem <Model.Tb_fin_transport_max>(info);
            };
            fm.ShowDialog();
        }