public IList <BDProjectParkingEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression) { IList <BDProjectParkingEntity> bDProjectParkingEntityList = new List <BDProjectParkingEntity>(); try { if (pageSize == -1) { pageSize = 1000000000; } if (String.IsNullOrEmpty(sortExpression)) { sortExpression = BDProjectParkingEntity.FLD_NAME_ProjectParkingID + " " + SQLConstants.SORT_ORDER_DESCENDING; } startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1; bDProjectParkingEntityList = FCCBDProjectParking.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression); if (bDProjectParkingEntityList != null && bDProjectParkingEntityList.Count > 0) { totalRowCount = bDProjectParkingEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(bDProjectParkingEntityList ?? new List <BDProjectParkingEntity>()); }
private void SaveBDProjectParkingEntity() { if (IsValid) { try { BDProjectParkingEntity bDProjectParkingEntity = BuildBDProjectParkingEntity(); Int64 result = -1; if (bDProjectParkingEntity.IsNew) { result = FCCBDProjectParking.GetFacadeCreate().Add(bDProjectParkingEntity, DatabaseOperationType.Add, TransactionRequired.No); } else { String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(BDProjectParkingEntity.FLD_NAME_ProjectParkingID, bDProjectParkingEntity.ProjectParkingID.ToString(), SQLMatchType.Equal); result = FCCBDProjectParking.GetFacadeCreate().Update(bDProjectParkingEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No); } if (result > 0) { _ProjectParkingID = 0; _BDProjectParkingEntity = new BDProjectParkingEntity(); PrepareInitialView(); PrepareEditView(); BindBDProjectParkingList(); if (bDProjectParkingEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Project Parking Information has been added successfully.", false); } else { MiscUtil.ShowMessage(lblMessage, "Project Parking Information has been updated successfully.", false); } } else { if (bDProjectParkingEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Failed to add Project Parking Information.", false); } else { MiscUtil.ShowMessage(lblMessage, "Failed to update Project Parking Information.", false); } } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } }
public IList <BDProjectParkingEntity> GetData() { IList <BDProjectParkingEntity> bDProjectParkingEntityList = new List <BDProjectParkingEntity>(); try { bDProjectParkingEntityList = FCCBDProjectParking.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load); if (bDProjectParkingEntityList != null && bDProjectParkingEntityList.Count > 0) { totalRowCount = bDProjectParkingEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(bDProjectParkingEntityList ?? new List <BDProjectParkingEntity>()); }