public DataSet modelBind(TransportLogic.TranType type, string strWhere) { string sqlStr = null; switch (type) { case TransportLogic.TranType.material: sqlStr = "select mm.id,mm.model from material m,materialModel mm where m.mmid=mm.id and m.mnid=" + strWhere; break; case TransportLogic.TranType.product: sqlStr = "select pm.id,pm.model from product p,productModel pm where p.pmid=pm.id and p.pnid=" + strWhere; break; } return(TransportDB.Query(sqlStr)); }
public DataSet kindBind(TransportLogic.TranType type, string strWhere) { string sqlStr = null; switch (type) { case TransportLogic.TranType.material: sqlStr = "select id,sort from materialKind"; break; case TransportLogic.TranType.product: sqlStr = "select id,sort from productKind"; break; } if (!string.IsNullOrEmpty(strWhere)) { sqlStr += " where id= " + strWhere; } return(TransportDB.Query(sqlStr)); }
public DataSet nameBind(TransportLogic.TranType type, string strWhere) { string sqlStr = null; switch (type) { case TransportLogic.TranType.material: sqlStr = "select id,name from materialName"; if (!string.IsNullOrEmpty(strWhere)) { sqlStr += " where mkid= " + strWhere; } break; case TransportLogic.TranType.product: sqlStr = "select id,name from productName"; if (!string.IsNullOrEmpty(strWhere)) { sqlStr += " where pkid= " + strWhere; } break; } return(TransportDB.Query(sqlStr)); }