Exemplo n.º 1
0
        private void bNAdd_Click(object sender, EventArgs e)
        {
            Fact obj = new Fact();

            obj.CreationDate = DateTime.Now;
            obj.FactType     = Config.Session.FactTypeUtils.TypeFact;

            FormFactCard form = new FormFactCard(obj, FormMode.Add);

            form.ShowDialog();

            if (form.IsObjectAddedIntoDataBase)
            {
                ApplyFilter();
            }
        }
Exemplo n.º 2
0
        private void bNEdit_Click(object sender, EventArgs e)
        {
            int?id = GetCurrentObjectId();

            if (id.HasValue)
            {
                Fact obj = Config.Session.FactUtils.GetById(id.Value);

                FormFactCard form = new FormFactCard(obj, FormMode.Edit);
                form.ShowDialog();

                if (form.IsObjectAddedIntoDataBase)
                {
                    ApplyFilter();
                }
            }
        }