private static bool ISSingleRowValid(DataRow dr)
{
dr.ClearErrors();
bool isValid = true;
if (dr["InventoryDamagedQuantity"] != DBNull.Value && ((Convert.ToDecimal(dr["InventoryDamagedQuantity"]) > 0) && (dr["DamagedPalletLocationID"] == DBNull.Value)))
{
dr.SetColumnError("DamagedPalletLocationID",
Icons.YearEndProcess_ValidateBeforeCommit_DamagedPalletLocation_Can_not_be_left_empty_);
isValid = false;
}
if (dr["InventorySoundQuantity"] != DBNull.Value && ((Convert.ToDecimal(dr["InventorySoundQuantity"]) > 0) && (dr["PalletLocationID"] == DBNull.Value)))
{
dr.SetColumnError("PalletLocationID",
Icons.YearEndProcess_ValidateBeforeCommit_Normal_PalletLocation_Can_not_be_left_empty_);
isValid = false;
}
return isValid;
}