/// <summary> /// 根据成本Id 和仓库Id 获取相应的 仓库SN 信息 /// </summary> public void GetWareSnByCostWare(HttpContext context, long cost_pro_id) { // cost_pro_id var thisCostPro = new ctt_contract_cost_product_dal().FindNoDeleteById(cost_pro_id); if (thisCostPro != null) { var snType = context.Request.QueryString["snType"]; if (snType == "conPro") { var thisSnlist = new ctt_contract_cost_product_sn_dal().GetListByCostProId(thisCostPro.id); if (thisSnlist != null && thisSnlist.Count > 0) { if (thisCostPro.quantity != thisSnlist.Count) { thisSnlist = thisSnlist.Take(thisCostPro.quantity).ToList(); } context.Response.Write(new Tools.Serialize().SerializeJson(thisSnlist)); } } else { var thisSnlist = new ivt_warehouse_product_sn_dal().GetListByCostProId(thisCostPro.id); if (thisSnlist != null && thisSnlist.Count > 0) { if (thisCostPro.quantity != thisSnlist.Count) { thisSnlist = thisSnlist.Take(thisCostPro.quantity).ToList(); } context.Response.Write(new Tools.Serialize().SerializeJson(thisSnlist)); } } } }
/// <summary> /// 根据Id 回去相应的sn /// </summary> public void GetSnListByIds(HttpContext context, string ids) { if (!string.IsNullOrEmpty(ids)) { var type = context.Request.QueryString["snType"]; if (type == "conPro") { var snList = new ctt_contract_cost_product_sn_dal().GetSnByIds(ids); if (snList != null && snList.Count > 0) { context.Response.Write(new Tools.Serialize().SerializeJson(snList)); } } else { var snList = new ivt_warehouse_product_sn_dal().GetSnByIds(ids); if (snList != null && snList.Count > 0) { context.Response.Write(new Tools.Serialize().SerializeJson(snList)); } } } }