예제 #1
0
 public void CreateFunctionTest()
 {
     FunctionBusiness target = new FunctionBusiness(); // TODO: Initialize to an appropriate value
     SessionInfo sessioninfo = null; // TODO: Initialize to an appropriate value
     MA_FUNCTIONAL function = null; // TODO: Initialize to an appropriate value
     MA_FUNCTIONAL expected = null; // TODO: Initialize to an appropriate value
     MA_FUNCTIONAL actual;
     actual = target.CreateFunction(sessioninfo, function);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
예제 #2
0
 public void GetFunctionByFilterTest()
 {
     FunctionBusiness target = new FunctionBusiness(); // TODO: Initialize to an appropriate value
     SessionInfo sessioninfo = null; // TODO: Initialize to an appropriate value
     string name = 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_FUNCTIONAL> expected = null; // TODO: Initialize to an appropriate value
     List<MA_FUNCTIONAL> actual;
     actual = target.GetFunctionByFilter(sessioninfo, name, startIndex, count, sorting);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
예제 #3
0
        public static object GetFunctionOptions(SessionInfo sessioninfo)
        {
            try
            {
                FunctionBusiness _functionBusiness = new FunctionBusiness();
                //Get data from database
                var functions = _functionBusiness.GetFunctionOptions().OrderBy(p => p.LABEL).Select(c => new { DisplayText = c.LABEL, Value = c.ID });

                //Return result to jTable
                return new { Result = "OK", Options = functions };
            }
            catch (Exception ex)
            {
                return new { Result = "ERROR", Message = ex.Message };
            }
        }
예제 #4
0
 public static object UpdateFunction(SessionInfo sessioninfo, MA_FUNCTIONAL record)
 {
     try
     {
         FunctionBusiness _functionBusiness = new FunctionBusiness();
         record.ID = record.ID;
         record.LABEL = record.LABEL;
         record.ISACTIVE = record.ISACTIVE == null || !record.ISACTIVE ? false : true;
         record.USERCODE = record.USERCODE;
         var addedStudent = _functionBusiness.UpdateFunction(sessioninfo, record);
         return new { Result = "OK" };
     }
     catch (Exception ex)
     {
         return new { Result = "ERROR", Message = ex.Message };
     }
 }
예제 #5
0
        public static object GetFunctionByFilter(SessionInfo sessioninfo, string code, int jtStartIndex, int jtPageSize, string jtSorting)
        {
            try
            {
                //Return result to jTable
                FunctionBusiness _functionBusiness = new FunctionBusiness();
                //Get data from database
                List<MA_FUNCTIONAL> function = _functionBusiness.GetFunctionByFilter(sessioninfo, code, jtSorting);

                //Return result to jTable
                return new { Result = "OK"
                            , Records = jtPageSize > 0 ? function.Skip(jtStartIndex).Take(jtPageSize).ToList() : function
                            , TotalRecordCount = function.Count };
            }
            catch (BusinessWorkflowsException bex)
            {
                return new { Result = "ERROR", Message = bex.Message };
            }
            catch (Exception ex)
            {
                return new { Result = "ERROR", Message = ex.Message };
            }
        }
예제 #6
0
 public void GetFunctionOptionsTest()
 {
     FunctionBusiness target = new FunctionBusiness(); // TODO: Initialize to an appropriate value
     List<MA_FUNCTIONAL> expected = null; // TODO: Initialize to an appropriate value
     List<MA_FUNCTIONAL> actual;
     actual = target.GetFunctionOptions();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
예제 #7
0
 public void FunctionBusinessConstructorTest()
 {
     FunctionBusiness target = new FunctionBusiness();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }