public Int64 Insert(NameValueCollection parameters,out ErrorEntity ErrInfo) { SysNationDA da = new SysNationDA(); Int64 result = da.InsertAndReturnId64(parameters); if (result > 0) { ErrInfo = new ErrorEntity(RespCode.Success); } else { ErrInfo = new ErrorEntity(RespCode.SysError); } return result; }
public Int32 Delete(NameValueCollection where, out ErrorEntity ErrInfo) { SysNationDA da = new SysNationDA(); Int32 result = da.Delete(where); if (result >= 0) { ErrInfo = new ErrorEntity(RespCode.Success); } else { ErrInfo = new ErrorEntity(RespCode.SysError); } return result; }
/// <summary> /// 分页查询 /// </summary> /// <param name="where">查询条件</param> /// <param name="orderby">排序条件</param> /// <param name="pageIndex">当前页</param> /// <param name="pageSize">页记录数</param> /// <param name="totalCount">记录总行数</param> /// <returns></returns> public List<SysNation> Select(NameValueCollection where, NameValueCollection orderby, int pageIndex, int pageSize, out int totalCount) { SysNationDA da = new SysNationDA(); return da.Select(where, orderby, pageIndex, pageSize, out totalCount).DataTableToList<SysNation>(); }
public Int32 Update(NameValueCollection parameters, NameValueCollection where, out ErrorEntity ErrInfo) { SysNationDA da = new SysNationDA(); Int32 result = da.Update(parameters, where); if (result > 0) { ErrInfo = new ErrorEntity(RespCode.Success); } else { ErrInfo = new ErrorEntity(RespCode.SysError); } return result; }
/// <summary> /// 查询 /// </summary> /// <param name="where">查询条件</param> /// <param name="orderby">排序条件</param> /// <returns></returns> public List<SysNation> Select(NameValueCollection where, NameValueCollection orderby) { SysNationDA da = new SysNationDA(); return da.Select(where, orderby).DataTableToList<SysNation>(); }