Ejemplo n.º 1
0
 public DataTable open(string pSortBy, IConnection pConn)
 {
     string SqlStr;
     SqlStr = "SELECT * "
         + " FROM goods_types"
         + " ORDER BY " + pSortBy;
     _Tbl =  pConn.exeQuery(SqlStr);
     return _Tbl;
 }
Ejemplo n.º 2
0
 public DataTable open(string pSearchBy, string pCriteria, string pSortBy, IConnection pConn)
 {
     string SqlStr;
     string WhereStr = "";
     if (pCriteria.Length > 0)
         WhereStr = " WHERE " + pSearchBy + DbMgr.formatDbPatialSearchString(pCriteria);
     SqlStr = "SELECT * "
         + " FROM goods_types"
         + WhereStr
         + " ORDER BY " + pSortBy;
     _Tbl =  pConn.exeQuery(SqlStr);
     return _Tbl;
 }
Ejemplo n.º 3
0
 public void open(int pGroupID, IConnection pConn)
 {
     string SqlStr;
     SqlStr = " SELECT * FROM goods_groups WHERE GroupID = " +  pGroupID.ToString() ;
     DataTable Tbl = pConn.exeQuery(SqlStr);
     if (Tbl.Rows.Count == 1)
         this.BindData(Tbl.Rows[0]);
     else
         throw new LEKException(113, "Not found object {0}", "GroupID = " +  pGroupID.ToString() );
 }
Ejemplo n.º 4
0
 public bool openExist(int pGroupID, IConnection pConn)
 {
     string SqlStr;
     SqlStr = " SELECT * FROM goods_groups WHERE GroupID = " +  pGroupID.ToString() ;
     DataTable Tbl = pConn.exeQuery(SqlStr);
     if (Tbl.Rows.Count == 1){
         this.BindData(Tbl.Rows[0]);
         return true;
     }else
         return false;
 }
Ejemplo n.º 5
0
 public DataTable open(IConnection pConn)
 {
     string SqlStr;
     SqlStr = "SELECT * "
         + " FROM goods"
         + " ORDER BY GoodsCode ";
     _Tbl =  pConn.exeQuery(SqlStr);
     return _Tbl;
 }
Ejemplo n.º 6
0
 public DataTable open(string pSearchBy, string pCriteria, IConnection pConn)
 {
     string SqlStr;
     string WhereStr = _WhereStr;
     if (pCriteria.Length > 0)
         WhereStr = " AND " + pSearchBy + DbMgr.formatDbPatialSearchString(pCriteria);
     SqlStr = "SELECT * "
         + " FROM goods_groups"
         + WhereStr;
     _Tbl =  pConn.exeQuery(SqlStr);
     return _Tbl;
 }
Ejemplo n.º 7
0
 public DataTable open(IConnection pConn)
 {
     string SqlStr;
     SqlStr = "SELECT * "
         + " FROM goods_groups"
         + _WhereStr
         + " ORDER BY GroupID ";
     _Tbl =  pConn.exeQuery(SqlStr);
     return _Tbl;
 }
Ejemplo n.º 8
0
 public bool openExist(string pGoodsCode, IConnection pConn)
 {
     string SqlStr;
     SqlStr = " SELECT * FROM goods WHERE GoodsCode = " +  DbMgr.formatDbString(pGoodsCode) ;
     DataTable Tbl = pConn.exeQuery(SqlStr);
     if (Tbl.Rows.Count == 1){
         this.BindData(Tbl.Rows[0]);
         return true;
     }else
         return false;
 }
Ejemplo n.º 9
0
 public void open(string pGoodsCode, IConnection pConn)
 {
     string SqlStr;
     SqlStr = " SELECT * FROM goods WHERE GoodsCode = " +  DbMgr.formatDbString(pGoodsCode) ;
     DataTable Tbl = pConn.exeQuery(SqlStr);
     if (Tbl.Rows.Count == 1)
         this.BindData(Tbl.Rows[0]);
     else
         throw new LEKException(113, "Not found object {0}", "GoodsCode = " +  DbMgr.formatDbString(pGoodsCode) );
 }