/// <summary>
 /// 根据操作和提供的数据判断执行状态
 /// </summary>
 /// <param name="c">控制器</param>
 /// <param name="data">数据</param>
 /// <param name="status">数据</param>
 /// <param name="op">操作类型(增删改查,等等)</param>
 /// <returns></returns>
 public static FormatJsonResult JsonFormat(this Controller c, Object data, Boolean status, SysOperate op, String callbackName = "")
 {
     if (status)
     {
         return(JsonFormatSuccess(c, data, op.ToMessage(true), callbackName));
     }
     return(JsonFormatError(c, op.ToMessage(false), callbackName));
 }
 /// <summary>
 /// 根据操作和提供的数据判断执行状态
 /// </summary>
 /// <param name="c">控制器</param>
 /// <param name="data">数据</param>
 /// <param name="status">数据</param>
 /// <param name="op">操作类型(增删改查,等等)</param>
 /// <returns></returns>
 public static FormatJsonResult JsonFormat(this Controller c, object data,bool status, SysOperate op)
 {
     if (status)
     {
         return JsonFormatSuccess(c, data, op.ToMessage(true));
     }
     return JsonFormatError(c, op.ToMessage(false));
 }
Beispiel #3
0
 /// <summary>
 /// 根据操作和提供的数据判断执行状态
 /// </summary>
 /// <param name="c">控制器</param>
 /// <param name="data">数据</param>
 /// <param name="status">数据</param>
 /// <param name="op">操作类型(增删改查,等等)</param>
 /// <returns></returns>
 public static FormatJsonResult JsonFormat(this Controller c, object data, bool status, SysOperate op)
 {
     if (status)
     {
         return(JsonFormatSuccess(c, data, op.ToMessage(true)));
     }
     return(JsonFormatError(c, op.ToMessage(false)));
 }
 /// <summary>
 /// 根据操作和提供的数据判断执行状态
 /// </summary>
 /// <param name="c">控制器</param>
 /// <param name="data">数据</param>
 /// <param name="op">操作类型(增删改查,等等)</param>
 /// <returns></returns>
 public static FormatJsonResult JsonFormat(this Controller c, object data,SysOperate op)
 {
     if (!data.IsNullOrEmpty())
     {
        return JsonFormatSuccess(c, data, op.ToMessage(true));
     }
     return JsonFormatError(c,op.ToMessage(false));
 }
Beispiel #5
0
 /// <summary>
 /// 根据操作和提供的数据判断执行状态
 /// </summary>
 /// <param name="c">控制器</param>
 /// <param name="data">数据</param>
 /// <param name="op">操作类型(增删改查,等等)</param>
 /// <returns></returns>
 public static FormatJsonResult JsonFormat(this Controller c, object data, SysOperate op)
 {
     if (!data.IsNullOrEmpty())
     {
         return(JsonFormatSuccess(c, data, op.ToMessage(true)));
     }
     return(JsonFormatError(c, op.ToMessage(false)));
 }