Пример #1
0
        //private object _RecordID;
        //[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        //public object RecordID
        //{
        //    get { return _RecordID; }
        //    set
        //    {
        //        if (Compare(_RecordID, value)) return;

        //        object oldValue = _RecordID;
        //        _RecordID = value;
        //        OnChanged(new BaseOptionChangedEventArgs("RecordID", oldValue, value));
        //    }
        //}
        //internal void ChangeFormID(Type formType)
        //{
        //    if (AutoChangeFormID)
        //        FormID = FormHelper.GetFormID(formType, SenderHandle, RecordID);
        //}


        //[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        //public int BindingFormControlsCount { get; internal set; }
        //[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        //public int BindingDataCount { get; internal set; }

        public override void Assign(BaseOptions options)
        {
            BeginUpdate();
            try
            {
                base.Assign(options);
                var op = options as BaseFormOptions;
                if (op != null)
                {
                    _autoInitText    = op.AutoInitText;
                    _autoWindowState = op.AutoWindowState;
                    //_AutoChangeFormID = opts.AutoChangeFormID;
                    //_FormID = opts.FormID;
                    //_Text = opts.Text;
                    //_SenderHandle = opts.SenderHandle;
                    //_FormStyle = opts.FormStyle;
                    _isClosing = op.IsClosing;
                    _isLoading = op.IsLoading;
                    //_IsRefreshableFormControls = opts.IsRefreshableFormControls;
                    _isPrintable = op.IsPrintable;
                    _isValidable = op.IsValidable;
                    _readOnly    = op.ReadOnly;
                    //_RecordID = opts.RecordID;
                }
            }
            finally
            {
                EndUpdate();
            }
        }
Пример #2
0
        //public virtual void InitStyleFormatCondition() { }

        public override void Assign(BaseOptions options)
        {
            BeginUpdate();
            try
            {
                base.Assign(options);
                var op = options as BaseGridViewOptions;
                if (op != null)
                {
                    _autoInit       = op.AutoInit;
                    _dataKeyName    = op.DataKeyName;
                    _dataStatusName = op.DataStatusName;


                    _topRecordsCount     = op.TopRecordsCount;
                    _viewName            = op.ViewName;
                    _noLock              = op.NoLock;
                    _pendingWhereClause  = op.PendingWhereClause;
                    _approvedWhereClause = op.ApprovedWhereClause;
                }
            }
            finally
            {
                EndUpdate();
            }
        }
Пример #3
0
 public override void Assign(BaseOptions options)
 {
     BeginUpdate();
     try
     {
         base.Assign(options);
         var op = options as XtraGridViewOptions;
         if (op != null)
         {
             _gridView = op.GridView;
         }
     }
     finally
     {
         EndUpdate();
     }
 }
Пример #4
0
 public override void Assign(BaseOptions options)
 {
     BeginUpdate();
     try
     {
         base.Assign(options);
         var op = options as CardReaderOptions;
         if (op != null)
         {
             _readStartKey  = op.ReadStartKey;
             _readEndKey    = op.ReadEndKey;
             _cardReadSpeed = op.CardReadSpeed;
         }
     }
     finally
     {
         EndUpdate();
     }
 }
Пример #5
0
        //private string _selectStoredProcedureName = "dbo.SP_GetButtonBrowse";
        ///// <summary>
        ///// მონაცემის ამოღების StoredProcedure-ის სახელი.
        ///// </summary>
        //[Browsable(true),
        //Category("Zek"),
        //Description("მონაცემის ამოღების StoredProcedure-ის სახელი."),
        //DefaultValue("dbo.SP_GetButtonBrowse")]
        //public string SelectStoredProcedureName
        //{
        //    get { return _selectStoredProcedureName; }
        //    set
        //    {
        //        if (Compare(_selectStoredProcedureName, value)) return;
        //        string oldValue = _selectStoredProcedureName;
        //        _selectStoredProcedureName = value;
        //        OnChanged(new BaseOptionChangedEventArgs("SelectStoredProcedureName", oldValue, value));
        //    }
        //}



        public override void Assign(BaseOptions options)
        {
            BeginUpdate();
            try
            {
                base.Assign(options);
                var op = options as ButtonBrowseOptions;
                if (op != null)
                {
                    _autoParsePrimaryKey = op.AutoParsePrimaryKey;
                    _allowNullInput      = op.AllowNullInput;
                    //_ServerMode = opts.ServerMode;
                    _allowBrowse = op.AllowBrowse;
                    //_selectStoredProcedureName = opts.SelectStoredProcedureName;
                }
            }
            finally
            {
                EndUpdate();
            }
        }
Пример #6
0
        public override void Assign(BaseOptions options)
        {
            BeginUpdate();
            try
            {
                base.Assign(options);
                var op = options as ListFormOptions;
                if (op != null)
                {
                    _autoRefresh         = op.AutoRefresh;
                    _autoRefreshOnLoad   = op.AutoRefreshOnLoad;
                    _autoShowFilterPanel = op.AutoShowFilterPanel;
                    _closeAfterChoose    = op.CloseAfterChoose;
                    _editFormStyle       = op.EditFormStyle;
                    _isAddable           = op.IsAddable;
                    _isApprovable        = op.IsApprovable;
                    _isBesftFitable      = op.IsBesftFitable;
                    _isBlockable         = op.IsBlockable;
                    _isChooseable        = op.IsChooseable;
                    _isDeletable         = op.IsDeletable;
                    _dsDisapprovable     = op.IsDisapprovable;
                    _isEditable          = op.IsEditable;
                    _isExportable        = op.IsExportable;
                    _isCopyable          = op.IsCopyable;
                    _isFilterable        = op.IsFilterable;
                    _isFilterApprovable  = op.IsFilterApprovable;
                    _isRefreshable       = op.IsRefreshable;
                    _isSumable           = op.IsSumable;
                    _isSystemColumnsable = op.IsSystemColumnsable;
                    _isTopable           = op.IsTopable;
                    _isUnblockable       = op.IsUnblockable;

                    _listFormStyle = op.ListFormStyle;
                }
            }
            finally
            {
                EndUpdate();
            }
        }
