public IList <CRMLandCurrentStatusEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression) { IList <CRMLandCurrentStatusEntity> cRMLandCurrentStatusEntityList = new List <CRMLandCurrentStatusEntity>(); try { if (pageSize == -1) { pageSize = 1000000000; } if (String.IsNullOrEmpty(sortExpression)) { sortExpression = CRMLandCurrentStatusEntity.FLD_NAME_LandCurrentStatusID + " " + SQLConstants.SORT_ORDER_DESCENDING; } startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1; cRMLandCurrentStatusEntityList = FCCCRMLandCurrentStatus.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression); if (cRMLandCurrentStatusEntityList != null && cRMLandCurrentStatusEntityList.Count > 0) { totalRowCount = cRMLandCurrentStatusEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(cRMLandCurrentStatusEntityList ?? new List <CRMLandCurrentStatusEntity>()); }
private void SaveCRMLandCurrentStatusEntity() { if (IsValid) { try { CRMLandCurrentStatusEntity cRMLandCurrentStatusEntity = BuildCRMLandCurrentStatusEntity(); Int64 result = -1; if (cRMLandCurrentStatusEntity.IsNew) { result = FCCCRMLandCurrentStatus.GetFacadeCreate().Add(cRMLandCurrentStatusEntity, DatabaseOperationType.Add, TransactionRequired.No); String navUrl = UrlHelper.BuildSecureUrl("~/CRM/CRMLandOwner.aspx", string.Empty, UrlConstants.OVERVIEW_LAND_BASIC_INFO_ID, CRMLandBasicInfoID.ToString()).ToString(); Response.Redirect(navUrl); } else { String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(CRMLandCurrentStatusEntity.FLD_NAME_LandCurrentStatusID, cRMLandCurrentStatusEntity.LandCurrentStatusID.ToString(), SQLMatchType.Equal); result = FCCCRMLandCurrentStatus.GetFacadeCreate().Update(cRMLandCurrentStatusEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No); } if (result > 0) { _CRMLandCurrentStatusEntity = CurrentCRMLandCurrentStatusEntity; PrepareEditView(); BindCRMLandCurrentStatusList(); if (cRMLandCurrentStatusEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Land Current Status Information has been added successfully.", false); } else { MiscUtil.ShowMessage(lblMessage, "Land Current Status Information has been updated successfully.", false); } } else { if (cRMLandCurrentStatusEntity.IsNew) { MiscUtil.ShowMessage(lblMessage, "Failed to add Land Current Status Information.", false); } else { MiscUtil.ShowMessage(lblMessage, "Failed to update Land Current Status Information.", false); } } } catch (Exception ex) { MiscUtil.ShowMessage(lblMessage, ex.Message, true); } } }
public IList <CRMLandCurrentStatusEntity> GetData() { IList <CRMLandCurrentStatusEntity> cRMLandCurrentStatusEntityList = new List <CRMLandCurrentStatusEntity>(); try { cRMLandCurrentStatusEntityList = FCCCRMLandCurrentStatus.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load); if (cRMLandCurrentStatusEntityList != null && cRMLandCurrentStatusEntityList.Count > 0) { totalRowCount = cRMLandCurrentStatusEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(cRMLandCurrentStatusEntityList ?? new List <CRMLandCurrentStatusEntity>()); }