Beispiel #1
0
        public bool Undo()
        {
            if (Row == null)
            {
                return(false);
            }

            DateTime dateTime;

            if (ColumnName.TryParse(out dateTime))
            {
                if (!OldData.Equals(""))
                {
                    Row[ColumnName] = OldData;
                }
                else
                {
                    Row[ColumnName] = "";
                }
                return(true);
            }

            if (OldData == null)
            {
                OldData = "";
            }

            Row[ColumnName] = OldData;

            return(true);
        }
Beispiel #2
0
        public void Execute()
        {
            DateTime dateTime;

            if (ColumnName.TryParse(out dateTime))
            {
                Row[ColumnName] = this.SelectedVertex.States.ParseEvidenceString(NewData as string);
            }

            else if (ColumnName == "Comment")
            {
                Row[ColumnName] = NewData as string;
            }
            else
            {
                double val;
                Row[ColumnName] = Double.TryParse(NewData.ToString(), out val) ? Convert.ToDouble(NewData.ToString()) : 0;
            }
            this.SelectedVertex.IsUserEvidenceComplete = true;
        }