zoukankan      html  css  js  c++  java
  • 真-API控制器AJAS

    GoodBll bll = new GoodBll();

    /// <summary>
    /// 添加
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    [HttpPost]
    public int Add(string o=null)
    {
    Good model = JsonConvert.DeserializeObject<Good>(o);
    return bll.Add(model);
    }
    /// <summary>
    /// 绑定分类
    /// </summary>
    /// <returns></returns>
    [HttpGet]
    public List<GoodType> BandType()
    {
    return bll.BandType();
    }
    /// <summary>
    /// 绑定供应商
    /// </summary>
    /// <returns></returns>
    [HttpGet]
    public List<Supplier> BandSupplier()
    {
    return bll.BandSupplier();
    }

    /// <summary>
    /// 显示,查询
    /// </summary>
    /// <returns></returns>
    [HttpGet]
    public List<Good> Show(string GoodName="", int TypeId=0, int SupplierId=0)
    {
    return bll.Show(GoodName, TypeId, SupplierId);
    }

    /// <summary>
    /// 删除,批量删除
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    [HttpPost]
    public int Delete(string id)
    {
    return bll.Delete(id);
    }

    #region 修改
    /// <summary>
    /// 反填
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    [HttpGet]
    public Good FanTian(int id)
    {
    return bll.FanTian(id);
    }

    /// <summary>
    /// 修改
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    [HttpPost]
    public int Update(string o)
    {
    Good model = JsonConvert.DeserializeObject<Good>(o);
    return bll.Update(model);
    }

  • 相关阅读:
    14.[保护模式]TSS任务段
    13.[保护模式]陷阱门
    12.[保护模式]中断门
    11.[保护模式]调用门
    10.[保护模式]长调用与短调用
    9.[保护模式]代码的跨段跳转流程
    8.[保护模式]段权限检查
    7.[保护模式]段描述符DB位
    6.[保护模式]段描述符属性_S位_TYPE域
    5.[保护模式]段描述符属性_P位_G位
  • 原文地址:https://www.cnblogs.com/gc1229/p/13196143.html
Copyright © 2011-2022 走看看