Example #1
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                FM.DB.FileOffice.ColumnChanged -= new System.Data.DataColumnChangeEventHandler(dt_ColumnChanged);
                FM.GetFileOffice().OnUpdate -= new atLogic.UpdateEventHandler(ucFileOffice_OnUpdate);

                components.Dispose();
            }
            base.Dispose(disposing);
        }
Example #2
0
        public void bindFileOfficeData(lmDatasets.atriumDB.FileOfficeDataTable dt)
        {
            officeIducOfficeSelectBox.AtMng = FM.AtMng;

            fileOfficeBindingSource.DataSource = dt.DataSet;
            fileOfficeBindingSource.DataMember = dt.TableName;

            dt.ColumnChanged += new DataColumnChangeEventHandler(dt_ColumnChanged);
            FM.GetFileOffice().OnUpdate += new atLogic.UpdateEventHandler(ucFileOffice_OnUpdate);

            ApplySecurity(CurrentRow());
        }
Example #3
0
        public override void ApplySecurity(DataRow dr)
        {
            if (FileForm() != null && FileForm().ReadOnly)
            {
                return;
            }

            atriumDB.FileOfficeRow cbr = (atriumDB.FileOfficeRow)dr;
            UIHelper.EnableControls(fileOfficeBindingSource, FM.GetFileOffice().CanEdit(cbr));
            if (!InEditMode)
            {
                UIHelper.EnableCommandBarCommand(tsDelete, FM.GetFileOffice().CanDelete(cbr));
            }
        }