Ejemplo n.º 1
0
        private void Save()
        {
            if (AtMng.DB.Legislation.HasErrors || AtMng.DB.Provision.HasErrors)
            {
                UIHelper.TableHasErrorsOnSaveMessBox(AtMng.DB);
            }
            else
            {
                try
                {
                    SaveRtfValues();
                    legislationBindingSource.EndEdit();
                    provisionBindingSource.EndEdit();
                    atLogic.BusinessProcess bp = AtMng.GetBP();

                    bp.AddForUpdate(AtMng.GetLegislation());
                    bp.AddForUpdate(AtMng.GetProvision());
                    bp.Update();

                    setEditMode(false);
                    SetRTFValues(false);
                }
                catch (Exception x)
                {
                    throw x;
                }
            }
        }
Ejemplo n.º 2
0
        public fLegislation(Form f)
            : base(f)
        {
            InitializeComponent();

            AtMng.GetLegislation().Load();
            AtMng.GetProvision().Load();

            legislationBindingSource.DataMember      = AtMng.DB.Legislation.TableName;
            provisionBindingSource.DataMember        = AtMng.DB.Provision.TableName;
            provisionBindingSource.DataSource        = AtMng.DB;
            legislationBindingSource.DataSource      = AtMng.DB;
            legislationBindingSource.CurrentChanged += new EventHandler(legislationBindingSource_CurrentChanged);
            provisionBindingSource.CurrentChanged   += new EventHandler(provisionBindingSource_CurrentChanged);
        }
Ejemplo n.º 3
0
        private void Delete()
        {
            try
            {   //not called
                if (UIHelper.ConfirmDelete())
                {
                    CurrentRow().Delete();
                    legislationBindingSource.EndEdit();

                    atLogic.BusinessProcess bp = AtMng.GetBP();

                    bp.AddForUpdate(AtMng.GetLegislation());
                    bp.AddForUpdate(AtMng.GetProvision());
                    bp.Update();
                }
            }
            catch (Exception x)
            {
                throw x;
            }
        }
Ejemplo n.º 4
0
 private void New()
 {
     appDB.LegislationRow legr = (appDB.LegislationRow)AtMng.GetLegislation().Add(null);
     legislationBindingSource.Position = legislationBindingSource.Find("LegislationId", legr.LegislationId);
 }