Ejemplo n.º 1
0
        public static decimal getItemValueAsDecimal(Domino.NotesDocumentClass Document, String Field)
        {
            if (Document == null)
            {
                return(0);
            }

            try
            {
                String r = (String)((Object[])Document.GetItemValue(Field))[0];
                if (r == "")
                {
                    return(0);
                }
                return(Decimal.Parse(r));
            }
            catch
            {
            }

            try
            {
                Double d = (Double)((Object[])Document.GetItemValue(Field))[0];
                return(Decimal.Parse(d.ToString()));
            }
            catch
            {
            }

            return((decimal)((Object[])Document.GetItemValue(Field))[0]);
        }
Ejemplo n.º 2
0
        public static String getItemValue(Domino.NotesDocumentClass Document, String Field, int Maxlength)
        {
            if (Document == null)
            {
                return("");
            }
            String ret = (String)((Object[])Document.GetItemValue(Field))[0].ToString();

            return(Maxlength == 0 || (Maxlength != 0 && ret.Length <= Maxlength) ? ret : ret.Substring(0, Maxlength));
        }
Ejemplo n.º 3
0
        public static String[] getItemValues(Domino.NotesDocumentClass Document, String Field)
        {
            Object[] ar = ((Object[])Document.GetItemValue(Field));

            String[] ret = new String[ar.Length];
            for (int n = 0; n < ar.Length; n++)
            {
                ret[n] = ar[n].ToString();
            }

            return(ret);
        }