Hi all,
DestinationGroupLine destinationGroupLine;
select firstonly destinationGroupLine
where destinationGroupLine.DestinationGrpId == destinationGroup.DestinationGrpId
&& destinationGroupLine.Country == range.get_Item(rowNo,2).Value
&& destinationGroupLine.City == range.get_Item(rowNo,3).Value;
if(!destinationGroupLine.RecId)
{
//LogisticsAddressCity logisticsAddressCity;
//LogisticsAddressCounty logisticsAddressCounty;
//select firstonly logisticsAddressCity
// where logisticsAddressCity.Name == range.get_Item(rowNo,3).Value;
//select firstonly logisticsAddressCounty
// where logisticsAddressCounty.Name == range.get_Item(rowNo,2).Value;
destinationGroupLine.clear();
destinationGroupLine.DestinationGrpId = destinationGroup.DestinationGrpId;
destinationGroupLine.Country = range.get_Item(rowNo,2).Value;
destinationGroupLine.City = range.get_Item(rowNo,3).Value;
if(destinationGroupLine.validateWrite())
{
destinationGroupLine.doInsert();
}
}
As i mentioned above code works fine for me. now, if i add country IND and city (Madina) like example.
I want to warning IND not available "madina".
1.Only if already exist country against the city only insert otherwise error thrown.
2. same country only if exists country will insert otherwise error thrown.
Two validation i want to do while importing excel so that what to be done ?
Thanks