public void GetLimitProductByFilterTest() { LimitProductBusiness target = new LimitProductBusiness(); // TODO: Initialize to an appropriate value SessionInfo sessioninfo = null; // TODO: Initialize to an appropriate value string strproduct = string.Empty; // TODO: Initialize to an appropriate value string strlimit = string.Empty; // TODO: Initialize to an appropriate value int startIndex = 0; // TODO: Initialize to an appropriate value int count = 0; // TODO: Initialize to an appropriate value string sorting = string.Empty; // TODO: Initialize to an appropriate value List<MA_LIMIT_PRODUCT> expected = null; // TODO: Initialize to an appropriate value List<MA_LIMIT_PRODUCT> actual; actual = target.GetLimitProductByFilter(sessioninfo, strproduct, strlimit, startIndex, count, sorting); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public static object GetLimitproductByFilter(SessionInfo sessioninfo, string strproduct, string strlimit, int jtStartIndex, int jtPageSize, string jtSorting) { try { //Return result to jTable LimitProductBusiness _limitproductbusiness = new LimitProductBusiness(); //Get data from database List<MA_LIMIT_PRODUCT> limitproduct = _limitproductbusiness.GetLimitProductByFilter(sessioninfo, strproduct, strlimit, jtSorting); //Return result to jTable return new { Result = "OK", Records = jtPageSize > 0 ? limitproduct.Skip(jtStartIndex).Take(jtPageSize).ToList() : limitproduct, TotalRecordCount = limitproduct.Count }; } catch (BusinessWorkflowsException bex) { return new { Result = "ERROR", Message = bex.Message }; } catch (Exception ex) { return new { Result = "ERROR", Message = ex.Message }; } }