Пример #7
0
        //private string _TextFormat = "{0} [{1}]{2}";
        //[Browsable(true), Category("Zek"), Description("ფორმის ტექსტის ავტომატურად შეცვლის ფორმატი."), DefaultValue("{0} [{1}]{2}")]
        //public string TextFormat
        //{
        //    get { return _TextFormat; }
        //    set
        //    {
        //        if (value == null) value = string.Empty;

        //        if (Compare(_TextFormat, value)) return;
        //        string oldValue = _TextFormat;
        //        _TextFormat = value;
        //        OnChanged(new BaseOptionChangedEventArgs("TextFormat", oldValue, value));
        //    }
        //}


        //private Zek.Data.DatabaseStatus _Status = Zek.Data.DatabaseStatus.Pending;
        //[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        //public Zek.Data.DatabaseStatus Status
        //{
        //    get { return _Status; }
        //    set
        //    {
        //        if (_Status == value) return;
        //        Zek.Data.DatabaseStatus oldValue = _Status;
        //        _Status = value;
        //        OnChanged(new BaseOptionChangedEventArgs("Status", oldValue, value));
        //    }
        //}


        //private Zek.Data.DatabaseAction _Action = Zek.Data.DatabaseAction.Add;
        //[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        //public Zek.Data.DatabaseAction Action
        //{
        //    get { return _Action; }
        //    set
        //    {
        //        if (_Action == value) return;
        //        Zek.Data.DatabaseAction oldValue = _Action;
        //        _Action = value;
        //        OnChanged(new BaseOptionChangedEventArgs("Action", oldValue, value));
        //    }
        //}

        //private bool _AutoUpdateAction = true;
        //[Browsable(true), Category("Zek"), Description("ავტომატურად ცვლის Action-ს."), DefaultValue(true)]
        //public bool AutoUpdateAction
        //{
        //    get { return _AutoUpdateAction; }
        //    set
        //    {
        //        if (_AutoUpdateAction == value) return;
        //        bool oldValue = _AutoUpdateAction;
        //        _AutoUpdateAction = value;
        //        OnChanged(new BaseOptionChangedEventArgs("AutoUpdateAction", oldValue, value));
        //    }
        //}


        //private bool _IsSaveAndCloseExecuting = false;
        //[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        //public bool IsSaveAndCloseExecuting
        //{
        //    get { return _IsSaveAndCloseExecuting; }
        //    set
        //    {
        //        if (_IsSaveAndCloseExecuting == value) return;
        //        bool oldValue = _IsSaveAndCloseExecuting;
        //        _IsSaveAndCloseExecuting = value;
        //        OnChanged(new BaseOptionChangedEventArgs("IsSaveAndCloseExecuting", oldValue, value));
        //    }
        //}


        //[Browsable(false)]
        //public string ActionText
        //{
        //    get
        //    {
        //        switch (Action)
        //        {
        //            case Zek.Data.DatabaseAction.Add:
        //                return Resources.Add;

        //            case Zek.Data.DatabaseAction.Edit:
        //                return Resources.Edit;

        //            case Zek.Data.DatabaseAction.Delete:
        //                return Resources.Delete;
        //        }
        //        return string.Empty;
        //    }
        //}


        //internal void OnRecordIDChanged(object recordID)
        //{
        //    if (recordID != null && Action == Zek.Data.DatabaseAction.Add)
        //    {
        //        if (recordID is byte && (byte)recordID != 0)
        //            Action = Zek.Data.DatabaseAction.Edit;
        //        else if (recordID is short && (short)recordID != 0)
        //            Action = Zek.Data.DatabaseAction.Edit;
        //        else if (recordID is int && (int)recordID != 0)
        //            Action = Zek.Data.DatabaseAction.Edit;
        //        else if (recordID is long && (long)recordID != 0)
        //            Action = Zek.Data.DatabaseAction.Edit;
        //        else if (recordID is string && !string.IsNullOrEmpty((string)recordID))
        //            Action = Zek.Data.DatabaseAction.Edit;
        //        else if (recordID is Guid && (Guid)recordID != Guid.Empty)
        //            Action = Zek.Data.DatabaseAction.Edit;
        //        else if (recordID is DateTime)
        //            Action = Zek.Data.DatabaseAction.Edit;
        //    }
        //}


        public override void Assign(BaseOptions options)
        {
            BeginUpdate();
            try
            {
                base.Assign(options);
                var op = options as EditFormOptions;
                if (op != null)
                {
                    _promptSave = op.PromptSave;
                    //_TextFormat = opts.TextFormat;
                    _isChanged = op.IsChanged;
                    //_Status = opts.Status;
                    //_Action = opts.Action;
                    //_AutoUpdateAction = opts.AutoUpdateAction;
                }
            }
            finally
            {
                EndUpdate();
            }
        }
Пример #8
0
 public virtual void Assign(BaseOptions options)
 {
 }