Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Kingo Damgaard 157 posts 456 karma points
    Jul 30, 2010 @ 09:04
    Bo Kingo Damgaard
    1

    Bug regarding prevalues

    Hi

    There's an error when trying to get Prevalue from a property in doc2form.ascx.cs (ver 3)

    The following code uses 'val' to check for the key, but it should be 'key'

    foreach (string val in df.Data.Value.ToString().Split(",".ToCharArray()))
    {
    int key = Int32.Parse(val.Trim());

    if (((KeyValuePrevalueEditor)df.PrevalueEditor).Prevalues.ContainsKey(val))
    preVal += "\n" + ((KeyValuePrevalueEditor)df.PrevalueEditor).Prevalues[val].ToString();
    else
    preVal += "\n" + val + "";
    }

    The code should read

    foreach (string val in df.Data.Value.ToString().Split(",".ToCharArray()))
    {
    int key = Int32.Parse(val.Trim());

    if (((KeyValuePrevalueEditor)df.PrevalueEditor).Prevalues.ContainsKey(key))
    preVal += "\n" + ((KeyValuePrevalueEditor)df.PrevalueEditor).Prevalues[key].ToString();
    else
    preVal += "\n" + val + "";
    }

    Otherwise you just get prevalue values in your email

    /Kingo

Please Sign in or register to post replies

Write your reply to:

Draft