Example #1
0
        public bool SetField <T>(string myPropertyName, T myNewValue)
        {
            ItemColumn col = this.Table.Columns.FirstOrDefault <ItemColumn>((column) => column.ColumnName == myPropertyName);

            if (null != col)
            {
                int    index     = this.Table.Columns.IndexOf(col);
                object currValue = this.PropertyBlob[index];

                if ((null != myNewValue) &&
                    (null != currValue) &&
                    (currValue.Equals(myNewValue)))
                {
                    return(false);
                }
                else
                {
                    this.PropertyBlob[index] = myNewValue;
                    if (this.RowState == ItemRowState.Unchanged)
                    {
                        this.RowState = ItemRowState.Modified;
                    }

                    return(true);
                }
            }

            return(false);
        }
Example #2
0
 public ItemRowChanged(ItemRow myItemRow, ItemRowState myItemRowState)
 {
     this.ItemRow      = myItemRow;
     this.ItemRowState = myItemRowState;
 }