public JsonResult Get_Qualities(QualityViewModel qViewModel)
        {
            PaginationInfo pager = new PaginationInfo();

            try
            {
                pager = qViewModel.Pager;

                if (qViewModel.Filter.Yarn_Type_Id > 0)
                {
                    qViewModel.Quality_Grid = _qualityMan.Get_Quality_By_Yarn_Types(qViewModel.Filter.Yarn_Type_Id, ref pager);
                }
                else
                {
                    qViewModel.Quality_Grid = _qualityMan.Get_Qualities(ref pager);
                }

                qViewModel.Pager = pager;

                qViewModel.Pager.PageHtmlString = PageHelper.NumericPager("javascript:PageMore({0})", qViewModel.Pager.TotalRecords, qViewModel.Pager.CurrentPage + 1, qViewModel.Pager.PageSize, 10, true);
            }
            catch (Exception ex)
            {
                qViewModel.Friendly_Message.Add(MessageStore.Get("SYS01"));

                Logger.Error("Quality Controller - Get_Qualities " + ex.ToString());
            }

            finally
            {
                pager = null;
            }
            return(Json(qViewModel, JsonRequestBehavior.AllowGet));
        }