/* * public EstShippingFee GetEstIframeCostList(EstIframeCostModels getModel, string estCode) * { * * string errorStr = ""; * * EstShippingFee model = new EstShippingFee(); * string listQuery = " SELECT SEQNO , " + string.Join(",", selectColumn_EstIframeCost) + " FROM est_shipping_fee WHERE EST_CODE = '" + estCode + "' "; * DataTable listDt = getQueryResult(listQuery, out errorStr); * * if (listDt != null && listDt.Rows.Count != 0) * { * for (int i = 0; i < listDt.Rows.Count; i++) * { * model.SEQNO = int.Parse(listDt.Rows[i]["SEQNO"].ToString().Trim()); * model.EST_CODE = listDt.Rows[i]["EST_CODE"].ToString().Trim(); * model.ESE_CODE = listDt.Rows[i]["EST_CODE"].ToString().Trim(); * model.NATION_CODE = listDt.Rows[i]["NATION_CODE"].ToString().Trim(); * model.RELEASE_CODE = listDt.Rows[i]["RELEASE_CODE"].ToString().Trim(); * model.WEIGHT = double.Parse(listDt.Rows[i]["WEIGHT"].ToString().Trim()); * model.SHIPPING_FEE_NOR = double.Parse(listDt.Rows[i]["SHIPPING_FEE_NOR"].ToString().Trim()); * model.SHIPPING_FEE_STC = double.Parse(listDt.Rows[i]["SHIPPING_FEE_STC"].ToString().Trim()); * * //model.Item.NATION_CODE = temp.NATION_CODE; * } * * } * * return model; * } */ public EstIframeCostModels GetEstIframeCostList(EstIframeCostModels model, string estCode) { estCode = model.station; model.Item.NATION_CODE = model.nation; model.Item.RELEASE_CODE = model.type; if (model.type == null || model.station == null || model.nation == null) { return(model); } string errorStr = ""; string listQuery = " SELECT SEQNO , " + string.Join(",", selectColumn_EstIframeCost) + " FROM est_shipping_fee WHERE EST_CODE = '" + estCode + "' "; listQuery += " AND NATION_CODE = '" + model.Item.NATION_CODE + "' "; listQuery += " AND RELEASE_CODE = '" + model.Item.RELEASE_CODE + "' "; DataTable listDt = getQueryResult(listQuery, out errorStr); if (listDt != null && listDt.Rows.Count != 0) { for (int i = 0; i < listDt.Rows.Count; i++) { EstShippingFee temp = new EstShippingFee(); temp.SEQNO = int.Parse(listDt.Rows[i]["SEQNO"].ToString().Trim()); temp.EST_CODE = listDt.Rows[i]["EST_CODE"].ToString().Trim(); temp.ESE_CODE = listDt.Rows[i]["EST_CODE"].ToString().Trim(); temp.NATION_CODE = listDt.Rows[i]["NATION_CODE"].ToString().Trim(); temp.RELEASE_CODE = listDt.Rows[i]["RELEASE_CODE"].ToString().Trim(); temp.WEIGHT = double.Parse(listDt.Rows[i]["WEIGHT"].ToString().Trim()); temp.SHIPPING_FEE_NOR = double.Parse(listDt.Rows[i]["SHIPPING_FEE_NOR"].ToString().Trim()); temp.SHIPPING_FEE_STC = double.Parse(listDt.Rows[i]["SHIPPING_FEE_STC"].ToString().Trim()); model.Items.Add(temp); } } return(model); }
public EstShippingFee GetEstIframeCostList(EstIframeCostModels getModel, string estCode) { string errorStr = ""; EstShippingFee model = new EstShippingFee(); string listQuery = " SELECT SEQNO , " + string.Join(",", selectColumn_EstIframeCost) + " FROM est_shipping_fee WHERE EST_CODE = '" + estCode + "' "; if (!String.IsNullOrEmpty(getModel.station)) //STATION { listQuery += " AND EST_CODE = " + getModel.station.Trim(); } if (!String.IsNullOrEmpty(getModel.nation)) //도착국가 { listQuery += " AND NATION_CODE = " + getModel.nation.Trim(); } if (!String.IsNullOrEmpty(getModel.type)) //출고타입 { listQuery += " AND NATION_CODE = " + getModel.type.Trim(); } DataTable listDt = getQueryResult(listQuery, out errorStr); if (listDt != null && listDt.Rows.Count != 0) { model.SEQNO = int.Parse(listDt.Rows[0]["SEQNO"].ToString().Trim()); model.EST_CODE = listDt.Rows[0]["EST_CODE"].ToString().Trim(); model.ESE_CODE = listDt.Rows[0]["ESE_CODE"].ToString().Trim(); model.NATION_CODE = listDt.Rows[0]["NATION_CODE"].ToString().Trim(); model.RELEASE_CODE = listDt.Rows[0]["RELEASE_CODE"].ToString().Trim(); model.WEIGHT = double.Parse(listDt.Rows[0]["WEIGHT"].ToString().Trim()); model.SHIPPING_FEE_NOR = double.Parse(listDt.Rows[0]["SHIPPING_FEE_NOR"].ToString().Trim()); model.SHIPPING_FEE_STC = double.Parse(listDt.Rows[0]["SHIPPING_FEE_STC"].ToString().Trim()); } return(model); }