コード例 #1
0
        public IList <BDProjectOtherInfoEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression)
        {
            IList <BDProjectOtherInfoEntity> bDProjectOtherInfoEntityList = new List <BDProjectOtherInfoEntity>();

            try
            {
                if (pageSize == -1)
                {
                    pageSize = 1000000000;
                }

                if (String.IsNullOrEmpty(sortExpression))
                {
                    sortExpression = BDProjectOtherInfoEntity.FLD_NAME_ProjectOtherInfoID + " " + SQLConstants.SORT_ORDER_DESCENDING;
                }

                startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1;

                bDProjectOtherInfoEntityList = FCCBDProjectOtherInfo.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression);

                if (bDProjectOtherInfoEntityList != null && bDProjectOtherInfoEntityList.Count > 0)
                {
                    totalRowCount = bDProjectOtherInfoEntityList[0].TotalRowCount;
                }
            }
            catch (Exception ex)
            {
            }

            return(bDProjectOtherInfoEntityList ?? new List <BDProjectOtherInfoEntity>());
        }
コード例 #2
0
        private void SaveBDProjectOtherInfoEntity()
        {
            if (IsValid)
            {
                try
                {
                    BDProjectOtherInfoEntity bDProjectOtherInfoEntity = BuildBDProjectOtherInfoEntity();

                    Int64 result = -1;

                    if (bDProjectOtherInfoEntity.IsNew)
                    {
                        result = FCCBDProjectOtherInfo.GetFacadeCreate().Add(bDProjectOtherInfoEntity, DatabaseOperationType.Add, TransactionRequired.No);
                    }
                    else
                    {
                        String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(BDProjectOtherInfoEntity.FLD_NAME_ProjectOtherInfoID, bDProjectOtherInfoEntity.ProjectOtherInfoID.ToString(), SQLMatchType.Equal);
                        result = FCCBDProjectOtherInfo.GetFacadeCreate().Update(bDProjectOtherInfoEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No);
                    }

                    if (result > 0)
                    {
                        _ProjectOtherInfoID       = 0;
                        _BDProjectOtherInfoEntity = new BDProjectOtherInfoEntity();
                        PrepareInitialView();

                        if (bDProjectOtherInfoEntity.IsNew)
                        {
                            MiscUtil.ShowMessage(lblMessage, "Project Other Info Information has been Updated successfully.", false);
                        }
                        else
                        {
                            MiscUtil.ShowMessage(lblMessage, "Project Other Info Information has been updated successfully.", false);
                        }

                        PrepareEditView();
                    }
                    else
                    {
                        if (bDProjectOtherInfoEntity.IsNew)
                        {
                            MiscUtil.ShowMessage(lblMessage, "Failed to add Project Other Info Information.", false);
                        }
                        else
                        {
                            MiscUtil.ShowMessage(lblMessage, "Failed to update Project Other Info Information.", false);
                        }
                    }
                }
                catch (Exception ex)
                {
                    MiscUtil.ShowMessage(lblMessage, ex.Message, true);
                }
            }
        }
コード例 #3
0
        public IList <BDProjectOtherInfoEntity> GetData()
        {
            IList <BDProjectOtherInfoEntity> bDProjectOtherInfoEntityList = new List <BDProjectOtherInfoEntity>();

            try
            {
                bDProjectOtherInfoEntityList = FCCBDProjectOtherInfo.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load);

                if (bDProjectOtherInfoEntityList != null && bDProjectOtherInfoEntityList.Count > 0)
                {
                    totalRowCount = bDProjectOtherInfoEntityList[0].TotalRowCount;
                }
            }
            catch (Exception ex)
            {
            }

            return(bDProjectOtherInfoEntityList ?? new List <BDProjectOtherInfoEntity>());
        }