public IList <ACBankAccountEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression) { IList <ACBankAccountEntity> aCBankAccountEntityList = new List <ACBankAccountEntity>(); try { if (pageSize == -1) { pageSize = 1000000000; } if (String.IsNullOrEmpty(sortExpression)) { sortExpression = ACBankAccountEntity.FLD_NAME_BankAccountID + " " + SQLConstants.SORT_ORDER_DESCENDING; } startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1; aCBankAccountEntityList = FCCACBankAccount.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression); if (aCBankAccountEntityList != null && aCBankAccountEntityList.Count > 0) { totalRowCount = aCBankAccountEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(aCBankAccountEntityList ?? new List <ACBankAccountEntity>()); }
private void GetBankInfo() { ACBankAccountEntity entity = FCCACBankAccount.GetFacadeCreate().GetByID(Int64.Parse(ddlBankList.SelectedValue)); txtBankName.Text = entity.BankAccountName; txtBankAddress.Text = entity.BankAddress; }
private void SaveACBankAccountEntity() { if (IsValid) { try { ACBankAccountEntity aCBankAccountEntity = BuildACBankAccountEntity(); Int64 result = -1; if (aCBankAccountEntity.IsNew) { result = FCCACBankAccount.GetFacadeCreate().Add(aCBankAccountEntity, DatabaseOperationType.Add, TransactionRequired.No); } else { String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(ACBankAccountEntity.FLD_NAME_BankAccountID, aCBankAccountEntity.BankAccountID.ToString(), SQLMatchType.Equal); result = FCCACBankAccount.GetFacadeCreate().Update(aCBankAccountEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No); } if (result > 0) { _BankAccountID = 0; _ACBankAccountEntity = new ACBankAccountEntity(); PrepareInitialView(); BindACBankAccountList(); if (aCBankAccountEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "A CBank Account Information has been added successfully.", false); } else { MiscUtil.ShowMessage(lblMessage, "A CBank Account Information has been updated successfully.", false); } } else { if (aCBankAccountEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Failed to add A CBank Account Information.", false); } else { MiscUtil.ShowMessage(lblMessage, "Failed to update A CBank Account Information.", false); } } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } }
protected void lvACBankAccount_ItemCommand(object sender, ListViewCommandEventArgs e) { Int64 BankAccountID; Int64.TryParse(e.CommandArgument.ToString(), out BankAccountID); if (BankAccountID > 0) { if (string.Equals(e.CommandName, "EditItem")) { _BankAccountID = BankAccountID; PrepareEditView(); cpeEditor.Collapsed = false; cpeEditor.ClientState = "false"; } else if (string.Equals(e.CommandName, "DeleteItem")) { try { Int64 result = -1; String fe = SqlExpressionBuilder.PrepareFilterExpression(ACBankAccountEntity.FLD_NAME_BankAccountID, BankAccountID.ToString(), SQLMatchType.Equal); ACBankAccountEntity aCBankAccountEntity = new ACBankAccountEntity(); result = FCCACBankAccount.GetFacadeCreate().Delete(aCBankAccountEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No); if (result == 0) { _BankAccountID = 0; _ACBankAccountEntity = new ACBankAccountEntity(); PrepareInitialView(); BindACBankAccountList(); MiscUtil.ShowMessage(lblMessage, "A CBank Account has been successfully deleted.", true); } else { MiscUtil.ShowMessage(lblMessage, "Failed to delete A CBank Account.", true); } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } } }
public IList <ACBankAccountEntity> GetData() { IList <ACBankAccountEntity> aCBankAccountEntityList = new List <ACBankAccountEntity>(); try { aCBankAccountEntityList = FCCACBankAccount.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load); if (aCBankAccountEntityList != null && aCBankAccountEntityList.Count > 0) { totalRowCount = aCBankAccountEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(aCBankAccountEntityList ?? new List <ACBankAccountEntity>()); }