public IList <APPanelForwardMemberEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression) { IList <APPanelForwardMemberEntity> aPPanelForwardMemberEntityList = new List <APPanelForwardMemberEntity>(); try { if (pageSize == -1) { pageSize = 1000000000; } if (String.IsNullOrEmpty(sortExpression)) { sortExpression = APPanelForwardMemberEntity.FLD_NAME_APPanelForwardMemberID + " " + SQLConstants.SORT_ORDER_DESCENDING; } startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1; aPPanelForwardMemberEntityList = FCCAPPanelForwardMember.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression); if (aPPanelForwardMemberEntityList != null && aPPanelForwardMemberEntityList.Count > 0) { totalRowCount = aPPanelForwardMemberEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(aPPanelForwardMemberEntityList ?? new List <APPanelForwardMemberEntity>()); }
private void SaveAPPanelForwardMemberEntity() { if (IsValid) { try { APPanelForwardMemberEntity aPPanelForwardMemberEntity = BuildAPPanelForwardMemberEntity(); Int64 result = -1; if (aPPanelForwardMemberEntity.IsNew) { result = FCCAPPanelForwardMember.GetFacadeCreate().Add(aPPanelForwardMemberEntity, DatabaseOperationType.Add, TransactionRequired.No); } else { String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(APPanelForwardMemberEntity.FLD_NAME_APPanelForwardMemberID, aPPanelForwardMemberEntity.APPanelForwardMemberID.ToString(), SQLMatchType.Equal); result = FCCAPPanelForwardMember.GetFacadeCreate().Update(aPPanelForwardMemberEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No); } if (result > 0) { _APPanelForwardMemberID = 0; _APPanelForwardMemberEntity = new APPanelForwardMemberEntity(); PrepareInitialView(); BindAPPanelForwardMemberList(); if (aPPanelForwardMemberEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "A PPanel Forward Member Information has been added successfully.", false); } else { MiscUtil.ShowMessage(lblMessage, "A PPanel Forward Member Information has been updated successfully.", false); } } else { if (aPPanelForwardMemberEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Failed to add A PPanel Forward Member Information.", false); } else { MiscUtil.ShowMessage(lblMessage, "Failed to update A PPanel Forward Member Information.", false); } } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } }
protected void lvAPPanelForwardMember_ItemCommand(object sender, ListViewCommandEventArgs e) { Int64 APPanelForwardMemberID; Int64.TryParse(e.CommandArgument.ToString(), out APPanelForwardMemberID); if (APPanelForwardMemberID > 0) { if (string.Equals(e.CommandName, "EditItem")) { _APPanelForwardMemberID = APPanelForwardMemberID; PrepareEditView(); cpeEditor.Collapsed = false; cpeEditor.ClientState = "false"; } else if (string.Equals(e.CommandName, "DeleteItem")) { try { Int64 result = -1; String fe = SqlExpressionBuilder.PrepareFilterExpression(APPanelForwardMemberEntity.FLD_NAME_APPanelForwardMemberID, APPanelForwardMemberID.ToString(), SQLMatchType.Equal); APPanelForwardMemberEntity aPPanelForwardMemberEntity = new APPanelForwardMemberEntity(); result = FCCAPPanelForwardMember.GetFacadeCreate().Delete(aPPanelForwardMemberEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No); if (result == 0) { _APPanelForwardMemberID = 0; _APPanelForwardMemberEntity = new APPanelForwardMemberEntity(); PrepareInitialView(); BindAPPanelForwardMemberList(); MiscUtil.ShowMessage(lblMessage, "A PPanel Forward Member has been successfully deleted.", true); } else { MiscUtil.ShowMessage(lblMessage, "Failed to delete A PPanel Forward Member.", true); } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } } }
public IList <APPanelForwardMemberEntity> GetData() { IList <APPanelForwardMemberEntity> aPPanelForwardMemberEntityList = new List <APPanelForwardMemberEntity>(); try { aPPanelForwardMemberEntityList = FCCAPPanelForwardMember.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load); if (aPPanelForwardMemberEntityList != null && aPPanelForwardMemberEntityList.Count > 0) { totalRowCount = aPPanelForwardMemberEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(aPPanelForwardMemberEntityList ?? new List <APPanelForwardMemberEntity>()); }