How to download a column named orderrspno value only once for a particualr item
hi all below is my template to download so here Response No is the column so i want to download only once for item no orderresponse no is my column but when i click on download the orderresponse no apperas for all rows i want for a particular item value suppose for itema it has 2 rows it should show response no only once but it is showing two times@using processSystem.Common;
@{
string[] poDowloadHeader = { " Company Code", "Section Code", "Seller Company Code", "Message Type", "Document No.", "Creation Date", "Place of Delivery", "Shipping Method Code", "Shipping Term", "Comment 1", "Comment 2", " ResponseRecieveDate", "Currency Code", "Payment Terms", "Line No.", "Action Code", "Buyer Part No.", "Supplier Part No.", "Part Description 1", "Part Description 2", "Sales Unit Price", "Sales Unit Price Basis", "Sales Unit Price Basis UOM", "Sales Amount", "ETD", "ETA", "Order Quantity", "Order Quantity UOM", "DeliveryQuantity", "Response No", "ResponseDeliveryDate/ETA", "ResponseDeliveryDate/ETD", "Status" };
var header = "";
foreach (string strHead in poDowloadHeader)
{
header += strHead + "\t";
}
@header
}
@foreach (var po in Model.POS)
{
foreach (var sch in po.POLine_Changes_AMS)
{
var createDate = "";
var etdDt = "";
if (po.ODA004 != null)
{
createDate = po.ODA004.ToString("dd.MM.yyyy");
}
if (sch.ODC004 != null)
{
etdDt = sch.ODC004.ToString("dd.MM.yyyy");
}
var line =
po.ODA009 + "\t" + po.ODA016 + "\t" + po.ODA024 + "\t" + po.DocumentType + "\t" + po.ODA001 + "\t" + createDate + "\t" + po.ODA044 + "\t" + po.ODA043 + "\t" + po.ODA046 + "\t" + po.ResponseComments + "\t" + po.ResponseComments2 +"\t" + po.Responsedate + "/t"+po.ODA055 + "\t" + po.ODA056 + "\t" + po.ODA039 + "\t" + po.ODA113 + "\t" + sch.POLine_AMS.ODB001 + "\t" + " " + "\t" + sch.POLine_AMS.ODB002 + "\t" + sch.POLine_AMS.ODB003 + "\t" + sch.POLine_AMS.ODB004 + "\t" + sch.POLine_AMS.ODB005 + "\t" + sch.POLine_AMS.ODB007 + "\t" + sch.POLine_AMS.ODB008 + "\t" + sch.POLine_AMS.ODB009 + "\t" + sch.POLine_AMS.ODB006 + "\t" + etdDt + "\t" + sch.ODC003.ToString("dd.MM.yyyy") + "\t" + sch.ODC001 + "\t" + sch.ODC002 + "\t " + po.orderrspno + "\t" + sch.ResponseETA + "\t" + sch.ResponseETD + "\t " + sch.POLine_AMS.OrderRspStatus + "\r\n";
@line
}