Пример #1
0
        /// <summary>
        /// 处理数据功能处理
        /// </summary>
        protected virtual void SetSaveDataProc(frmSearchBasic frmbase)
        {
            bool isSucces = false;

            //画面数据验证处理
            if (!this.validData.Validate())
            {
                return;
            }

            //获取需要编辑数据信息
            this.GetGrpDataItem();

            //数据检查功能处理
            this.GetInputCheck(ref isSucces);

            if (!isSucces)
            {
                return;
            }

            //获取表格一览信息
            this.GetDspDataList();

        }
Пример #2
0
        /// <summary>
        /// 数据查询功能处理
        /// </summary>
        protected virtual void SetSearchProc(frmSearchBasic frmBaseToolXC)
        {

            try
            {
                this.m_dicItemData.Clear ();

                //获取表格一览信息
                GetDspDataList();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #3
0
        /// <summary>
        /// 设定工具栏的有效性
        /// </summary>
        /// <param name="mode">编辑的状态</param>
        public static void SetCmdControl(frmSearchBasic frmbase)
        {

            int RecordCount = 0;

            if (frmbase.m_GridViewUtil != null
                 && frmbase.m_GridViewUtil.ParentGridView != null
                 && frmbase.m_GridViewUtil.ParentGridView.RowCount > 0)
            {
                RecordCount = frmbase.m_GridViewUtil.ParentGridView.RowCount;
            }

            //初始化状态
            frmbase.SearchButtonEnabled = true;

            if (RecordCount > 0)
            {
                frmbase.SelectAllButtonEnabled = true;
                frmbase.SelectOffButtonEnabled = true;

                frmbase.SaveButtonEnabled = true;
                frmbase.PrintButtonEnabled = true;
                frmbase.ExcelButtonEnabled = true;
            }
            else
            {
                frmbase.SelectAllButtonEnabled = false;
                frmbase.SelectOffButtonEnabled = false;

                frmbase.SaveButtonEnabled = false ;
                frmbase.PrintButtonEnabled = false;
                frmbase.ExcelButtonEnabled = false;
            }

            if (Common._isHistory)
            {
                frmbase.cmdSave.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                frmbase.cmdSelectAll .Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                frmbase.cmdSelectOff.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;

            }
        }