コード例 #1
0
ファイル: PCCFUIP.cs プロジェクト: Theeranit/DealMarker
        public static object GetPCCFByFilter(SessionInfo sessioninfo, string label, int jtStartIndex, int jtPageSize, string jtSorting)
        {
            try
            {
                StaticDataBusiness _staticBusiness = new StaticDataBusiness();

                //Get data from database
                List<MA_PCCF> pccfs = _staticBusiness.GetPCCFByFilter(sessioninfo, label, jtSorting);

                //Return result to jTable
                return new { Result = "OK",
                             Records = jtPageSize > 0 ? pccfs.Skip(jtStartIndex).Take(jtPageSize).ToList() : pccfs,
                             TotalRecordCount = pccfs.Count };
            }
            catch (BusinessWorkflowsException bex)
            {
                return new { Result = "ERROR", Message = bex.Message };
            }
            catch (Exception ex)
            {
                return new { Result = "ERROR", Message = ex.Message };
            }
        }
コード例 #2
0
 public void GetPCCFByFilterTest()
 {
     StaticDataBusiness target = new StaticDataBusiness(); // TODO: Initialize to an appropriate value
     SessionInfo sessioninfo = null; // TODO: Initialize to an appropriate value
     string label = 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_PCCF> expected = null; // TODO: Initialize to an appropriate value
     List<MA_PCCF> actual;
     actual = target.GetPCCFByFilter(sessioninfo, label, startIndex, count, sorting);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }