Exemplo n.º 1
0
        public static UpdateValueCollection CreateInsertedData(string pkValue, string tableName, DataRow titleRow, DataRow dataRow, int maxCols)
        {
            UpdateValueCollection c = new UpdateValueCollection(tableName, pkValue, EnumOperatorType.New);

            c.SetInsertedData(titleRow, dataRow, maxCols);
            return(c);
        }
Exemplo n.º 2
0
        public UpdateValueCollection GetChanges()
        {
            UpdateValueCollection c = new UpdateValueCollection(this.TableName, this.PKValue, this.Status);

            c.Status = this.Status;
            foreach (KeyValuePair <string, UpdateValue> keyValue in this)
            {
                if (keyValue.Value.IsChanged())
                {
                    c[keyValue.Key] = keyValue.Value;
                }
            }
            return(c);
        }
Exemplo n.º 3
0
        public static UpdateValueCollection CreateDeletedData(string pkValue, string tableName, DataRow titleRow, DataRow dataRow, int maxCols)
        {
            UpdateValueCollection c = new UpdateValueCollection(tableName, pkValue, EnumOperatorType.Delete);

            for (int i = 0; i < maxCols; i++)
            {
                string value = Util.ToString(dataRow["F" + i.ToString()]);
                string title = Util.ToString(titleRow["F" + i.ToString()]);

                if (title != string.Empty)
                {
                    c.Add(title, new UpdateValue().SetDeletedValue(value));
                }
                else
                {
                    break;
                }
            }
            return(c);
        }