Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 /// <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>();
 }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 /// <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>();
 }