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

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

                if (String.IsNullOrEmpty(sortExpression))
                {
                    sortExpression = MDResumeCategoryEntity.FLD_NAME_ResumeCategoryID + " " + SQLConstants.SORT_ORDER_DESCENDING;
                }

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

                mDResumeCategoryEntityList = FCCMDResumeCategory.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression);

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

            return(mDResumeCategoryEntityList ?? new List <MDResumeCategoryEntity>());
        }
        private void SaveMDResumeCategoryEntity()
        {
            if (IsValid)
            {
                try
                {
                    MDResumeCategoryEntity mDResumeCategoryEntity = BuildMDResumeCategoryEntity();

                    Int64 result = -1;

                    if (mDResumeCategoryEntity.IsNew)
                    {
                        result = FCCMDResumeCategory.GetFacadeCreate().Add(mDResumeCategoryEntity, DatabaseOperationType.Add, TransactionRequired.No);
                    }
                    else
                    {
                        String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(MDResumeCategoryEntity.FLD_NAME_ResumeCategoryID, mDResumeCategoryEntity.ResumeCategoryID.ToString(), SQLMatchType.Equal);
                        result = FCCMDResumeCategory.GetFacadeCreate().Update(mDResumeCategoryEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No);
                    }

                    if (result > 0)
                    {
                        _ResumeCategoryID       = 0;
                        _MDResumeCategoryEntity = new MDResumeCategoryEntity();
                        PrepareInitialView();
                        BindMDResumeCategoryList();

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

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

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

                    PrepareEditView();

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

                        String fe = SqlExpressionBuilder.PrepareFilterExpression(MDResumeCategoryEntity.FLD_NAME_ResumeCategoryID, ResumeCategoryID.ToString(), SQLMatchType.Equal);

                        MDResumeCategoryEntity mDResumeCategoryEntity = new MDResumeCategoryEntity();


                        result = FCCMDResumeCategory.GetFacadeCreate().Delete(mDResumeCategoryEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No);

                        if (result == 0)
                        {
                            _ResumeCategoryID       = 0;
                            _MDResumeCategoryEntity = new MDResumeCategoryEntity();
                            PrepareInitialView();
                            BindMDResumeCategoryList();

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

            try
            {
                mDResumeCategoryEntityList = FCCMDResumeCategory.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load);

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

            return(mDResumeCategoryEntityList ?? new List <MDResumeCategoryEntity>());
        }