public IList <CMBillMaterialReceiveMeasurementBookMapEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression) { IList <CMBillMaterialReceiveMeasurementBookMapEntity> cMBillMaterialReceiveMeasurementBookMapEntityList = new List <CMBillMaterialReceiveMeasurementBookMapEntity>(); try { if (pageSize == -1) { pageSize = 1000000000; } if (String.IsNullOrEmpty(sortExpression)) { sortExpression = CMBillMaterialReceiveMeasurementBookMapEntity.FLD_NAME_BillMaterialReceiveMeasurementBookMapID + " " + SQLConstants.SORT_ORDER_DESCENDING; } startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1; cMBillMaterialReceiveMeasurementBookMapEntityList = FCCCMBillMaterialReceiveMeasurementBookMap.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression); if (cMBillMaterialReceiveMeasurementBookMapEntityList != null && cMBillMaterialReceiveMeasurementBookMapEntityList.Count > 0) { totalRowCount = cMBillMaterialReceiveMeasurementBookMapEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(cMBillMaterialReceiveMeasurementBookMapEntityList ?? new List <CMBillMaterialReceiveMeasurementBookMapEntity>()); }
protected void lvPRMMaterialReceive_ItemDataBound(object sender, ListViewItemEventArgs e) { if (e.Item.ItemType == ListViewItemType.DataItem) { ListViewDataItem dataItem = (ListViewDataItem)e.Item; PRMMaterialReceive_DetailedEntity ent = (PRMMaterialReceive_DetailedEntity)dataItem.DataItem; HyperLink hypEdit = (HyperLink)e.Item.FindControl("lnkBtnEdit"); HyperLink hypMRRNo = (HyperLink)e.Item.FindControl("hypMRRNo"); Button btnResetMaterialRecieveLV = (Button)e.Item.FindControl("btnResetMaterialRecieveLV"); HyperLink hypMateialReceiveReport = (HyperLink)e.Item.FindControl("hypMateialReceiveReport"); HyperLink lnkShowApprovalStatus = (HyperLink)e.Item.FindControl("lnkShowApprovalStatus"); hypMateialReceiveReport.NavigateUrl = UrlHelper.BuildSecureUrl("~/Reports/ReportViewer.aspx", string.Empty, "do", "MaterialReceiveReport", UrlConstants.OVERVIEW_MATERIAL_RECEIVE_ID, ent.MaterialReceiveID.ToString()).ToString(); hypEdit.NavigateUrl = UrlHelper.BuildSecureUrl("~/PRM/PRMMaterialReceive.aspx", string.Empty, "do", "Edit", UrlConstants.OVERVIEW_MATERIAL_RECEIVE_ID, ent.MaterialReceiveID.ToString()).ToString(); hypMRRNo.NavigateUrl = UrlHelper.BuildSecureUrl("~/PRM/PRMMaterialReceiveItemMap.aspx", string.Empty, UrlConstants.OVERVIEW_MATERIAL_RECEIVE_ID, ent.MaterialReceiveID.ToString()).ToString(); hypMateialReceiveReport.Target = "_blank"; hypEdit.Target = "_blank"; hypMRRNo.Target = "_blank"; APApprovalProcessEntity aPApprovalProcessEntity = APRobot.GetApprovalProcessByTypeAndReference(MasterDataConstants.APType.MRR, ent.MaterialReceiveID); if (aPApprovalProcessEntity.APApprovalProcessID > 0) { lnkShowApprovalStatus.NavigateUrl = UrlHelper.BuildSecureUrl( "~/AP/APView.aspx", string.Empty, APApprovalProcessEntity.FLD_NAME_APApprovalProcessID, aPApprovalProcessEntity.APApprovalProcessID.ToString() ).ToString(); lnkShowApprovalStatus.Target = "_blank"; } else { lnkShowApprovalStatus.NavigateUrl = String.Empty; lnkShowApprovalStatus.Enabled = false; } if (ent.MaterialReceiveApprovalStatusID == MasterDataConstants.MDMaterialReceiveApprovalStatus.APPROVED || ent.MaterialReceiveApprovalStatusID == MasterDataConstants.MDMaterialReceiveApprovalStatus.CANCELED) { btnResetMaterialRecieveLV.Visible = true; } else { btnResetMaterialRecieveLV.Visible = false; } String fe = SqlExpressionBuilder.PrepareFilterExpression(CMBillMaterialReceiveMeasurementBookMapEntity.FLD_NAME_MaterialReceiveID, ent.MaterialReceiveID.ToString(), SQLMatchType.Equal); IList <CMBillMaterialReceiveMeasurementBookMapEntity> lst = FCCCMBillMaterialReceiveMeasurementBookMap.GetFacadeCreate().GetIL(null, null, String.Empty, fe, DatabaseOperationType.LoadWithFilterExpression); if (lst != null && lst.Count > 0) { btnResetMaterialRecieveLV.Visible = false; } } }
public IList <CMBillMaterialReceiveMeasurementBookMapEntity> GetData() { IList <CMBillMaterialReceiveMeasurementBookMapEntity> cMBillMaterialReceiveMeasurementBookMapEntityList = new List <CMBillMaterialReceiveMeasurementBookMapEntity>(); try { cMBillMaterialReceiveMeasurementBookMapEntityList = FCCCMBillMaterialReceiveMeasurementBookMap.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load); if (cMBillMaterialReceiveMeasurementBookMapEntityList != null && cMBillMaterialReceiveMeasurementBookMapEntityList.Count > 0) { totalRowCount = cMBillMaterialReceiveMeasurementBookMapEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(cMBillMaterialReceiveMeasurementBookMapEntityList ?? new List <CMBillMaterialReceiveMeasurementBookMapEntity>()); }