public JsonResult GetEstIframeCostSelectbox(EstIframeCostModels model, string estCode) { model = act.GetEstIframeCostList(model, estCode); //리스트 가져오기 model.typeArray = act.GetReleaseCodeSelectBox(model); return(Json(model.typeArray)); }
//국가별 요율표 ========================================================================================================= // GET: Est EST STATION Est 정보 관리 -> 국가별 요율표 public ActionResult EstIframeCostTable(string msg, string estCode) { //권한 체크=================================================== if (!chk.chkPermission("EstInfo", "PER_SELECT")) { return(RedirectToAction("Index", "Home", new { msg = chk.alertStr })); } //=========================================================== TempData["PublicMsg"] = null; if (!string.IsNullOrEmpty(msg)) { TempData["PublicMsg"] = msg; } EstIframeCostModels model = new EstIframeCostModels(); model.viewEstCode = estCode; //model.Item.EST_CODE = model.viewEstCode; model = act.GetEstIframeCostList(model, estCode); //SELECT BOX ARRAY 데이터 설정 model.stationArray = act.GetEstCodeSelectBox(estCode); model.nationArray = act.GetNationCodeSelectBox(); model.typeArray = act.GetReleaseCodeSelectBox(model); return(View(model)); }
public ActionResult EstIframeCostTable(EstIframeCostModels model, string estCode, string NATION_CODE) { //권한 체크=================================================== if (!chk.chkPermission("EstInfo", "PER_SELECT")) { return(RedirectToAction("Index", "Home", new { msg = chk.alertStr })); } //=========================================================== model = act.GetEstIframeCostList(model, estCode); model.nationArray = act.GetNationCodeSelectBox(); model.stationArray = act.GetEstCodeSelectBox(estCode); model.typeArray = act.GetReleaseCodeSelectBox(model); return(View(model)); }
//RELEASE_CODE 콤보박스 public List <schTypeArray> GetReleaseCodeSelectBox(EstIframeCostModels getModel) { string errorStr = ""; string listQuery = " SELECT distinct RELEASE_CODE FROM est_shipping_fee WHERE NATION_CODE = '" + getModel.nation + "' AND EST_CODE = '" + getModel.station + "' "; DataTable listDt = getQueryResult(listQuery, out errorStr); List <schTypeArray> model = new List <schTypeArray>(); if (listDt != null && listDt.Rows.Count != 0) { for (int i = 0; i < listDt.Rows.Count; i++) { model.Add(new schTypeArray { opt_value = listDt.Rows[i]["RELEASE_CODE"].ToString().Trim(), opt_key = listDt.Rows[i]["RELEASE_CODE"].ToString().Trim() }); } } 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 + "' "; * 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); }