public DataTable open(string pSortBy, IConnection pConn) { string SqlStr; SqlStr = "SELECT * " + " FROM goods_types" + " ORDER BY " + pSortBy; _Tbl = pConn.exeQuery(SqlStr); return _Tbl; }
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; }
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() ); }
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; }
public DataTable open(IConnection pConn) { string SqlStr; SqlStr = "SELECT * " + " FROM goods" + " ORDER BY GoodsCode "; _Tbl = pConn.exeQuery(SqlStr); return _Tbl; }
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; }
public DataTable open(IConnection pConn) { string SqlStr; SqlStr = "SELECT * " + " FROM goods_groups" + _WhereStr + " ORDER BY GroupID "; _Tbl = pConn.exeQuery(SqlStr); return _Tbl; }
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; }
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) ); }