31 lines
726 B
C#
31 lines
726 B
C#
using EShangApi.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace EShangApi.Helper
|
|
{
|
|
public class Common
|
|
{
|
|
/// <summary>
|
|
/// 判断是否是偶数
|
|
/// </summary>
|
|
/// <param name="n"></param>
|
|
/// <returns></returns>
|
|
|
|
public static bool IsOdd(int n)
|
|
{
|
|
return Convert.ToBoolean(n % 2 == 0);
|
|
}
|
|
public static object ReturnJson(int code, string msg, object data = null)
|
|
{
|
|
Result result = new Result();
|
|
result.Result_Data = data;
|
|
result.Result_Code = code;
|
|
result.Result_Desc = msg;
|
|
return result;
|
|
}
|
|
|
|
}
|
|
} |