/// <summary>
        /// 在rowIndex上新增空行
        /// </summary>
        /// <param name="rowIndex"></param>
        public void AddNewItemEvent(string rowIndex)
        {
            List <AccountSetItem> items = new List <AccountSetItem>();

            for (int i = 0; i < _IAccountSetView.AccountSetItemList.Count; i++)
            {
                if (Convert.ToInt32(rowIndex) == i)
                {
                    AccountSetUtility.AddNullItem(items);
                }
                items.Add(_IAccountSetView.AccountSetItemList[i]);
            }
            _IAccountSetView.AccountSetItemList = items;
        }
 public void InitView(bool isPostback)
 {
     AttachViewEvent();
     _IAccountSetView.OperationTitle = AccountSetUtility.AddPageTitle;
     _IAccountSetView.Message        = string.Empty;
     _IAccountSetView.AccountSetPara =
         _IAccountSetFacade.GetAccountSetParaByCondition("", FieldAttributeEnum.AllFieldAttribute,
                                                         MantissaRoundEnum.AllMantissaRound,
                                                         BindItemEnum.AllBindItem);
     if (!isPostback)
     {
         _IAccountSetView.AccountSetItemList = AccountSetUtility.AddNullItem(new List <AccountSetItem>());
     }
     _IAccountSetView.SetbtnPasteVisible = _IAccountSetView.SessionCopyAccountSet == null ? false : true;
 }
 public void AddEvent()
 {
     //数据验证过程
     if (!new AccountSetValidater(_IAccountSetView).Vaildate())
     {
         return;
     }
     //执行事务过程
     try
     {
         List <AccountSetItem> accountSetItems = AccountSetUtility.RemoveNullItem(_IAccountSetView.AccountSetItemList);
         _IAccountSetFacade.CreateAccountSetFacade(_IAccountSetView.AccountSetName, _IAccountSetView.Description,
                                                   accountSetItems);
         ToAccountSetListPage();
     }
     catch (ApplicationException ae)
     {
         _IAccountSetView.Message = ae.Message;
     }
 }
 /// <summary>
 /// 在界面新增行中选择Para,实例化Para行,并在列表最后增加空行
 /// </summary>
 /// <param name="accountSetParaID"></param>
 public void AddItemEvent(string accountSetParaID)
 {
     _IAccountSetView.AccountSetItemList =
         AccountSetUtility.AddNullItem(
             UpdateRowPara((_IAccountSetView.AccountSetItemList.Count - 1).ToString(), accountSetParaID));
 }
 /// <summary>
 /// 粘贴事件,绑定AccountSet对象,对于AccountSetItem清楚-1行,最后一样加上空行
 /// </summary>
 public void btnPasteEvent()
 {
     new AccountSetDataBinder(_IAccountSetView, _IAccountSetFacade).DataBind(_IAccountSetView.SessionCopyAccountSet);
     _IAccountSetView.AccountSetItemList =
         AccountSetUtility.AddNullItem(AccountSetUtility.RemoveNullItem(_IAccountSetView.AccountSetItemList));
 }