Beispiel #1
0
        public IList <ACBankAccountPaymentEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression)
        {
            IList <ACBankAccountPaymentEntity> aCBankAccountPaymentEntityList = new List <ACBankAccountPaymentEntity>();

            try
            {
                if (pageSize == -1)
                {
                    pageSize = 1000000000;
                }

                if (String.IsNullOrEmpty(sortExpression))
                {
                    sortExpression = ACBankAccountPaymentEntity.FLD_NAME_BankAccountPaymentID + " " + SQLConstants.SORT_ORDER_DESCENDING;
                }

                startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1;

                aCBankAccountPaymentEntityList = FCCACBankAccountPayment.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression);

                if (aCBankAccountPaymentEntityList != null && aCBankAccountPaymentEntityList.Count > 0)
                {
                    totalRowCount = aCBankAccountPaymentEntityList[0].TotalRowCount;
                }
            }
            catch (Exception ex)
            {
            }

            return(aCBankAccountPaymentEntityList ?? new List <ACBankAccountPaymentEntity>());
        }
        private void SaveACBankAccountPaymentEntity()
        {
            if (ValidationInput())
            {
                if (IsValid)
                {
                    try
                    {
                        ACBankAccountPaymentEntity aCBankAccountPaymentEntity = BuildACBankAccountPaymentEntity();

                        Int64 result = -1;

                        if (aCBankAccountPaymentEntity.IsNew)
                        {
                            result = FCCACBankAccountPayment.GetFacadeCreate().Add(aCBankAccountPaymentEntity, DatabaseOperationType.Add, TransactionRequired.No);
                        }
                        else
                        {
                            String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(ACBankAccountPaymentEntity.FLD_NAME_BankAccountPaymentID, aCBankAccountPaymentEntity.BankAccountPaymentID.ToString(), SQLMatchType.Equal);
                            result = FCCACBankAccountPayment.GetFacadeCreate().Update(aCBankAccountPaymentEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No);
                        }

                        if (result > 0)
                        {
                            BindACBankAccountPaymentList();
                            PrepareInitialViewPaymentItem();
                            CurrentACBankAccountPaymentItemList = new List <ACBankAccountPaymentItem_DetailedEntity>();
                            BindACBankAccountPaymentItemList();
                            BuildTotalValueLabel();

                            if (aCBankAccountPaymentEntity.IsNew)
                            {
                                MiscUtil.ShowMessage(lblMessage, "Bank Account Payment Information has been added successfully.", false);
                            }
                            else
                            {
                                MiscUtil.ShowMessage(lblMessage, "Bank Account Payment Information has been updated successfully.", false);
                            }
                        }
                        else
                        {
                            if (aCBankAccountPaymentEntity.IsNew)
                            {
                                MiscUtil.ShowMessage(lblMessage, "Failed to add Bank Account Payment Information.", false);
                            }
                            else
                            {
                                MiscUtil.ShowMessage(lblMessage, "Failed to update Bank Account Payment Information.", false);
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        MiscUtil.ShowMessage(lblMessage, ex.Message, true);
                    }
                }
            }
        }
Beispiel #3
0
        public IList <ACBankAccountPaymentEntity> GetData()
        {
            IList <ACBankAccountPaymentEntity> aCBankAccountPaymentEntityList = new List <ACBankAccountPaymentEntity>();

            try
            {
                aCBankAccountPaymentEntityList = FCCACBankAccountPayment.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load);

                if (aCBankAccountPaymentEntityList != null && aCBankAccountPaymentEntityList.Count > 0)
                {
                    totalRowCount = aCBankAccountPaymentEntityList[0].TotalRowCount;
                }
            }
            catch (Exception ex)
            {
            }

            return(aCBankAccountPaymentEntityList ?? new List <ACBankAccountPaymentEntity>());
        }