public IList <MDIssueIdentityCategoryEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression)
        {
            IList <MDIssueIdentityCategoryEntity> mDIssueIdentityCategoryEntityList = new List <MDIssueIdentityCategoryEntity>();

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

                if (String.IsNullOrEmpty(sortExpression))
                {
                    sortExpression = MDIssueIdentityCategoryEntity.FLD_NAME_IssueIdentityCategoryID + " " + SQLConstants.SORT_ORDER_DESCENDING;
                }

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

                mDIssueIdentityCategoryEntityList = FCCMDIssueIdentityCategory.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression);

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

            return(mDIssueIdentityCategoryEntityList ?? new List <MDIssueIdentityCategoryEntity>());
        }
        private void SaveMDIssueIdentityCategoryEntity()
        {
            if (IsValid)
            {
                try
                {
                    MDIssueIdentityCategoryEntity mDIssueIdentityCategoryEntity = BuildMDIssueIdentityCategoryEntity();

                    Int64 result = -1;

                    if (mDIssueIdentityCategoryEntity.IsNew)
                    {
                        result = FCCMDIssueIdentityCategory.GetFacadeCreate().Add(mDIssueIdentityCategoryEntity, DatabaseOperationType.Add, TransactionRequired.No);
                    }
                    else
                    {
                        String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(MDIssueIdentityCategoryEntity.FLD_NAME_IssueIdentityCategoryID, mDIssueIdentityCategoryEntity.IssueIdentityCategoryID.ToString(), SQLMatchType.Equal);
                        result = FCCMDIssueIdentityCategory.GetFacadeCreate().Update(mDIssueIdentityCategoryEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No);
                    }

                    if (result > 0)
                    {
                        _IssueIdentityCategoryID       = 0;
                        _MDIssueIdentityCategoryEntity = new MDIssueIdentityCategoryEntity();
                        PrepareInitialView();
                        BindMDIssueIdentityCategoryList();

                        if (mDIssueIdentityCategoryEntity.IsNew)
                        {
                            MiscUtil.ShowMessage(lblMessage, "Issue Identity Category Information has been added successfully.", false);
                        }
                        else
                        {
                            MiscUtil.ShowMessage(lblMessage, "Issue Identity Category Information has been updated successfully.", false);
                        }
                    }
                    else
                    {
                        if (mDIssueIdentityCategoryEntity.IsNew)
                        {
                            MiscUtil.ShowMessage(lblMessage, "Failed to add Issue Identity Category Information.", false);
                        }
                        else
                        {
                            MiscUtil.ShowMessage(lblMessage, "Failed to update Issue Identity Category Information.", false);
                        }
                    }
                }
                catch (Exception ex)
                {
                    MiscUtil.ShowMessage(lblMessage, ex.Message, true);
                }
            }
        }
        protected void lvMDIssueIdentityCategory_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            Int64 IssueIdentityCategoryID;

            Int64.TryParse(e.CommandArgument.ToString(), out IssueIdentityCategoryID);

            if (IssueIdentityCategoryID > 0)
            {
                if (string.Equals(e.CommandName, "EditItem"))
                {
                    _IssueIdentityCategoryID = IssueIdentityCategoryID;

                    PrepareEditView();

                    cpeEditor.Collapsed   = false;
                    cpeEditor.ClientState = "false";
                }
                else if (string.Equals(e.CommandName, "DeleteItem"))
                {
                    try
                    {
                        Int64 result = -1;

                        String fe = SqlExpressionBuilder.PrepareFilterExpression(MDIssueIdentityCategoryEntity.FLD_NAME_IssueIdentityCategoryID, IssueIdentityCategoryID.ToString(), SQLMatchType.Equal);

                        MDIssueIdentityCategoryEntity mDIssueIdentityCategoryEntity = new MDIssueIdentityCategoryEntity();


                        result = FCCMDIssueIdentityCategory.GetFacadeCreate().Delete(mDIssueIdentityCategoryEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No);

                        if (result == 0)
                        {
                            _IssueIdentityCategoryID       = 0;
                            _MDIssueIdentityCategoryEntity = new MDIssueIdentityCategoryEntity();
                            PrepareInitialView();
                            BindMDIssueIdentityCategoryList();

                            MiscUtil.ShowMessage(lblMessage, "Issue Identity Category has been successfully deleted.", true);
                        }
                        else
                        {
                            MiscUtil.ShowMessage(lblMessage, "Failed to delete Issue Identity Category.", true);
                        }
                    }
                    catch (Exception ex)
                    {
                        MiscUtil.ShowMessage(lblMessage, ex.Message, true);
                    }
                }
            }
        }
        public IList <MDIssueIdentityCategoryEntity> GetData()
        {
            IList <MDIssueIdentityCategoryEntity> mDIssueIdentityCategoryEntityList = new List <MDIssueIdentityCategoryEntity>();

            try
            {
                mDIssueIdentityCategoryEntityList = FCCMDIssueIdentityCategory.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load);

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

            return(mDIssueIdentityCategoryEntityList ?? new List <MDIssueIdentityCategoryEntity>());
        }