Example #1
0
        /// <summary>
        /// 置底
        /// </summary>
        /// <returns>影响行数</returns>
        public int SetBottom()
        {
            RowCount = RowIndex;
            int    returnValue = 0;
            string targetId    = "";

            if (dataTableFlag)
            {
                targetId = BaseSortLogic.GetNextId(this.dataView, this.EntityId);
            }
            else
            {
                targetId = BaseSortLogic.GetNextIdDyn(this.lstT, this.EntityId);
            }
            if (targetId.Length > 0)
            {
                DotNetService dotNetService = new DotNetService();
                string        sequence      = dotNetService.SequenceService.GetSequence(UserInfo, dataTableFlag ? this.dataView.Table.TableName : tabelName);
                if (dotNetService.SequenceService is ICommunicationObject)
                {
                    ((ICommunicationObject)dotNetService.SequenceService).Close();
                }
                if (dataTableFlag)
                {
                    returnValue = BaseBusinessLogic.SetProperty(this.dataView.Table, this.EntityId, BaseBusinessLogic.FieldSortCode, sequence);
                }
                else
                {
                    returnValue = BaseBusinessLogic.SetPropertyDyn(this.lstT, this.EntityId, BaseBusinessLogic.FieldSortCode, sequence);
                    SetCRow();
                }
            }
            else
            {
                if (BaseSystemInfo.ShowInformation)
                {
                    MessageBox.Show(AppMessage.MSG0022, AppMessage.MSG0000, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            return(returnValue);
        }