Exemplo n.º 1
0
        /// <summary>
        /// 构造查询SQL条件
        /// </summary>
        /// <param name="sCargoType">货物类型</param>
        /// <param name="bllid">订单号</param>
        /// <returns>Sql</returns>
        private string GetSQLCondition(string sCargoType = "", string bllid = "")
        {
            string sSQLWhere = string.Empty;

            //获取查询的货物类型
            sCargoType = CommonReport.InputText(sCargoType, sCargoType.Length);
            if (!string.IsNullOrWhiteSpace(sCargoType))
            {
                sSQLWhere += " lading_type ='" + sCargoType + "'";
            }

            if (!string.IsNullOrWhiteSpace(bllid))
            {
                sSQLWhere += " AND bill_id = '" + bllid + "'";
            }

            return(sSQLWhere);
        }