private SearchStatementModel PrepareSearchStatement(GridCommand command, IssueTypeToMasterSearchModel searchModel)
        {
            string whereStatement = string.Empty;

            IList<object> param = new List<object>();

            HqlStatementHelper.AddLikeStatement("Code", searchModel.Code, HqlStatementHelper.LikeMatchMode.Start, "ittm", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("Description", searchModel.Description, HqlStatementHelper.LikeMatchMode.Start, "ittm", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("IsActive", searchModel.IsActive, "ittm", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Code", searchModel.IssueLevel, "il", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Code", searchModel.IssueType, "it", ref whereStatement, param);

            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);

            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
 public ActionResult List(GridCommand command, IssueTypeToMasterSearchModel searchModel)
 {
     TempData["IssueTypeToMasterSearchModel"] = searchModel;
     ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
     return View();
 }
 public ActionResult _AjaxList(GridCommand command, IssueTypeToMasterSearchModel searchModel)
 {
     SearchStatementModel searchStatementModel = PrepareSearchStatement(command, searchModel);
     return PartialView(GetAjaxPageData<IssueTypeToMaster>(searchStatementModel, command));
 }